az aks nodepool

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Commands to manage node pools in Kubernetes kubernetes cluster.

Commands

Name Description Type Status
az aks nodepool add

Add a node pool to the managed Kubernetes cluster.

Core GA
az aks nodepool add (aks-preview extension)

Add a node pool to the managed Kubernetes cluster.

Extension GA
az aks nodepool delete

Delete the agent pool in the managed Kubernetes cluster.

Core GA
az aks nodepool delete (aks-preview extension)

Delete the agent pool in the managed Kubernetes cluster.

Extension GA
az aks nodepool delete-machines

Delete specific machines in an agentpool for a managed cluster.

Core GA
az aks nodepool delete-machines (aks-preview extension)

Delete specific machines in an agentpool for a managed cluster.

Extension GA
az aks nodepool get-upgrades

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

Core GA
az aks nodepool get-upgrades (aks-preview extension)

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

Extension GA
az aks nodepool list

List node pools in the managed Kubernetes cluster. To get list of nodes in the cluster run kubectl get nodes command.

Core GA
az aks nodepool list (aks-preview extension)

List node pools in the managed Kubernetes cluster.

Extension GA
az aks nodepool manual-scale

Commands to manage nodepool virtualMachineProfile.scale.manual.

Extension GA
az aks nodepool manual-scale add

Add a new manual to a VirtualMachines agentpool in the managed Kubernetes cluster.

Extension GA
az aks nodepool manual-scale delete

Delete an existing manual to a VirtualMachines agentpool in the managed Kubernetes cluster.

Extension GA
az aks nodepool manual-scale update

Update an existing manual of a VirtualMachines agentpool in the managed Kubernetes cluster.

Extension GA
az aks nodepool operation-abort

Abort last running operation on nodepool.

Core GA
az aks nodepool operation-abort (aks-preview extension)

Abort last running operation on nodepool.

Extension GA
az aks nodepool scale

Scale the node pool in a managed Kubernetes cluster.

Core GA
az aks nodepool scale (aks-preview extension)

Scale the node pool in a managed Kubernetes cluster.

Extension GA
az aks nodepool show

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

Core GA
az aks nodepool show (aks-preview extension)

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

Extension GA
az aks nodepool snapshot

Commands to manage nodepool snapshots.

Core and Extension GA
az aks nodepool snapshot create

Create a nodepool snapshot.

Core GA
az aks nodepool snapshot create (aks-preview extension)

Create a nodepool snapshot.

Extension GA
az aks nodepool snapshot delete

Delete a nodepool snapshot.

Core GA
az aks nodepool snapshot delete (aks-preview extension)

Delete a nodepool snapshot.

Extension GA
az aks nodepool snapshot list

List nodepool snapshots.

Core GA
az aks nodepool snapshot list (aks-preview extension)

List nodepool snapshots.

Extension GA
az aks nodepool snapshot show

Show the details of a nodepool snapshot.

Core GA
az aks nodepool snapshot show (aks-preview extension)

Show the details of a nodepool snapshot.

Extension GA
az aks nodepool snapshot update

Update tags on a snapshot of a nodepool.

Core GA
az aks nodepool snapshot update (aks-preview extension)

Update tags on a snapshot of a nodepool.

Extension GA
az aks nodepool snapshot wait

Wait for a nodepool snapshot to reach a desired state.

Core GA
az aks nodepool start

Start stopped agent pool in the managed Kubernetes cluster.

Core GA
az aks nodepool start (aks-preview extension)

Start stopped agent pool in the managed Kubernetes cluster.

Extension GA
az aks nodepool stop

Stop running agent pool in the managed Kubernetes cluster.

Core GA
az aks nodepool stop (aks-preview extension)

Stop running agent pool in the managed Kubernetes cluster.

Extension GA
az aks nodepool update

Update a node pool properties.

Core GA
az aks nodepool update (aks-preview extension)

Update a node pool properties.

Extension GA
az aks nodepool upgrade

Upgrade the node pool in a managed Kubernetes cluster.

Core GA
az aks nodepool upgrade (aks-preview extension)

Upgrade the node pool in a managed Kubernetes cluster.

Extension GA
az aks nodepool wait

Wait for a node pool to reach a desired state.

Core GA

az aks nodepool add

Add a node pool to the managed Kubernetes cluster.

