|
1 | 1 | --- |
2 | | -title: Troubleshoot the UpgradeFailed error code |
3 | | -description: Learn how to troubleshoot the UpgradeFailed error code when you attempt to upgrade an AKS cluster using the Azure CLI. |
| 2 | +title: Troubleshoot the UpgradeFailed Error |
| 3 | +description: Learn how to troubleshoot the UpgradeFailed error when you try to upgrade an AKS cluster by using the Azure CLI. |
4 | 4 | ms.date: 08/05/2025 |
5 | 5 | editor: v-jsitser |
6 | 6 | ms.reviewer: v-liuamson |
7 | 7 | ms.service: azure-kubernetes-service |
8 | | -#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the UpgradeFailed - AKS upgrade failed due to unsupported Kubernetes version or node pool version skew error code so that I can successfully upgrade an AKS cluster using the Azure CLI. |
| 8 | +#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the "AKS upgrade failed due to unsupported Kubernetes version or node pool version skew" error so that I can successfully upgrade an AKS cluster by using the Azure CLI. |
9 | 9 | ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
10 | 10 | --- |
11 | | -# Error code: UpgradeFailed - AKS upgrade failed due to unsupported Kubernetes version or node pool version skew |
| 11 | +# Troubleshoot a failed AKS cluster upgrade |
12 | 12 |
|
13 | 13 | ## Prerequisites |
14 | 14 |
|
15 | | -This article requires Azure CLI version 2.67.0 or a later version. \ |
16 | | -To find the version number, run az \--version. If you have to install or |
17 | | -upgrade Azure CLI, see [How to install the Azure |
18 | | -CLI](/cli/azure/install-azure-cli). |
| 15 | +This article requires Azure CLI version 2.67.0 or a later version. To find the version number, run `az \--version`. If you have to install or upgrade Azure CLI, see [How to install the Azure CLI](/cli/azure/install-azure-cli). |
19 | 16 |
|
20 | | -For more detailed information about the upgrade process, see the |
21 | | -\"Upgrade an AKS cluster\" section in [Upgrade an Azure Kubernetes |
22 | | -Service (AKS) |
23 | | -cluster](/azure/aks/upgrade-cluster#upgrade-an-aks-cluster). |
| 17 | +For more detailed information about the upgrade process, see the \"Upgrade an AKS cluster\" section in [Upgrade an Azure Kubernetes Service (AKS) cluster](/azure/aks/upgrade-cluster#upgrade-an-aks-cluster). |
24 | 18 |
|
25 | 19 | ## Symptoms |
26 | 20 |
|
27 | | -When attempting to upgrade an AKS cluster using the Azure CLI, the |
28 | | -upgrade operation fails with one or more of the following errors: |
| 21 | +When you try to upgrade an AKS cluster by using the Azure CLI, the upgrade operation fails and returns one or more of the following error messages: |
29 | 22 |
|
30 | | -**(K8sVersionNotSupported)** Managed cluster `ClusterName` is on |
31 | | -version 1.25.6 which is not supported in this region. |
32 | | - |
33 | | -Or \ |
34 | | - \ |
35 | | -**(OperationNotAllowed)** Upgrading Kubernetes version 1.24.9 to 1.26.6 |
36 | | -is not allowed. |
37 | | - |
38 | | -Or |
39 | | - |
40 | | -**(NodePoolMcVersionIncompatible)** Node pool version 1.24.9 and control |
41 | | -plane version 1.29.15 are incompatible. |
| 23 | +> **(K8sVersionNotSupported)** Managed cluster `ClusterName` is on version 1.25.6 which is not supported in this region. |
| 24 | +> |
| 25 | +> **(OperationNotAllowed)** Upgrading Kubernetes version 1.24.9 to 1.26.6 is not allowed. |
| 26 | +> |
| 27 | +> **(NodePoolMcVersionIncompatible)** Node pool version 1.24.9 and control plane version 1.29.15 are incompatible. |
42 | 28 |
|
43 | 29 | ## Cause |
44 | 30 |
|
45 | | -The upgrade failures are due to one or more of the following reasons: |
46 | | - |
47 | | -- The target Kubernetes version (e.g., 1.25 or 1.26) is no longer |
48 | | - supported in the selected Azure region. |
49 | | - |
50 | | -- Skipping minor versions during upgrades (e.g., from 1.24.x to 1.26.x |
51 | | - or 1.27.x) is not allowed unless the current version is unsupported. |
| 31 | +The upgrade failures occur for one or more of the following reasons: |
52 | 32 |
|
53 | | -- A control plane and node pool version skew occurred when attempting |
54 | | - to upgrade only the control plane, causing the following version skew |
55 | | - error: |
| 33 | +- The target Kubernetes version (for example, 1.26 or 1.25) is no longer supported in the selected Azure region. |
56 | 34 |
|
57 | | -- Node pool version is more than 3 minor versions behind the control |
58 | | - plane. |
| 35 | +- A minor version is skipped. Skipping minor versions during upgrades (for example, from 1.24.*x* to 1.26.*x* or 1.27.*x*) is not allowed unless the current version is unsupported. |
59 | 36 |
|
60 | | -To understand more about these errors, you may check the following |
61 | | -articles: |
| 37 | +- A control plane and node pool version skew occurs when you try to upgrade only the control plane. This condition causes the following version skew error: |
62 | 38 |
|
63 | | -- AKS supported Kubernetes versions: |
64 | | - <https://aka.ms/aks-supported-k8s-ver>. |
| 39 | +- The node pool version is more than three minor versions behind the control plane. |
65 | 40 |
|
66 | | -- AKS upgrade version skew policy: |
67 | | - <https://aka.ms/aks/UpgradeVersionRules>. |
| 41 | +To understand more about these errors, see [AKS supported Kubernetes versions](https://aka.ms/aks-supported-k8s-ver) and [AKS upgrade version skew policy](https://aka.ms/aks/UpgradeVersionRules). |
68 | 42 |
|
69 | | -## Solution |
| 43 | +## Resolution |
70 | 44 |
|
71 | | -### Step 1: Confirm the current version and available upgrade paths |
| 45 | +To resolve this issue, follow these steps. |
| 46 | + |
| 47 | +**Step 1:** Verify the current version and available upgrade paths. To view the current Kubernetes version and supported upgrade targets, run the following command: |
72 | 48 |
|
73 | | -Run the following command to view the current Kubernetes version and |
74 | | -supported upgrade targets: |
| 49 | +> az aks get-upgrades \--resource-group \<RG\> \--name \<ClusterName\> \--output table |
75 | 50 |
|
76 | | -**az aks get-upgrades \--resource-group \<RG\> \--name \<ClusterName\> |
77 | | -\--output table** |
| 51 | +If only newer versions, such as 1.29.*x*, are listed, and intermediate versions, such as 1.27.*x*, 1.26.*x*, or 1.25.*x*, are missing, the missing versions are deprecated in your region. |
78 | 52 |
|
79 | | -If only newer versions such as 1.29.x are listed, and intermediate |
80 | | -versions like 1.25.x, 1.26.x, or 1.27.x are missing, this indicates that |
81 | | -those versions are deprecated in your region. |
| 53 | +**Step 2:** Try to run a full upgrade (control plane and node pool together). Because of the version skew policy (control planes can't be more than three minor versions ahead of node pools), a separate control plane-only upgrade might fail. Instead, upgrade both the control plane and node pool together: |
82 | 54 |
|
83 | | -### Step 2: Attempt full upgrade (control plane and node pool together) |
| 55 | +> az aks upgrade \--resource-group \<RG\> \--name \<ClusterName\> \--kubernetes-version \<available upgrade version\> \--yes |
84 | 56 |
|
85 | | -Due to the version skew policy (control planes cannot be more than 3 |
86 | | -minor versions ahead of node pools), a separate control-plane-only |
87 | | -upgrade may fail. Instead, upgrade both the control plane and node pool |
88 | | -together: \ |
89 | | - \ |
90 | | -**az aks upgrade \--resource-group \<RG\> \--name \<ClusterName\> |
91 | | -\--kubernetes-version \<available upgrade version\> \--yes** |
| 57 | +This action ensures compliance with the version skew policy by coordinating a supported Kubernetes version and an upgrade of both components. |
92 | 58 |
|
93 | | -This will ensure compliance with the version skew policy, use of a |
94 | | -supported Kubernetes version and upgrade of both components in a |
95 | | -coordinated manner |
| 59 | +## More information |
96 | 60 |
|
97 | | -## Additional Tips |
| 61 | +- Always verify the supported versions in your region by running the following command: |
98 | 62 |
|
99 | | -- Always validate supported versions in your region using: \ |
100 | | - az aks get-versions \--location \<region\> \--output table |
| 63 | + > az aks get-versions \--location \<region\> \--output table |
101 | 64 |
|
102 | | -- Avoid attempting to upgrade to deprecated versions. AKS may enforce |
103 | | - immediate skips to supported long-term versions (e.g., 1.29) |
| 65 | +- Avoid trying to upgrade to deprecated versions. AKS might enforce immediate skips of supported long-term versions (for example, 1.29). |
104 | 66 |
|
105 | | -- For AKS clusters running significantly outdated Kubernetes versions, |
106 | | - the recommended best practices include: |
| 67 | +- For AKS clusters that are running significantly outdated Kubernetes versions, the recommended best practices include: |
107 | 68 |
|
108 | | -**Create a New Cluster:** Spin up a new AKS cluster with a supported |
109 | | -Kubernetes version. |
| 69 | + **Create a new cluster:** Create an AKS cluster that has a supported Kubernetes version. |
110 | 70 |
|
111 | | -**Migrate Workloads:** Transfer your workloads to the new cluster to |
112 | | -ensure they run on supported versions. |
| 71 | + **Migrate workloads:** Transfer your workloads to the new cluster to make sure that they run on supported versions. |
113 | 72 |
|
114 | | -**Avoid Upgrading Across Multiple Versions:** Instead of upgrading |
115 | | -through several minor versions, moving to a new cluster minimizes |
116 | | -complexity and potential issues. |
| 73 | + **Avoid upgrading across multiple versions:** Instead of upgrading through several minor versions, move to a new cluster to minimize complexity and potential issues. |
117 | 74 |
|
118 | | -**Backup and Validate Data:** Ensure all data is backed up and validated |
119 | | -before migration. |
| 75 | + **Back up and verify data:** Make sure that all data is backed up and verified before the migration. |
120 | 76 |
|
121 | | -**Test Thoroughly:** Perform thorough testing in a staging environment |
122 | | -to identify and resolve any compatibility issues. |
| 77 | + **Test thoroughly:** Perform thorough testing in a staging environment to identify and resolve any compatibility issues. |
123 | 78 |
|
124 | 79 | [!INCLUDE [azure-help-support](../../../includes/azure-help-support.md)] |
0 commit comments