Virtual machine (VM) sizes, generations, and features for Azure Kubernetes Service (AKS)

Azure Kubernetes Service (AKS) supports various virtual machine (VM) sizes, generations, and features to accommodate different workloads and performance requirements. This article provides an overview of available VM sizes and generations for AKS, how to check for available VM sizes in your region, reasons why certain VM sizes might not be available, and what happens when a VM size retires.

VM support on AKS

Azure supports both Generation 1 (Gen 1) and Generation 2 (Gen 2) virtual machines (VMs). With some exceptions, we generally recommend migrating to Generation 2 VMs to take advantage of the newest features and functionalities in Azure VMs.

The VM size and operating system (OS) you select when creating an AKS node pool determines the VM generation and node image used. Check the list of supported sizes to see if your SKU supports or requires Gen 2.

Limitations

There are some limitations to take into account when choosing a VM generation and/or OS:

  • Trusted Launch can only be enabled on VM sizes that support Gen 2.
  • Confidential VM sizes always use Gen 2 on AKS.
  • Arm64 VM sizes always use Gen 2 on AKS.
  • Windows Server 2019 node pools don't support Gen 2 VM sizes.
  • Windows Server 2022 node pools require use of a custom header to use Gen 2.

To use Gen 2 VMs on AKS, see Use Gen 2 VMs.

Available VM features

AKS supports various VM features that enhance security, performance, and functionality. Some key features include:

  • Node autoprovisioning (NAP) uses pending pod resource requirements to decide the optimal VM configuration to run your workloads efficiently and cost-effectively.
  • Virtual Machines node pools provide a better experience for dynamic workloads and high availability requirements. Virtual Machines node pools enable you to set up multiple similar-family VMs in a single node pool. Your workloads are automatically scheduled on the available resources you configure.

Supported VM sizes

For in-depth information about VM sizes available in Azure, see Azure VM sizes. To view supported Gen 2 VM sizes, see Generation 2 VM sizes.

AKS also supports the following VM types and features:

Default behavior for supported VM sizes

There are three scenarios when creating a node pool with a supported VM size:

  • If the VM size supports only Gen 1, the default behavior for both Linux and Windows node pools is to use the Gen 1 node image.
  • If the VM size supports only Gen 2, the default behavior for both Linux and Windows node pools is to use the Gen 2 node image. Windows Server 2022 node pools require a custom header to use a VM size that only supports Gen 2. For more information, see Create a Windows node pool with a Gen 2 VM.
  • If the VM size supports both Gen 1 and Gen 2, the default behavior for both Linux and Windows (in Windows Server 2025+) nodes pools is to use the Gen 2 node image. To use the Gen 2 node image for Windows Server 2022, see Create a Windows node pool with a Gen 2 VM.

Check available VM sizes

Check available VM sizes using the az vm list-skus command.

az vm list-skus --location <your-location> --output table

Why certain VM sizes might not be available

There are several reasons why certain VM sizes might not be available, including:

  • Quota limits: All Azure services set default limits and quotas for resources and features. For more information, see the following resources:

    Note

    • For user node pools, VM sizes with fewer than two vCPUs and two GBs of memory (RAM) might not be used by default.
    • For system node pools, VM sizes with fewer than two vCPUs and four GBs of memory (RAM) might not be used by default. To ensure that you can reliably schedule the required kube-system pods and your applications, we recommend that you do not use any B series VMs or Av1 series VMs.
  • VM sizes in preview: VM sizes in preview might not be available to you if you haven't registered the preview flag for the VM size.

  • Blocked by AKS: Some VM sizes might not be available by default in AKS. These sizes might require extra testing or validation to ensure compatibility with AKS. If you need a specific VM size that isn't available to you, you can submit a GitHub issue request.

Make sure you understand which features your workloads need and choose a VM size that meets those requirements. Later VM versions typically have better performance and improved features. For example, Gen 2 VMs have increased security and performance benefits over Gen 1 VMs.

What happens when a VM size retires?

When a VM size or series reaches its retirement date, the VM is deallocated. VM deallocation causes your AKS node pools to break. To check the retirement status of a VM size, see Retired Azure VM size series or perform a search in Azure Updates. To check the VM size of your node pools, use the [az aks nodepool list][az-aks-nodepool-list] command and query for the vmSize property:

az aks nodepool list --resource-group <your-resource-group> --cluster-name <your-cluster-name> --query "[].{Name:name, VMSize:vmSize}" --output table

If you're using a VM size that's retiring/retired, we recommend migrating your node pools to a supported VM size to prevent any potential disruption to your service. Currently, AKS doesn't support transitioning to a new VM size within the same node pool.

Migrate node pools to a supported VM size

Once you determine the appropriate node pools to take action on, you can resize your node pools. During the resizing process, a new node pool is created and workloads are migrated to the new node pool.

For more information on migrating to a new VM size, see the following resources:

Use Gen 2 VMs on AKS

Gen 2 VMs are generally Azure's newer offerings and have exclusive features over Gen 1 VMs like increased memory, improved CPU performance, support for NVMe disks, and support for Trusted Launch.

While we generally recommend running Gen 2 VMs, you should make sure that the generation you choose supports your requirements. To learn more about the differences between generations, and when one might make more sense than the other, see Should I create a Gen 1 or 2 VM in Hyper-V?

Check available Gen 2 VM sizes

Check available Gen 2 VM sizes using the az vm list-skus command.

az vm list-skus --location <location> --size <vm-size> --output table

For a breakdown of what VM sizes support Gen 2, see Support for Gen 2 VMs on Azure.

Create a node pool with a Gen 2 VM

By default, Linux uses the Gen 2 node image unless the VM size doesn't support Gen 2.

Create a Linux node pool with a Gen 2 VM using the default node pool creation process.

Migrate an existing node pool to Gen 2

If you're using a VM size that only supports Gen 1, you can update your node pool to a VM size that supports Gen 2 using the az aks nodepool update command. This update changes your node image from Gen 1 to Gen 2.

az aks nodepool update --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --node-vm-size <supported-generation-2-vm-size> --os-type Linux

Check if you're using a Gen 2 node image

Verify a successful node pool creation using the az aks nodepool show command and check that the nodeImageVersion contains gen2 in the output.

Next steps