Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure Kubernetes Service (AKS) regularly provides new node images, so it's beneficial to upgrade your node images frequently to use the latest AKS features. Linux node images are updated weekly, and Windows node images are updated monthly. Image upgrade announcements are included in the AKS release notes, and it can take up to a week for these updates to be rolled out across all regions. You can also perform node image upgrades automatically and schedule them using planned maintenance. For more information, see Automatically upgrade node images.
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.
Note
The AKS cluster must use virtual machine scale sets for the nodes.
It's not possible to downgrade a node image version (for example AKSUbuntu-2204 to AKSUbuntu-1804, or AKSUbuntu-2204-202308.01.0 to AKSUbuntu-2204-202307.27.0).
Check for available node image upgrades using the az aks nodepool get-upgrades
command.
az aks nodepool get-upgrades \
--nodepool-name <node-pool-name> \
--cluster-name <cluster-name> \
--resource-group <resource-group>
In the output, find and make note of the latestNodeImageVersion
value. 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 show
command.
az aks nodepool show \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--name <node-pool-name> \
--query nodeImageVersion
If the nodeImageVersion
value is different from the latestNodeImageVersion
, you can upgrade your node image.
Upgrade all node images in all node pools in your cluster using the az aks upgrade
command with the --node-image-only
flag.
az aks upgrade \
--resource-group <resource-group> \
--name <cluster-name> \
--node-image-only
You can check the status of the node images using the kubectl get nodes
command.
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.
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 show
command to get the updated node pool details. The current node image is shown in the nodeImageVersion
property.
az aks show \
--resource-group <resource-group> \
--name <cluster-name>
Update the OS image of a node pool without doing a Kubernetes cluster upgrade using the az aks nodepool upgrade
command with the --node-image-only
flag.
az aks nodepool upgrade \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--name <node-pool-name> \
--node-image-only
You can check the status of the node images with the kubectl get nodes
command.
Note
This command may differ slightly depending on the shell you use. For more information on Windows and PowerShell environments, see the Kubernetes JSONPath documentation.
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 show
command to get the updated node pool details. The current node image is shown in the nodeImageVersion
property.
az aks nodepool show \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--name <node-pool-name>
To speed up the node image upgrade process, you can upgrade your node images using a customizable node surge value. By default, AKS uses one extra node to configure upgrades.
Upgrade node images with node surge using the az aks nodepool update
command with the --max-surge
flag to configure the number of nodes used for upgrades.
Note
To learn more about the trade-offs of various --max-surge
settings, see Customize node surge upgrade.
az aks nodepool update \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--name <node-pool-name> \
--max-surge 33% \
--no-wait
You can check the status of the node images with the kubectl get nodes
command.
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 show
to get the updated node pool details. The current node image is shown in the nodeImageVersion
property.
az aks nodepool show \
--resource-group <resource-group> \
--cluster-name <cluster-name> \
--name <node-pool-name>
Azure Kubernetes Service feedback
Azure Kubernetes Service is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Apply cluster upgrades and security patches with Azure Kubernetes Service - Training
Apply the latest version upgrades and patches to your Azure Kubernetes Service clusters.