Skip to content

Commit 071d119

Browse files
authored
Merge pull request #8724 from mosbahmajed/workitem86555
AB#5507: Update nodepools-not-upgraded-to-gen2-during-node-image-upgrade.md
2 parents 69b8e7c + e2de168 commit 071d119

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed
Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,65 @@
11
---
2-
title: Windows nodepools not upgraded to Gen2 during cluster node image upgrade
3-
description: Troubleshoot why Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
4-
ms.date: 11/20/2024
2+
title: Windows Node Pools Not Upgraded to Gen2 During Cluster Node Image Upgrade
3+
description: Troubleshoot an issue that prevents Windows Server node pools from upgrading automatically to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
4+
ms.date: 04/17/2025
55
editor: v-jsitser
6-
ms.reviewer: chiragpa, cssakscic, v-leedennis
6+
ms.reviewer: chiragpa, cssakscic, momajed
77
ms.service: azure-kubernetes-service
8-
#Customer intent: As an Azure Kubernetes Services (AKS) user, I want to troubleshoot why Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Azure Kubernetes Service (AKS).
9-
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool)
8+
#Customer intent: As an Azure Kubernetes Services (AKS) user, I want to troubleshoot why Windows Server node pools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Azure Kubernetes Service (AKS).
9+
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or node pool)
1010
---
11-
# Windows Server nodepools not upgraded to Gen2 during cluster node image upgrade
1211

13-
This article discusses how to troubleshoot a scenario in which Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Microsoft Azure Kubernetes Service (AKS).
12+
# Windows Server node pools not upgraded to Gen2 during cluster node image upgrade
13+
14+
This article discusses how to troubleshoot a scenario in which Windows Server node pools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Microsoft Azure Kubernetes Service (AKS).
1415

1516
> [!NOTE]
16-
> This scenario doesn't apply to Gen2 VMs on Linux nodepools.
17+
> This scenario doesn't apply to Gen2 VMs on Linux node pools.
1718
1819
## Prerequisites
1920

20-
- [Azure CLI](/cli/azure/install-azure-cli)
21+
- Azure CLI version 2.0.81 or later. See [Install Azure CLI](/cli/azure/install-azure-cli) for installation instructions.
2122

2223
## Symptoms
2324

24-
Existing Windows Server nodepools don't get upgraded from Gen1 to Gen2 when you [upgrade the node image](/azure/aks/node-image-upgrade) by using one of the following methods in Azure CLI:
25+
Existing Windows Server node pools don't get upgraded from Gen1 to Gen2 when you [upgrade the node image](/azure/aks/node-image-upgrade) by using one of the following methods in Azure CLI:
2526