az aks nodepool add --cluster-name
                    --name
                    --resource-group
                    [--aks-custom-headers]
                    [--allowed-host-ports]
                    [--asg-ids]
                    [--crg-id]
                    [--disable-windows-outbound-nat]
                    [--drain-timeout]
                    [--enable-cluster-autoscaler]
                    [--enable-encryption-at-host]
                    [--enable-fips-image]
                    [--enable-node-public-ip]
                    [--enable-ultra-ssd]
                    [--eviction-policy {Deallocate, Delete}]
                    [--gpu-instance-profile {MIG1g, MIG2g, MIG3g, MIG4g, MIG7g}]
                    [--host-group-id]
                    [--kubelet-config]
                    [--kubernetes-version]
                    [--labels]
                    [--linux-os-config]
                    [--max-count]
                    [--max-pods]
                    [--max-surge]
                    [--min-count]
                    [--mode {System, User}]
                    [--no-wait]
                    [--node-count]
                    [--node-osdisk-size]
                    [--node-osdisk-type {Ephemeral, Managed}]
                    [--node-public-ip-prefix-id]
                    [--node-public-ip-tags]
                    [--node-soak-duration]
                    [--node-taints]
                    [--node-vm-size]
                    [--os-sku {AzureLinux, CBLMariner, Mariner, Ubuntu, Windows2019, Windows2022}]
                    [--os-type]
                    [--pod-subnet-id]
                    [--ppg]
                    [--priority {Regular, Spot}]
                    [--scale-down-mode {Deallocate, Delete}]
                    [--snapshot-id]
                    [--spot-max-price]
                    [--tags]
                    [--vnet-subnet-id]
                    [--zones]

Examples

Create a nodepool in an existing AKS cluster with ephemeral os enabled.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48

Create a nodepool with EncryptionAtHost enabled.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-encryption-at-host

Create a nodepool with UltraSSD enabled.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-ultra-ssd

Create a nodepool cluster with a specific OS SKU

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --os-sku Ubuntu

Create a nodepool with FIPS-enabled OS

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-fips-image

create a kubernetes cluster with a snapshot id.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --kubernetes-version 1.20.9 --snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/snapshots/mysnapshot1"

create a nodepool in an existing AKS cluster with host group id

az aks nodepool add -g MyResourceGroup -n MyNodePool --cluster-name MyMC --host-group-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/hostGroups/myHostGroup --node-vm-size VMSize

create a nodepool with a Capacity Reservation Group(CRG) ID.

az aks nodepool add -g MyResourceGroup -n MyNodePool --cluster-name MyMC --node-vm-size VMSize --crg-id "/subscriptions/SubID/resourceGroups/ResourceGroupName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID"

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Comma-separated key-value pairs to specify custom headers.

--allowed-host-ports

Expose host ports on the node pool. When specified, format should be a space-separated list of ranges with protocol, eg. 80/TCP 443/TCP 4000-5000/TCP.

--asg-ids

The IDs of the application security groups to which the node pool's network interface should belong. When specified, format should be a space-separated list of IDs.

--crg-id

The crg id used to associate the new nodepool with the existed Capacity Reservation Group resource.

--disable-windows-outbound-nat

Disable Windows OutboundNAT on Windows agent node pool.

Default value: False
--drain-timeout

When nodes are drain how many minutes to wait for all pods to be evicted.

--enable-cluster-autoscaler -e

Enable cluster autoscaler.

Default value: False
--enable-encryption-at-host

Enable EncryptionAtHost, default value is false.

Default value: False
--enable-fips-image

Use FIPS-enabled OS on agent nodes.

Default value: False
--enable-node-public-ip

Enable VMSS node public IP.

Default value: False
--enable-ultra-ssd

Enable UltraSSD, default value is false.

Default value: False
--eviction-policy

The eviction policy of the Spot node pool. It can only be set when --priority is Spot.

Accepted values: Deallocate, Delete
Default value: Delete
--gpu-instance-profile

GPU instance profile to partition multi-gpu Nvidia GPUs.

Accepted values: MIG1g, MIG2g, MIG3g, MIG4g, MIG7g
--host-group-id

The fully qualified dedicated host group id used to provision agent node pool.

--kubelet-config

Path to JSON file containing Kubelet configurations for agent nodes. https://aka.ms/aks/custom-node-config.

--kubernetes-version -k

Version of Kubernetes to use for creating the cluster, such as "1.16.9".

Value from: `az aks get-versions`
--labels

The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels.

--linux-os-config

Path to JSON file containing OS configurations for Linux agent nodes. https://aka.ms/aks/custom-node-config.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--max-pods -m

The maximum number of pods deployable to a node.

If not specified, defaults based on network-plugin. 30 for "azure", 110 for "kubenet", or 250 for "none".

--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33%.

--min-count

Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--mode

The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode System. Learn more at https://aka.ms/aks/nodepool/mode.

