Skip to content

Commit

Permalink
K8s: Update Node Pool documentation (#1517)
Browse files Browse the repository at this point in the history
* K8s: Update Node Pool documentation 

Addressing #1516

Adding explicit documentation that minimum node pool size can't not be zero if autoscale is true.

* Update kubernetes.go

* update node pool doc

---------

Co-authored-by: Andrew Starr-Bochicchio <[email protected]>
  • Loading branch information
danaelhe and andrewsomething authored Apr 1, 2024
1 parent ccd6d4d commit 8edfc44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ Format: `+"`"+`"name=your-name;size=size_slug;count=5;tag=tag1;tag=tag2;label=ke
- `+"`"+`tag`+"`"+`: A comma-separated list of tags to apply to nodes in the pool
- `+"`"+`label`+"`"+`: A label in `+"`"+`key=value`+"`"+` notation. Repeat to add multiple labels at once.
- `+"`"+`taint`+"`"+`: Taint in `+"`"+`key=value:effect`+"`"+` notation. Repeat to add multiple taints at once.
- `+"`"+`auto-scale`+"`"+`: Enables cluster auto-scaling on the node pool (boolean)
- `+"`"+`min-nodes`+"`"+`: The minimum number of nodes that the cluster can be auto-scaled to.
- `+"`"+`auto-scale`+"`"+`: Enables cluster auto-scaling on the node pool (boolean).
- `+"`"+`min-nodes`+"`"+`: The minimum number of nodes that the cluster can be auto-scaled to. The value will be 0 if auto_scale is set to false. Scale-to-zero is not supported.
- `+"`"+`max-nodes`+"`"+`: The maximum number of nodes that can be auto-scaled to.`)

AddBoolFlag(cmdKubeClusterCreate, doctl.ArgClusterUpdateKubeconfig, "", true,
Expand Down Expand Up @@ -490,7 +490,7 @@ Creates a new node pool for the specified cluster. The command requires values f
AddBoolFlag(cmdKubeNodePoolCreate, doctl.ArgNodePoolAutoScale, "", false,
"Enables auto-scaling on the node pool")
AddIntFlag(cmdKubeNodePoolCreate, doctl.ArgNodePoolMinNodes, "", 0,
"The minimum number of nodes in the node pool when autoscaling is enabled")
"The minimum number of nodes in the node pool when autoscaling (auto_scale) is enabled. If auto_scale is set to false, the default value will be 0. Scale-to-zero is not supported.")
AddIntFlag(cmdKubeNodePoolCreate, doctl.ArgNodePoolMaxNodes, "", 0,
"The maximum number of nodes in the node pool when autoscaling is enabled")
cmdKubeNodePoolCreate.Example = `The following example creates a node pool named ` + "`" + `example-pool` + "`" + ` in a cluster named ` + "`" + `example-cluster` + "`" + `: doctl kubernetes cluster node-pool create example-cluster --name example-pool --size s-1vcpu-2gb --count 3 --taint "key1=value1:NoSchedule" --taint "key2:NoExecute"`
Expand Down

0 comments on commit 8edfc44

Please sign in to comment.