26-
- An entire cluster upgrade (by using the [az aks upgrade](/cli/azure/aks#az-aks-upgrade) command)
27+
- An entire cluster upgrade (by using the [`az aks upgrade`](/cli/azure/aks#az-aks-upgrade) command)
2728

28-
- A specific nodepool upgrade (by using the [az aks nodepool upgrade](/cli/azure/aks/nodepool#az-aks-nodepool-upgrade) command)
29+
- A specific node pool upgrade (by using the [`az aks nodepool upgrade`](/cli/azure/aks/nodepool#az-aks-nodepool-upgrade) command)
2930

3031
## Cause
3132

32-
### Cause 1: Existing nodepools aren't automatically upgraded to Gen2 VMs
33+
### Cause 1: Existing node pools aren't automatically upgraded to Gen2 VMs
3334

34-
By design, a node image upgrade doesn't support updating or upgrading existing nodepools. The `az aks upgrade` and `az aks nodepool upgrade` commands upgrade only the node image (to a later node image version). Those commands don't upgrade the corresponding VM generation.
35+
By design, a node image upgrade doesn't support updating or upgrading existing node pools. The `az aks upgrade` and `az aks nodepool upgrade` commands upgrade only the node image (to a later node image version). These commands don't upgrade the corresponding VM generation.
3536

3637
### Cause 2: Cluster upgrade to Kubernetes version 1.25 or a later version upgrades only the OS
3738

38-
When you upgrade your cluster to Kubernetes version 1.25 or a later version, only the operating system (OS) is upgraded (to Windows Server 2022). Existing nodepools aren't affected. The associated VM scale set will contain VMs that have the same Gen1 VM.
39+
When you upgrade your cluster to Kubernetes version 1.25 or a later version, only the operating system (OS) is upgraded (to Windows Server 2022). Existing node pools aren't affected. The associated Azure Virtual Machine Scale Sets contain VMs that have the same Gen1 VM.
3940

40-
### Cause 3: Cluster upgraded and new nodepool created by using Windows Server 2022 without specifying a valid VM size
41+
### Cause 3: Cluster upgraded and new node pool created by using Windows Server 2022 without specifying a valid VM size
4142

42-
After you upgrade the cluster to Kubernetes version 1.25 or a later version, you specify Windows Server 2022 as the OS to use on the nodepool's VMs. However, the VMs don't use a Gen2 node image reference because of one of the following reasons:
43+
After you upgrade the cluster to Kubernetes version 1.25 or a later version, you specify Windows Server 2022 as the OS to use on the node pool's VMs. However, the VMs don't use a Gen2 node image reference for one of the following reasons:
4344

4445
- You don't specify a VM size, and the default VM size in the region doesn't support Gen2 VMs.
4546

4647
- You specify a Gen1-only VM size.
4748

48-
When you upgrade the default OS from Windows Server 2019 (`Windows2019`) to Windows Server 2022 (`Windows2022`), the existing nodepools aren't automatically upgraded to a different VM generation.
49+
When you upgrade the default OS from Windows Server 2019 (`Windows2019`) to Windows Server 2022 (`Windows2022`), the existing node pools aren't automatically upgraded to a different VM generation.
4950

5051
## Solution
5152

52-
Upgrade the cluster, and then create a new Windows Server nodepool that supports [Gen2 VM sizes](/azure/virtual-machines/generation-2) on that cluster according to the following guidelines.
53+
Upgrade the cluster, and then create a new Windows Server node pool that supports [Gen2 VM sizes](/azure/virtual-machines/generation-2) on that cluster according to the following guidelines.
5354

5455
| Kubernetes cluster upgrade version | Cluster creation guidelines |
5556
|---|---|
56-
| 1.25 or a later version | When you run the [az aks create](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--node-vm-size` parameter to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
57-
| Earlier version than 1.25 | When you run the [az aks create](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--os-sku` parameter value to `Windows2022`, and set the `--node-vm-size` parameter value to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
57+
| 1.25 or a later version | When you run the [`az aks create`](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--node-vm-size` parameter to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
58+
| Any version earlier than 1.25 | When you run the [`az aks create`](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--os-sku` parameter value to `Windows2022`, and set the `--node-vm-size` parameter value to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
59+
5860

5961
> [!NOTE]
60-
> If you specify a Gen2 VM size and the operating system as Windows Server 2019, you receive an `ErrorCode_Windows2019NotSupportedWithGen2VM` error code that's accompanied by the following error message:
62+
> If you specify a Gen2 VM size and set the operating system as Windows Server 2019, you receive an `ErrorCode_Windows2019NotSupportedWithGen2VM` error code that's accompanied by the following error message:
6163
>
6264
> > \<virtual-machine-size> is a Gen 2-only VM. Windows2019 does not support Gen 2 VMs. However, you can select a Gen 1 VM size or set os_sku to 2022.
6365
>
@@ -66,5 +68,11 @@ Upgrade the cluster, and then create a new Windows Server nodepool that supports
6668
> - Pick a Gen1 VM size to use together with Windows Server 2019.
6769
>
6870
> - Set the operating system SKU to **Windows Server 2022** to use together with your Gen2 VM.
71+
>
72+
> - Before you create a new node pool, verify that the VM size supports Gen2 VMs in your region. To do this, run `az vm list-sizes --location <region> --query "[?contains(name, 'v2')].name" --output table`.
73+
>
74+
> - To verify the current and available node image versions, run the following commands:
75+
> - To check the current version: `az aks nodepool show --resource-group <resource-group> --cluster-name <cluster-name> --name <nodepool-name> --query nodeImageVersion`
76+
> - To check the latest available version: `az aks nodepool get-upgrades --resource-group <resource-group> --cluster-name <cluster-name> --nodepool-name <nodepool-name> --query latestNodeImageVersion`
6977
7078
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)