Accepted values: System, User
Default value: User
--no-wait

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

Default value: False
--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 GiB of the OS disk for each node in the agent pool. Minimum 30 GiB.

--node-osdisk-type

OS disk type to be used for machines in a given agent pool. Defaults to 'Ephemeral' when possible in conjunction with VM size and OS disk size. May not be changed for this pool after creation. ('Ephemeral' or 'Managed').

Accepted values: Ephemeral, Managed
--node-public-ip-prefix-id

Public IP prefix ID used to assign public IPs to VMSS nodes.

--node-public-ip-tags

The ipTags of the node public IPs.

--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--node-taints

The node taints for the node pool.

--node-vm-size -s

Size of Virtual Machines to create as Kubernetes nodes.

--os-sku

The OS SKU of the agent node pool. Ubuntu or CBLMariner for Linux. Windows2019 or Windows2022 for Windows.

Accepted values: AzureLinux, CBLMariner, Mariner, Ubuntu, Windows2019, Windows2022
--os-type

The OS Type. Linux or Windows.

--pod-subnet-id

The Resource Id of a subnet in an existing VNet into which to assign pods in the cluster (requires azure network-plugin).

--ppg

The ID of a PPG.

--priority

The priority of the node pool.

Accepted values: Regular, Spot
Default value: Regular
--scale-down-mode

Describe how VMs are added to or removed from nodepools.

Accepted values: Deallocate, Delete
Default value: Delete
--snapshot-id

The source snapshot id used to create this nodepool.

--spot-max-price

It can only be set when --priority is Spot. Specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. It can only include up to 5 decimal places.

Default value: nan
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--vnet-subnet-id

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

--zones -z

Availability zones where agent nodes will be placed. Also, to install agent nodes to more than one zone you need to pass zone numbers separated by blanks. For example - To have all 3 zones, you are expected to enter --zones 1 2 3.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool add (aks-preview extension)

Add a node pool to the managed Kubernetes cluster.

az aks nodepool add --cluster-name
                    --name
                    --resource-group
                    [--aks-custom-headers]
                    [--allowed-host-ports]
                    [--asg-ids]
                    [--crg-id]
                    [--disable-windows-outbound-nat]
                    [--drain-timeout]
                    [--driver-type {CUDA, GRID}]
                    [--enable-artifact-streaming]
                    [--enable-cluster-autoscaler]
                    [--enable-custom-ca-trust]
                    [--enable-encryption-at-host]
                    [--enable-fips-image]
                    [--enable-node-public-ip]
                    [--enable-secure-boot]
                    [--enable-ultra-ssd]
                    [--enable-vtpm]
                    [--eviction-policy {Deallocate, Delete}]
                    [--gateway-prefix-size]
                    [--gpu-instance-profile {MIG1g, MIG2g, MIG3g, MIG4g, MIG7g}]
                    [--host-group-id]
                    [--if-match]
                    [--if-none-match]
                    [--kubelet-config]
                    [--kubernetes-version]
                    [--labels]
                    [--linux-os-config]
                    [--max-count]
                    [--max-pods]
                    [--max-surge]
                    [--message-of-the-day]
                    [--min-count]
                    [--mode {Gateway, System, User}]
                    [--no-wait]
                    [--node-count]
                    [--node-osdisk-size]
                    [--node-osdisk-type {Ephemeral, Managed}]
                    [--node-public-ip-prefix-id]
                    [--node-public-ip-tags]
                    [--node-soak-duration]
                    [--node-taints]
                    [--node-vm-size]
                    [--os-sku {AzureLinux, CBLMariner, Mariner, Ubuntu, Windows2019, Windows2022, WindowsAnnual}]
                    [--os-type]
                    [--pod-ip-allocation-mode {DynamicIndividual, StaticBlock}]
                    [--pod-subnet-id]
                    [--ppg]
                    [--priority {Regular, Spot}]
                    [--scale-down-mode {Deallocate, Delete}]
                    [--skip-gpu-driver-install]
                    [--snapshot-id]
                    [--spot-max-price]
                    [--ssh-access {disabled, localuser}]
                    [--tags]
                    [--undrainable-node-behavior]
                    [--vm-set-type]
                    [--vm-sizes]
                    [--vnet-subnet-id]
                    [--workload-runtime {KataCcIsolation, KataMshvVmIsolation, OCIContainer, WasmWasi}]
                    [--zones]

Examples

Create a nodepool in an existing AKS cluster with ephemeral os enabled.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48

Create a nodepool with EncryptionAtHost enabled.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-encryption-at-host

