Share via


az aks machine

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.

Get information about machines in a nodepool of a managed clusters.

Commands

Name Description Type Status
az aks machine add

Add a machine to the specified node pool.

Extension GA
az aks machine list

Get information about IP Addresses, Hostname for all machines in an agentpool.

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

List the details for all machines in an agentpool.

Extension GA
az aks machine show

Show IP Addresses, Hostname for a specific machine in an agentpool for a managedcluster.

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

Show the details of a specific machine in an agentpool of a managedcluster.

Extension GA

az aks machine add

Add a machine to the specified node pool.

az aks machine add --cluster-name
                   --nodepool-name
                   --resource-group
                   [--disable-fips-image]
                   [--enable-fips-image]
                   [--enable-node-public-ip]
                   [--kubernetes-version]
                   [--machine-name]
                   [--no-wait]
                   [--node-public-ip-prefix-id]
                   [--node-public-ip-tags]
                   [--os-sku {AzureLinux, AzureLinux3, AzureLinux3OSGuard, AzureLinuxOSGuard, CBLMariner, Flatcar, Mariner, Ubuntu, Ubuntu2204, Ubuntu2404, Windows2019, Windows2022, Windows2025, WindowsAnnual}]
                   [--os-type]
                   [--pod-subnet-id]
                   [--priority {Regular, Spot}]
                   [--tags]
                   [--vm-size]
                   [--vnet-subnet-id]
                   [--zones]

Required Parameters

--cluster-name

Name of the managed cluster.

--nodepool-name

Name of the agentpool of a managed cluster.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disable-fips-image

Switch to use non-FIPS-enabled OS on the machine.

Property Value
Default value: False
--enable-fips-image

Switch to use FIPS-enabled OS on the machine.

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

Enable the machine public IP.

Property Value
Default value: False
--kubernetes-version

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

--machine-name

Host name of the machine.

--no-wait

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

Property Value
Default value: False
--node-public-ip-prefix-id

Public IP prefix ID used to assign public IPs to the machine.

--node-public-ip-tags

The ipTags of the machine public IPs.

--os-sku

The os-sku of the agent node pool.

Property Value
Accepted values: AzureLinux, AzureLinux3, AzureLinux3OSGuard, AzureLinuxOSGuard, CBLMariner, Flatcar, Mariner, Ubuntu, Ubuntu2204, Ubuntu2404, Windows2019, Windows2022, Windows2025, WindowsAnnual
--os-type

The operating system type of the machine.

--pod-subnet-id

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

--priority

The priority of the machine.

Property Value
Accepted values: Regular, Spot
--tags

The tags of the machine.

--vm-size

The size of the machine.

--vnet-subnet-id

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

--zones -z

Space-separated list of availability zones where a machine will be placed.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az aks machine list

Get information about IP Addresses, Hostname for all machines in an agentpool.

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

Examples

Get information about IP Addresses, Hostname, Availability Zones for all machines in an agentpool

az aks machine list  --resource-group <rg> --cluster-name <clusterName> --nodepool-name <apName>

Required Parameters

--cluster-name

Name of the managed cluster.

--nodepool-name

Name of the agentpool of a managed cluster.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az aks machine list (aks-preview extension)

List the details for all machines in an agentpool.

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

Examples

List the details for all machines in an agentpool

az aks machine list --resource-group <resourceGroupName> --cluster-name <clusterName> --nodepool-name <apName>

Required Parameters

--cluster-name

Name of the managed cluster.

--nodepool-name

Name of the agentpool of a managed cluster.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az aks machine show

Show IP Addresses, Hostname for a specific machine in an agentpool for a managedcluster.

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

Required Parameters

--cluster-name

Name of the managed cluster.

--machine-name

Name of the machine in the agentpool of a managed cluster.

--nodepool-name

Name of the agentpool of a managed cluster.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az aks machine show (aks-preview extension)

Show the details of a specific machine in an agentpool of a managedcluster.

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

Examples

Show the details of a specific machine in an agentpool of a managedcluster.

az aks machine show --resource-group <resourceGroupName> --cluster-name <clusterName> --nodepool-name <apName> --machine-name <machineName>

Required Parameters

--cluster-name

Name of the managed cluster.

--machine-name

Name of the machine.

--nodepool-name

Name of the agentpool of a managed cluster.

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

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False