az aks nodepool

Commands to manage node pools in Kubernetes kubernetes cluster.

Commands

az aks nodepool add Add a node pool to the managed Kubernetes cluster.
az aks nodepool delete Delete the agent pool in the managed Kubernetes cluster.
az aks nodepool list List node pools in the managed Kubernetes cluster.
az aks nodepool scale Scale the node pool in a managed Kubernetes cluster.
az aks nodepool show Show the details for a node pool in the managed Kubernetes cluster.
az aks nodepool update Update a node pool to enable/disable cluster-autoscaler or change min-count or max-count.
az aks nodepool upgrade Upgrade the node pool in a managed Kubernetes cluster.

az aks nodepool add

Add a node pool to the managed Kubernetes cluster.

az aks nodepool add --cluster-name
--name
--resource-group
[--enable-cluster-autoscaler]
[--eviction-policy]
[--kubernetes-version]
[--max-count]
[--max-pods]
[--min-count]
[--no-wait]
[--node-count]
[--node-osdisk-size]
[--node-taints]
[--node-vm-size]
[--node-zones {1, 2, 3}]
[--os-type]
[--priority]
[--public-ip-per-vm]
[--vnet-subnet-id]

Required Parameters

--cluster-name

The cluster name.

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--enable-cluster-autoscaler -e

Enable cluster autoscaler.

--eviction-policy

The eviction policy of the low-pri node pool. Delete or Deallocate.

default value: Delete
--kubernetes-version -k

Version of Kubernetes to use for creating the cluster, such as "1.7.12" or "1.8.7".

value from: `az aks get-versions`
--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].

--max-pods -m

The maximum number of pods deployable to a node.

--min-count

Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].

--no-wait

Do not wait for the long-running operation to finish.

--node-count -c

Number of nodes in the Kubernetes agent pool. After creating a cluster, you can change the size of its node pool with az aks scale.

default value: 3
--node-osdisk-size

Size in GB of the OS disk for each node in the agent pool. Minimum 30 GB.

--node-taints

The node taints for the node pool. You can't change the node taints through CLI after the node pool is created.

--node-vm-size -s

Size of Virtual Machines to create as Kubernetes nodes.

--node-zones --zones -z

(will be deprecated, use --zones) Availability zones where agent nodes will be placed.

accepted values: 1, 2, 3
--os-type

The OS Type. Linux or Windows.

default value: Linux
--priority

The priority of the node pool. Regular or Low.

default value: Regular
--public-ip-per-vm

Each node will have a public ip.

--vnet-subnet-id

The ID of a subnet in an existing VNet into which to deploy the cluster.

az aks nodepool delete

Delete the agent pool in the managed Kubernetes cluster.

az aks nodepool delete --cluster-name
--name
--resource-group
[--no-wait]

Required Parameters

--cluster-name

The cluster name.

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

az aks nodepool list

List node pools in the managed Kubernetes cluster.

az aks nodepool list --cluster-name
--resource-group

Required Parameters

--cluster-name

The cluster name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az aks nodepool scale

Scale the node pool in a managed Kubernetes cluster.

az aks nodepool scale --cluster-name
--name
--resource-group
[--no-wait]
[--node-count]

Required Parameters

--cluster-name

The cluster name.

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--node-count -c

Number of nodes in the Kubernetes node pool.

default value: 3

az aks nodepool show

Show the details for a node pool in the managed Kubernetes cluster.

az aks nodepool show --cluster-name
--name
--resource-group

Required Parameters

--cluster-name

The cluster name.

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az aks nodepool update

Update a node pool to enable/disable cluster-autoscaler or change min-count or max-count.

az aks nodepool update --cluster-name
--name
--resource-group
[--disable-cluster-autoscaler]
[--enable-cluster-autoscaler]
[--max-count]
[--min-count]
[--no-wait]
[--update-cluster-autoscaler]

Examples

Enable cluster-autoscaler within node count range [1,5]

az aks nodepool update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster

Disable cluster-autoscaler for an existing cluster

az aks nodepool update --disable-cluster-autoscaler -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster

Update min-count or max-count for cluster autoscaler.

az aks nodepool update --update-cluster-autoscaler --min-count 1 --max-count 10 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--disable-cluster-autoscaler -d

Disable cluster autoscaler.

--enable-cluster-autoscaler -e

Enable cluster autoscaler.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].

--min-count

Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].

--no-wait

Do not wait for the long-running operation to finish.

--update-cluster-autoscaler -u

Update min-count or max-count for cluster autoscaler.

az aks nodepool upgrade

Upgrade the node pool in a managed Kubernetes cluster.

az aks nodepool upgrade --cluster-name
--kubernetes-version
--name
--resource-group
[--no-wait]

Required Parameters

--cluster-name

The cluster name.

--kubernetes-version -k

Version of Kubernetes to upgrade the node pool to, such as "1.11.12".

--name -n

The node pool name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.