Create a nodepool with a specific os-sku

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster  --os-sku Ubuntu

Create a nodepool which can run wasm workloads.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster  --workload-runtime WasmWasi

create a kubernetes cluster with a snapshot id.

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --kubernetes-version 1.20.9 --snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/snapshots/mysnapshot1"

create a nodepool with a Capacity Reservation Group(CRG) ID.

az aks nodepool add -g MyResourceGroup -n MyNodePool --cluster-name MyMC --node-vm-size VMSize --crg-id "/subscriptions/SubID/resourceGroups/ResourceGroupName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID"

create a nodepool in an existing AKS cluster with host group id

az aks nodepool add -g MyResourceGroup -n MyNodePool --cluster-name MyMC --host-group-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/hostGroups/myHostGroup --node-vm-size VMSize

Create a nodepool with ip allocation mode set to "StaticBlock" and using a pod subnet ID

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster  --os-sku Ubuntu --pod-subnet-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet --pod-ip-allocation-mode StaticBlock

Create a nodepool of type VirtualMachines

az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --vm-set-type VirtualMachines --vm-sizes "Standard_D4s_v3,Standard_D8s_v3" --node-count 3

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--allowed-host-ports
Preview

Expose host ports on the node pool. When specified, format should be a comma-separated list of ranges with protocol, eg. 80/TCP,443/TCP,4000-5000/TCP. Must use VMSS agent pool type.

--asg-ids
Preview

The IDs of the application security groups to which the node pool's network interface should belong. When specified, format should be a comma-separated list of IDs. Must use VMSS agent pool type.

--crg-id
Preview

The crg-id used to associate the new nodepool with the existed Capacity Reservation Group resource. Must use VMSS agent pool type.

--disable-windows-outbound-nat

Disable Windows OutboundNAT on Windows agent node pool. Must use VMSS agent pool type.

Default value: False
--drain-timeout

When nodes are drain how many minutes to wait for all pods to be evicted.

--driver-type
Preview

Specify the type of GPU driver to install when creating Windows agent pools. Valid values are "GRID" and "CUDA". If not provided, AKS selects the driver based on system compatibility. This option cannot be changed once the AgentPool has been created. The default is system selected.

Accepted values: CUDA, GRID
--enable-artifact-streaming
Preview

Enable artifact streaming for VirtualMachineScaleSets managed by a node pool, to speed up the cold-start of containers on a node through on-demand image loading. To use this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false.

Default value: False
--enable-cluster-autoscaler -e

Enable cluster autoscaler. Must use VMSS agent pool type.

Default value: False
--enable-custom-ca-trust

Enable Custom CA Trust on agent node pool.

Default value: False
--enable-encryption-at-host

Enable EncryptionAtHost on agent node pool.

Default value: False
--enable-fips-image

Use FIPS-enabled OS on agent nodes.

Default value: False
--enable-node-public-ip

Enable VMSS node public IP. Must use VMSS agent pool type.

Default value: False
--enable-secure-boot
Preview

Enable Secure Boot on agent node pool. Must use VMSS agent pool type.

Default value: False
--enable-ultra-ssd

Enable UltraSSD on agent node pool. Must use VMSS agent pool type.

Default value: False
--enable-vtpm
Preview

Enable vTPM on agent node pool. Must use VMSS agent pool type.

Default value: False
--eviction-policy

The eviction policy of the Spot node pool. It can only be set when --priority is Spot.

Accepted values: Deallocate, Delete
Default value: Delete
--gateway-prefix-size
Preview

The size of Public IPPrefix attached to the Gateway-mode node pool. The node pool must be in Gateway mode.

--gpu-instance-profile

GPU instance profile to partition multi-gpu Nvidia GPUs.

Accepted values: MIG1g, MIG2g, MIG3g, MIG4g, MIG7g
--host-group-id

(PREVIEW) The fully qualified dedicated host group id used to provision agent node pool. Must use VMSS agent pool type.

--if-match

The value provided will be compared to the ETag of the agentpool, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new agentpool.

--if-none-match

Set to '*' to allow a new agentpool to be created, but to prevent updating an existing agentpool. Other values will be ignored.

--kubelet-config

Kubelet configurations for agent nodes.

