Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Kubernetes Service (AKS) regularly provides new node images, so upgrade your node images frequently to use the latest AKS features. Linux node images are updated weekly, and Windows node images are updated monthly. The AKS release notes include image upgrade announcements. It can take up to two weeks for these updates to roll out across all regions. See the release tracker for roll out status. You can also perform node image upgrades automatically and schedule them by using planned maintenance. For more information, see Automatically upgrade node OS images.
AKS recommends node OS auto-upgrade channels, which automatically upgrade your node images or apply security patches during your maintenance windows without changing the Kubernetes version. If you want to manually upgrade your node images, follow the instructions in this article. This article shows you how to upgrade AKS cluster node images and how to update node pool images without upgrading the Kubernetes version. For information on upgrading the Kubernetes version for your cluster, see Upgrade an AKS cluster.
Important
Starting on November 30, 2025, Azure Kubernetes Service (AKS) no longer supports or provides security updates for Azure Linux 2.0. The Azure Linux 2.0 node image is frozen at the 202512.06.0 release. Beginning on March 31, 2026, node images will be removed, and you'll be unable to scale your node pools. Migrate to a supported Azure Linux version by upgrading your node pools to a supported Kubernetes version or migrating to osSku AzureLinux3. For more information, see the Retirement GitHub issue and the Azure Updates retirement announcement. To stay informed on announcements and updates, follow the AKS release notes.
Note
Clusters that use Node Auto-Provisioning (NAP) automatically update node images when a new image is available. You can configure a maintenance window to control when NAP picks up a new image, but the window doesn't necessarily determine when existing nodes are disrupted. NAP's drift logic, Karpenter Node Disruption Budgets, and Pod Disruption Budgets control how and when disruption occurs. For more information, see Node image updates for NAP.
You can't downgrade a node image version (for example, AKSUbuntu-2404 to AKSUbuntu-2204, or AKSUbuntu-2404-202601.27.0 to AKSUbuntu-2404-202601.13.0).
Prerequisites
- An existing AKS cluster and node pool.
- The Azure CLI installed and signed in to your Azure account.
- Permission to retrieve cluster credentials and read and update the AKS cluster and node pools.
- A Bash shell. The commands in this article use Bash environment variable syntax.
Set environment variables for your resource group, cluster, and node pool names to use in the subsequent commands:
export AKS_RESOURCE_GROUP="<resource-group-name>"
export AKS_CLUSTER="<cluster-name>"
export AKS_NODEPOOL="<node-pool-name>"
Connect to your AKS cluster
Connect to your AKS cluster using the
az aks get-credentialscommand.az aks get-credentials \ --resource-group $AKS_RESOURCE_GROUP \ --name $AKS_CLUSTER
Check for available node image upgrades
Check for available node image upgrades using the
az aks nodepool get-upgradescommand.az aks nodepool get-upgrades \ --nodepool-name $AKS_NODEPOOL \ --cluster-name $AKS_CLUSTER \ --resource-group $AKS_RESOURCE_GROUPIn the output, find and make note of the
latestNodeImageVersionvalue. This value is the latest node image version available for your node pool.Check your current node image version to compare with the latest version using the
az aks nodepool showcommand.az aks nodepool show \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --query nodeImageVersionIf the
nodeImageVersionvalue is different from thelatestNodeImageVersion, you can upgrade your node image.
Upgrade all node images in all node pools
Upgrade all node images in all node pools in your cluster using the
az aks upgradecommand with the--node-image-onlyflag.az aks upgrade \ --resource-group $AKS_RESOURCE_GROUP \ --name $AKS_CLUSTER \ --node-image-only \ --yesYou can check the status of the node images using the
kubectl get nodescommand.Note
This command might differ slightly depending on the shell you use. For more information on Windows and PowerShell environments, see the Kubernetes JSONPath documentation. This command lists each node's name alongside the value of its
kubernetes.azure.com/node-image-versionlabel, which identifies the node's current image version.kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes\.azure\.com\/node-image-version}{"\n"}{end}'When the upgrade completes, use the
az aks showcommand to get the updated node pool details. The current node image is shown in thenodeImageVersionproperty.az aks show \ --resource-group $AKS_RESOURCE_GROUP \ --name $AKS_CLUSTER \ --query "agentPoolProfiles[].{Name:name, NodeImageVersion:nodeImageVersion}"
Upgrade a specific node pool
Update the OS image of a node pool without doing a Kubernetes cluster upgrade using the
az aks nodepool upgradecommand with the--node-image-onlyflag.az aks nodepool upgrade \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --node-image-onlyYou can check the status of the node images with the
kubectl get nodescommand.Note
This command might differ slightly depending on the shell you use. For more information on Windows and PowerShell environments, see the Kubernetes JSONPath documentation. This command lists each node's name alongside the value of its
kubernetes.azure.com/node-image-versionlabel, which identifies the node's current image version.kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes\.azure\.com\/node-image-version}{"\n"}{end}'When the upgrade completes, use the
az aks nodepool showcommand to get the updated node pool details. The current node image is shown in thenodeImageVersionproperty.az aks nodepool show \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --query nodeImageVersion
Upgrade node images with node surge
This procedure upgrades the node image for a specific node pool, not all node pools in the cluster. By default, AKS uses one extra node to configure upgrades. To speed up the node image upgrade process, upgrade your node images by using a customizable node surge value.
Configure the number of surge nodes for the node pool using the
az aks nodepool updatecommand with the--max-surgeflag. This setting persists for subsequent upgrades.Note
To learn more about the trade-offs of various
--max-surgesettings, see Customize node surge upgrade.az aks nodepool update \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --max-surge 33%Upgrade the node image using the
az aks nodepool upgradecommand with the--node-image-onlyflag.az aks nodepool upgrade \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --node-image-onlyYou can check the status of the node images with the
kubectl get nodescommand. This command lists each node's name alongside the value of itskubernetes.azure.com/node-image-versionlabel, which identifies the node's current image version.kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes\.azure\.com\/node-image-version}{"\n"}{end}'Get the updated node pool details using the
az aks nodepool showcommand. The current node image is shown in thenodeImageVersionproperty.az aks nodepool show \ --resource-group $AKS_RESOURCE_GROUP \ --cluster-name $AKS_CLUSTER \ --name $AKS_NODEPOOL \ --query nodeImageVersion
Related content
- For information about the latest node images, see the AKS release notes.
- Learn how to upgrade the Kubernetes version with Upgrade an AKS cluster.
- Automatically apply cluster and node pool upgrades with GitHub Actions.
- Learn more about multiple node pools with Create multiple node pools.
- Learn about upgrading best practices with AKS patch and upgrade guidance.