Edit

List available virtual machine (VM) SKUs for Azure Kubernetes Service (AKS) clusters (Preview)

When you create an Azure Kubernetes Service (AKS) cluster or add a new node pool, you need to choose a VM SKU that's available in your target Azure region and supported by AKS. You can use the az aks list-vm-skus command to quickly view SKUs for AKS in a specific region.

In this article, you learn how to:

  • List VM SKUs for AKS in a specific region.
  • Filter SKUs by exact or partial Azure VM size name.
  • List only SKUs that support availability zones.
  • Include all regional SKUs, including SKUs not currently available to your subscription.

Note

This feature lists options of SKUs that are supported in AKS in the specified Azure region and does not consider your current quota or real-time available capacity. Visit the Azure quota documentation to learn more about managing quota requests.

Important

AKS preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. AKS previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use. For more information, see the following support articles:

Prerequisites

Tip

If az aks list-vm-skus isn't recognized in your environment, update Azure CLI to the latest version and update installed AKS extensions.

Install the aks-preview CLI extension

  1. Install the aks-preview CLI extension using the az extension add command.

    az extension add --name aks-preview
    
  2. Update the extension to ensure you have the latest version installed using the az extension update command.

    az extension update --name aks-preview
    

Set environment variables

Set the following environment variables to use with commands in this article:

export RESOURCE_GROUP=<resource-group-name>
export CLUSTER_NAME=<cluster-name>
export LOCATION=<location>

List supported VM SKUs on an AKS cluster

List supported VM SKUs on an AKS cluster using the az aks list-vm-skus command.

LOCATION=eastus

az aks list-vm-skus \
	--location $LOCATION \
	--query "[].name" \
	--output table

Example output:

Result
--------------------------
Standard_D2ds_v5
Standard_D4ds_v5
Standard_D8ds_v5
Standard_E4ds_v5
Standard_E8ds_v5

By default, this command only returns VM SKUs available to your current Azure subscription.

Filter by Azure VM size name

List supported VM SKUs on an AKS cluster using the az aks list-vm-skus command with the --size parameter to apply a case-insensitive partial match against the SKU name. The following example sets --size to d4ds:

az aks list-vm-skus \
	--location $LOCATION \
	--size d4ds \
	--query "[].name" \
	--output table

Example output:

Result
--------------------
Standard_D4ds_v5
Standard_D4ds_v6

Show only zone-capable Azure VM SKUs

List supported VM SKUs on an AKS cluster using the az aks list-vm-skus command with the --zone parameter to return only SKUs that support availability zones in the selected region.

az aks list-vm-skus \
	--location $LOCATION \
	--zone \
	--query "[].{name:name,zones:join(', ', locationInfo[0].zones)}" \
	--output table

Example output:

Name                Zones
------------------  ---------
Standard_D4ds_v5    [1, 2, 3]
Standard_E8ds_v5    [1, 2, 3]

Include all SKUs in the Azure region

List supported VM SKUs on an AKS cluster using the az aks list-vm-skus command with the --all parameter to include SKUs that might not currently be available to your subscription.

az aks list-vm-skus \
	--location $LOCATION \
	--all \
	--query "[].name" \
	--output table

Note

AKS uses a best-effort approach to provision VM SKUs. A SKU appearing in this list doesn't guarantee allocation success at deployment time.

View full details in JSON

List supported VM SKUs on an AKS cluster using the az aks list-vm-skus command with the --output parameter set to jsonc to return a JSON output with all returned properties of the supported Azure VM SKUs.

az aks list-vm-skus \
	--location $LOCATION \
	--zone \
	--output jsonc

Example output:

[
	{
		"name": "Standard_D4ds_v5",
		"locationInfo": [
			{
				"location": "eastus",
				"zones": [
					"1",
					"2",
					"3"
				]
			}
		]
	},
	{
		"name": "Standard_E8ds_v5",
		"locationInfo": [
			{
				"location": "eastus",
				"zones": [
					"1",
					"2",
					"3"
				]
			}
		]
	}
]

The exact set of returned properties might vary by Azure CLI or API version.

Use a returned SKU for AKS cluster or node pool creation

After you identify a suitable Azure VM SKU in your target region, specify the name with the --node-vm-size parameter when creating your AKS cluster or node pool. The following examples set the VM size to Standard_D4ds_v5:

RESOURCE_GROUP=myResourceGroup
CLUSTER_NAME=myAKSCluster
VM_SIZE=Standard_D4ds_v5

az aks create \
	--resource-group $RESOURCE_GROUP \
	--name $CLUSTER_NAME \
	--node-count 3 \
	--node-vm-size $VM_SIZE \
	--generate-ssh-keys

az aks nodepool add \
	--resource-group $RESOURCE_GROUP \
	--name $CLUSTER_NAME \
	--node-count 1 \
	--node-vm-size $VM_SIZE \

Troubleshooting