Събитие
Създаване на интелигентни приложения
17.03, 21 ч. - 21.03, 10 ч.
Присъединете се към поредицата срещи, за да изградите мащабируеми AI решения, базирани на реални случаи на употреба с колеги разработчици и експерти.
Регистрирайте се сегаТози браузър вече не се поддържа.
Надстройте до Microsoft Edge, за да се възползвате от най-новите функции, актуализации на защитата и техническа поддръжка.
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.
Бележка
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.
Бележка
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.
Бележка
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.
Бележка
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
Azure Kubernetes Service е проект с отворен код. Изберете връзка, за да предоставите обратна връзка:
Събитие
Създаване на интелигентни приложения
17.03, 21 ч. - 21.03, 10 ч.
Присъединете се към поредицата срещи, за да изградите мащабируеми AI решения, базирани на реални случаи на употреба с колеги разработчици и експерти.
Регистрирайте се сегаОбучение
Модул
Apply cluster upgrades and security patches with Azure Kubernetes Service - Training
Apply the latest version upgrades and patches to your Azure Kubernetes Service clusters.
Документация
AKS day-2 guide: Patch and upgrade guidance - Azure Architecture Center
Learn about day-2 patching and upgrading practices for Azure Kubernetes Service (AKS) worker nodes and Kubernetes versions.
Upgrade options for Azure Kubernetes Service (AKS) clusters - Azure Kubernetes Service
Learn the different ways to upgrade an Azure Kubernetes Service (AKS) cluster.
Handle Linux node reboots with kured - Azure Kubernetes Service
Learn how to update Linux nodes and automatically reboot them with kured in Azure Kubernetes Service (AKS)