You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/azure-kubernetes/create-upgrade-delete/nodepools-not-upgraded-to-gen2-during-node-image-upgrade.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Windows node pools not upgraded to Gen2 during cluster node image upgrade
3
-
description: Troubleshoot why Windows Server node pools don't get upgraded automatically from Gen1 to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
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 from Gen1 to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
4
4
ms.date: 04/17/2025
5
5
editor: v-jsitser
6
6
ms.reviewer: chiragpa, cssakscic, momajed
@@ -32,15 +32,15 @@ Existing Windows Server node pools don't get upgraded from Gen1 to Gen2 when you
32
32
33
33
### Cause 1: Existing node pools aren't automatically upgraded to Gen2 VMs
34
34
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). 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.
36
36
37
37
### Cause 2: Cluster upgrade to Kubernetes version 1.25 or a later version upgrades only the OS
38
38
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 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.
40
40
41
41
### Cause 3: Cluster upgraded and new node pool created by using Windows Server 2022 without specifying a valid VM size
42
42
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 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:
44
44
45
45
- You don't specify a VM size, and the default VM size in the region doesn't support Gen2 VMs.
46
46
@@ -52,15 +52,14 @@ When you upgrade the default OS from Windows Server 2019 (`Windows2019`) to Wind
52
52
53
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.
54
54
55
-
56
55
| Kubernetes cluster upgrade version | Cluster creation guidelines |
57
56
|---|---|
58
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). |
59
-
|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). |
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). |
60
59
61
60
62
61
> [!NOTE]
63
-
> 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:
64
63
>
65
64
> > \<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.
66
65
>
@@ -70,8 +69,10 @@ Upgrade the cluster, and then create a new Windows Server node pool that support
70
69
>
71
70
> - Set the operating system SKU to **Windows Server 2022** to use together with your Gen2 VM.
72
71
>
73
-
> - Before you create a new node pool, verify that the VM size supports Gen2 VMs in your region by running`az vm list-sizes --location <region> --query "[?contains(name, 'v2')].name" --output table`.
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`.
74
73
>
75
-
> - To confirm the current and available node image versions, run `az aks nodepool show --resource-group <resource-group> --cluster-name <cluster-name> --name <nodepool-name> --query nodeImageVersion` to check the current version, and `az aks nodepool get-upgrades --resource-group <resource-group> --cluster-name <cluster-name> --nodepool-name <nodepool-name> --query latestNodeImageVersion` to check the latest available version.
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`
76
77
77
78
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
0 commit comments