--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`
--labels

The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels.

--linux-os-config

OS configurations for Linux agent nodes.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--max-pods -m

The maximum number of pods deployable to a node.

If not specified, defaults based on network-plugin. 30 for "azure", 110 for "kubenet", or 250 for "none".

Default value: 0
--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33%.

--message-of-the-day

Path to a file containing the desired message of the day. Only valid for linux nodes. Will be written to /etc/motd.

--min-count

Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--mode

The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode System. Learn more at https://aka.ms/aks/nodepool/mode.

Accepted values: Gateway, System, User
Default value: User
--no-wait

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

Default value: False
--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 GiB of the OS disk for each node in the agent pool. Minimum 30 GiB.

Default value: 0
--node-osdisk-type

OS disk type to be used for machines in a given agent pool. Defaults to 'Ephemeral' when possible in conjunction with VM size and OS disk size. May not be changed for this pool after creation. ('Ephemeral' or 'Managed').

Accepted values: Ephemeral, Managed
--node-public-ip-prefix-id

Public IP prefix ID used to assign public IPs to VMSS nodes. Must use VMSS agent pool type.

--node-public-ip-tags

The ipTags of the node public IPs. Must use VMSS agent pool type.

--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--node-taints

The node taints for the node pool.

--node-vm-size -s

Size of Virtual Machines to create as Kubernetes nodes.

--os-sku

The os-sku of the agent node pool. Ubuntu or CBLMariner when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022 or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.

Accepted values: AzureLinux, CBLMariner, Mariner, Ubuntu, Windows2019, Windows2022, WindowsAnnual
--os-type

The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type.

--pod-ip-allocation-mode

Set the ip allocation mode for how Pod IPs from the Azure Pod Subnet are allocated to the nodes in the AKS cluster. The choice is between dynamic batches of individual IPs or static allocation of a set of CIDR blocks. Accepted Values are "DynamicIndividual" or "StaticBlock".

Used together with the "azure" network plugin. Requires --pod-subnet-id.

Accepted values: DynamicIndividual, StaticBlock
--pod-subnet-id

The ID of a subnet in an existing VNet into which to assign pods in the cluster (requires azure network-plugin).

--ppg

The ID of a PPG. Must use VMSS agent pool type.

--priority

The priority of the node pool.

Accepted values: Regular, Spot
Default value: Regular
--scale-down-mode

Describes how VMs are added to or removed from nodepools.

Accepted values: Deallocate, Delete
Default value: Delete
--skip-gpu-driver-install
Preview

To skip GPU driver auto installation by AKS on a nodepool using GPU vm size if customers want to manage GPU driver installation by their own. If not specified, the default is false.

Default value: False
--snapshot-id

The source snapshot id used to create this nodepool. Must use VMSS agent pool type.

--spot-max-price

It can only be set when --priority is Spot. Specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. It can only include up to 5 decimal places.

Default value: nan
--ssh-access
Preview

Configure SSH setting for the node pool. Use "disabled" to disable SSH access, "localuser" to enable SSH access using private key.

Accepted values: disabled, localuser
Default value: localuser
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--undrainable-node-behavior

Define the behavior for undrainable nodes during upgrade. The value should be "Cordon" or "Schedule". The default value is "Schedule".

--vm-set-type

Agent pool vm set type. VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(Preview).

--vm-sizes
Preview

Comma-separated list of sizes. Must use VirtualMachines agent pool type.

--vnet-subnet-id

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

--workload-runtime

Determines the type of workload a node can run. Defaults to OCIContainer.

Accepted values: KataCcIsolation, KataMshvVmIsolation, OCIContainer, WasmWasi
Default value: OCIContainer
--zones -z

Space-separated list of availability zones where agent nodes will be placed. Must use VMSS agent pool type.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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 --nodepool-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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool delete (aks-preview extension)

Delete the agent pool in the managed Kubernetes cluster.

az aks nodepool delete --cluster-name
                       --name
                       --resource-group
                       [--if-match]
                       [--ignore-pod-disruption-budget]
                       [--no-wait]

Examples

Delete an agent pool with ignore-pod-disruption-budget

az aks nodepool delete --resource-group MyResourceGroup --cluster-name MyManagedCluster --name nodepool1 --ignore-pod-disruption-budget=true

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--if-match

The value provided will be compared to the ETag of the node pool, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new agentpool.

--ignore-pod-disruption-budget -i
Preview

(PREVIEW) ignore-pod-disruption-budget deletes an existing nodepool without considering Pod Disruption Budget.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool delete-machines

Delete specific machines in an agentpool for a managed cluster.

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

Examples

Delete specific machines in an agent pool

az aks nodepool delete-machines -g myResourceGroup --nodepool-name nodepool1 --cluster-name myAKSCluster --machine-names machine1

Required Parameters

--cluster-name

The cluster name.

--machine-names

Space-separated list of machine names from the agent pool to be deleted.

--name --nodepool-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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool delete-machines (aks-preview extension)

Delete specific machines in an agentpool for a managed cluster.

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

Examples

Delete specific machines in an agent pool

az aks nodepool delete-machines -g myResourceGroup --nodepool-name nodepool1 --cluster-name myAKSCluster --machine-names machine1

Required Parameters

--cluster-name

The cluster name.

--machine-names

Space-separated list of machine names from the agent pool to be deleted.

--name --nodepool-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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool get-upgrades

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

az aks nodepool get-upgrades --cluster-name
                             --name
                             --resource-group

Examples

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

az aks nodepool get-upgrades --resource-group MyResourceGroup --cluster-name MyManagedCluster --nodepool-name MyNodePool

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool get-upgrades (aks-preview extension)

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

az aks nodepool get-upgrades --cluster-name
                             --name
                             --resource-group

Examples

Get the available upgrade versions for an agent pool of the managed Kubernetes cluster.

az aks nodepool get-upgrades --resource-group MyResourceGroup --cluster-name MyManagedCluster --nodepool-name MyNodePool

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool list

List node pools in the managed Kubernetes cluster. To get list of nodes in the cluster run kubectl get nodes command.

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool list (aks-preview extension)

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool operation-abort

Abort last running operation on nodepool.

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

Examples

Abort operation on agent pool

az aks nodepool operation-abort -g myResourceGroup --nodepool-name nodepool1 --cluster-name myAKSCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool operation-abort (aks-preview extension)

Abort last running operation on nodepool.

az aks nodepool operation-abort --cluster-name
                                --name
                                --resource-group
                                [--aks-custom-headers]
                                [--no-wait]

Examples

Abort operation on agent pool

az aks nodepool operation-abort -g myResourceGroup --nodepool-name nodepool1 --cluster-name myAKSCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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 --nodepool-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.

Default value: False
--node-count -c

Number of nodes in the Kubernetes node pool.

Default value: 3
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool scale (aks-preview extension)

Scale the node pool in a managed Kubernetes cluster.

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

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
--node-count -c

Number of nodes in the Kubernetes node pool.

Default value: 3
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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 --nodepool-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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool show (aks-preview extension)

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 --nodepool-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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool start

Start stopped agent pool in the managed Kubernetes cluster.

az aks nodepool start --cluster-name
                      --name
                      --resource-group
                      [--aks-custom-headers]
                      [--no-wait]

Examples

Start agent pool in the managed cluster

az aks nodepool start --nodepool-name nodepool1 -g MyResourceGroup --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool start (aks-preview extension)

Start stopped agent pool in the managed Kubernetes cluster.

az aks nodepool start --cluster-name
                      --name
                      --resource-group
                      [--aks-custom-headers]
                      [--no-wait]

Examples

Start agent pool in the managed cluster

az aks nodepool start --nodepool-name nodepool1 -g MyResourceGroup --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool stop

Stop running agent pool in the managed Kubernetes cluster.

az aks nodepool stop --cluster-name
                     --name
                     --resource-group
                     [--aks-custom-headers]
                     [--no-wait]

Examples

Stop agent pool in the managed cluster

az aks nodepool stop --nodepool-name nodepool1 -g MyResourceGroup --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool stop (aks-preview extension)

Stop running agent pool in the managed Kubernetes cluster.

az aks nodepool stop --cluster-name
                     --name
                     --resource-group
                     [--aks-custom-headers]
                     [--no-wait]

Examples

Stop agent pool in the managed cluster

az aks nodepool stop --nodepool-name nodepool1 -g MyResourceGroup --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool update

Update a node pool properties.

Update a node pool to enable/disable cluster-autoscaler or change min-count or max-count. When called with no optional arguments this attempts to move the node pool to its goal state without changing the current node pool configuration. This can be used to move out of a non succeeded state.

az aks nodepool update --cluster-name
                       --name
                       --resource-group
                       [--aks-custom-headers]
                       [--allowed-host-ports]
                       [--asg-ids]
                       [--disable-cluster-autoscaler]
                       [--disable-fips-image]
                       [--drain-timeout]
                       [--enable-cluster-autoscaler]
                       [--enable-fips-image]
                       [--labels]
                       [--max-count]
                       [--max-surge]
                       [--min-count]
                       [--mode {System, User}]
                       [--no-wait]
                       [--node-soak-duration]
                       [--node-taints]
                       [--os-sku {AzureLinux, CBLMariner, Mariner}]
                       [--scale-down-mode {Deallocate, Delete}]
                       [--tags]
                       [--update-cluster-autoscaler]

Examples

Reconcile the nodepool back to its current state.

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

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 --nodepool-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

--aks-custom-headers

Comma-separated key-value pairs to specify custom headers.

--allowed-host-ports

Expose host ports on the node pool. When specified, format should be a space-separated list of ranges with protocol, eg. 80/TCP 443/TCP 4000-5000/TCP.

--asg-ids

The IDs of the application security groups to which the node pool's network interface should belong. When specified, format should be a space-separated list of IDs.

--disable-cluster-autoscaler -d

Disable cluster autoscaler.

Default value: False
--disable-fips-image

Switch to use non-FIPS-enabled OS on agent nodes.

Default value: False
--drain-timeout

When nodes are drain how many minutes to wait for all pods to be evicted.

--enable-cluster-autoscaler -e

Enable cluster autoscaler.

Default value: False
--enable-fips-image

Switch to use FIPS-enabled OS on agent nodes.

Default value: False
--labels

The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33%.

--min-count

Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--mode

The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode System. Learn more at https://aka.ms/aks/nodepool/mode.

Accepted values: System, User
--no-wait

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

Default value: False
--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--node-taints

The node taints for the node pool. You can update the existing node taint of a nodepool or create a new node taint for a nodepool. Pass the empty string "" to remove all taints.

--os-sku

The os-sku of the agent node pool.

Accepted values: AzureLinux, CBLMariner, Mariner
--scale-down-mode

Describe how VMs are added to or removed from nodepools.

Accepted values: Deallocate, Delete
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--update-cluster-autoscaler -u

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool update (aks-preview extension)

Update a node pool properties.

Update a node pool to enable/disable cluster-autoscaler or change min-count or max-count. When called with no optional arguments this attempts to move the node pool to its goal state without changing the current node pool configuration. This can be used to move out of a non succeeded state.

az aks nodepool update --cluster-name
                       --name
                       --resource-group
                       [--aks-custom-headers]
                       [--allowed-host-ports]
                       [--asg-ids]
                       [--dcat]
                       [--disable-cluster-autoscaler]
                       [--disable-fips-image]
                       [--disable-secure-boot]
                       [--disable-vtpm]
                       [--drain-timeout]
                       [--enable-artifact-streaming]
                       [--enable-cluster-autoscaler]
                       [--enable-custom-ca-trust]
                       [--enable-fips-image]
                       [--enable-secure-boot]
                       [--enable-vtpm]
                       [--if-match]
                       [--if-none-match]
                       [--labels]
                       [--max-count]
                       [--max-surge]
                       [--min-count]
                       [--mode {Gateway, System, User}]
                       [--no-wait]
                       [--node-soak-duration]
                       [--node-taints]
                       [--os-sku {AzureLinux, Ubuntu}]
                       [--scale-down-mode {Deallocate, Delete}]
                       [--ssh-access {disabled, localuser}]
                       [--tags]
                       [--undrainable-node-behavior]
                       [--update-cluster-autoscaler]
                       [--yes]

Examples

Reconcile the nodepool back to its current state.

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

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

Change a node pool to system mode

az aks nodepool update --mode System -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--allowed-host-ports
Preview

Expose host ports on the node pool. When specified, format should be a comma-separated list of ranges with protocol, eg. 80/TCP,443/TCP,4000-5000/TCP. Must use VMSS agent pool type.

--asg-ids
Preview

The IDs of the application security groups to which the node pool's network interface should belong. When specified, format should be a comma-separated list of IDs. Must use VMSS agent pool type.

--dcat --disable-custom-ca-trust

Disable Custom CA Trust on agent node pool.

Default value: False
--disable-cluster-autoscaler -d

Disable cluster autoscaler.

Default value: False
--disable-fips-image

Switch to use non-FIPS-enabled OS on agent nodes.

Default value: False
--disable-secure-boot
Preview

Disable Secure Boot on on an existing Trusted Launch enabled agent node pool.

Default value: False
--disable-vtpm
Preview

Disable vTPM on an existing Trusted Launch enabled agent node pool.

Default value: False
--drain-timeout

When nodes are drain how many minutes to wait for all pods to be evicted.

--enable-artifact-streaming
Preview

Enable artifact streaming for VirtualMachineScaleSets managed by a node pool, to speed up the cold-start of containers on a node through on-demand image loading. To use this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false.

Default value: False
--enable-cluster-autoscaler -e

Enable cluster autoscaler. Must use VMSS agent pool type.

Default value: False
--enable-custom-ca-trust

Enable Custom CA Trust on agent node pool.

Default value: False
--enable-fips-image

Switch to use FIPS-enabled OS on agent nodes.

Default value: False
--enable-secure-boot
Preview

Enable Secure Boot on an existing Trusted Launch enabled agent node pool. Must use VMSS agent pool type.

Default value: False
--enable-vtpm
Preview

Enable vTPM on an existing Trusted Launch enabled agent node pool. Must use VMSS agent pool type.

Default value: False
--if-match

The value provided will be compared to the ETag of the node pool, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new agentpool.

--if-none-match

Set to '*' to allow a new node pool to be created, but to prevent updating an existing node pool. Other values will be ignored.

--labels

The node labels for the node pool. See https://aka.ms/node-labels for syntax of labels.

--max-count

Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33%.

--min-count

Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.

--mode

The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode System. Learn more at https://aka.ms/aks/nodepool/mode.

Accepted values: Gateway, System, User
--no-wait

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

Default value: False
--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--node-taints

The node taints for the node pool.

--os-sku

The os-sku of the agent node pool.

Accepted values: AzureLinux, Ubuntu
--scale-down-mode

Describes how VMs are added to or removed from nodepools.

Accepted values: Deallocate, Delete
--ssh-access
Preview

Update SSH setting for the node pool. Use "disabled" to disable SSH access, "localuser" to enable SSH access using private key.

Accepted values: disabled, localuser
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--undrainable-node-behavior

Define the behavior for undrainable nodes during upgrade. The value should be "Cordon" or "Schedule". The default value is "Schedule".

--update-cluster-autoscaler -u

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

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool upgrade

Upgrade the node pool in a managed Kubernetes cluster.

az aks nodepool upgrade --cluster-name
                        --name
                        --resource-group
                        [--aks-custom-headers]
                        [--drain-timeout]
                        [--kubernetes-version]
                        [--max-surge]
                        [--no-wait]
                        [--node-image-only]
                        [--node-soak-duration]
                        [--snapshot-id]
                        [--yes]

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Comma-separated key-value pairs to specify custom headers.

--drain-timeout

When nodes are drain how long to wait for all pods to be evicted.

--kubernetes-version -k

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

--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33% (mutually exclusive with "--node-image-only". See "az aks nodepool update --max-surge" to update max surge before upgrading with "--node-image-only").

--no-wait

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

Default value: False
--node-image-only

Only upgrade agent pool's node image.

Default value: False
--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--snapshot-id

The source snapshot id used to upgrade this nodepool.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool upgrade (aks-preview extension)

Upgrade the node pool in a managed Kubernetes cluster.

az aks nodepool upgrade --cluster-name
                        --name
                        --resource-group
                        [--aks-custom-headers]
                        [--drain-timeout]
                        [--if-match]
                        [--if-none-match]
                        [--kubernetes-version]
                        [--max-surge]
                        [--no-wait]
                        [--node-image-only]
                        [--node-soak-duration]
                        [--snapshot-id]
                        [--undrainable-node-behavior]
                        [--yes]

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--aks-custom-headers

Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.

--drain-timeout

When nodes are drain how many minutes to wait for all pods to be evicted.

--if-match

The value provided will be compared to the ETag of the node pool, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new agentpool. For upgrade node image version requests this will be ignored.

--if-none-match

Set to '*' to allow a new node pool to be created, but to prevent updating an existing node pool. Other values will be ignored.

--kubernetes-version -k

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

--max-surge

Extra nodes used to speed upgrade. When specified, it represents the number or percent used, eg. 5 or 33%.

--no-wait

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

Default value: False
--node-image-only

Only upgrade agent pool's node image.

Default value: False
--node-soak-duration

The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node.

--snapshot-id

The source snapshot id used to upgrade this nodepool. Must use VMSS agent pool type.

--undrainable-node-behavior

Define the behavior for undrainable nodes during upgrade. The value should be "Cordon" or "Schedule". The default value is "Schedule".

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az aks nodepool wait

Wait for a node pool to reach a desired state.

If an operation on a node pool was interrupted or was started with --no-wait, use this command to wait for it to complete.

az aks nodepool wait --cluster-name
                     --name
                     --resource-group
                     [--created]
                     [--custom]
                     [--deleted]
                     [--exists]
                     [--interval]
                     [--timeout]
                     [--updated]

Examples

Wait for a node pool to reach a desired state, polling every minute for up to thirty minutes.

az aks nodepool wait --created --interval 60 --cluster-name MyManagedCluster --resource-group MyResourceGroup --nodepool-name MyNodePool --timeout 1800

Required Parameters

--cluster-name

The cluster name.

--name --nodepool-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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.