|
| 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. |
| 4 | +ms.date: 08/05/2025 |
| 5 | +editor: v-jsitser |
| 6 | +ms.reviewer: v-liuamson |
| 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. |
| 9 | +ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
| 10 | +--- |
| 11 | +# Error code: UpgradeFailed - AKS upgrade failed due to unsupported Kubernetes version or node pool version skew |
| 12 | + |
| 13 | +## Prerequisites |
| 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](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). |
| 19 | + |
| 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](https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster#upgrade-an-aks-cluster). |
| 24 | + |
| 25 | +## Symptoms |
| 26 | + |
| 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: |
| 29 | + |
| 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. |
| 42 | + |
| 43 | +## Cause |
| 44 | + |
| 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. |
| 52 | + |
| 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: |
| 56 | + |
| 57 | +- Node pool version is more than 3 minor versions behind the control |
| 58 | + plane. |
| 59 | + |
| 60 | +To understand more about these errors, you may check the following |
| 61 | +articles: |
| 62 | + |
| 63 | +- AKS supported Kubernetes versions: |
| 64 | + <https://aka.ms/aks-supported-k8s-ver>. |
| 65 | + |
| 66 | +- AKS upgrade version skew policy: |
| 67 | + <https://aka.ms/aks/UpgradeVersionRules>. |
| 68 | + |
| 69 | +## Solution |
| 70 | + |
| 71 | +### Step 1: Confirm the current version and available upgrade paths |
| 72 | + |
| 73 | +Run the following command to view the current Kubernetes version and |
| 74 | +supported upgrade targets: |
| 75 | + |
| 76 | +**az aks get-upgrades \--resource-group \<RG\> \--name \<ClusterName\> |
| 77 | +\--output table** |
| 78 | + |
| 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. |
| 82 | + |
| 83 | +### Step 2: Attempt full upgrade (control plane and node pool together) |
| 84 | + |
| 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** |
| 92 | + |
| 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 |
| 96 | + |
| 97 | +## Additional Tips |
| 98 | + |
| 99 | +- Always validate supported versions in your region using: \ |
| 100 | + az aks get-versions \--location \<region\> \--output table |
| 101 | + |
| 102 | +- Avoid attempting to upgrade to deprecated versions. AKS may enforce |
| 103 | + immediate skips to supported long-term versions (e.g., 1.29) |
| 104 | + |
| 105 | +- For AKS clusters running significantly outdated Kubernetes versions, |
| 106 | + the recommended best practices include: |
| 107 | + |
| 108 | +**Create a New Cluster:** Spin up a new AKS cluster with a supported |
| 109 | +Kubernetes version. |
| 110 | + |
| 111 | +**Migrate Workloads:** Transfer your workloads to the new cluster to |
| 112 | +ensure they run on supported versions. |
| 113 | + |
| 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. |
| 117 | + |
| 118 | +**Backup and Validate Data:** Ensure all data is backed up and validated |
| 119 | +before migration. |
| 120 | + |
| 121 | +**Test Thoroughly:** Perform thorough testing in a staging environment |
| 122 | +to identify and resolve any compatibility issues. |
| 123 | + |
| 124 | +[!INCLUDE [azure-help-support](../../../includes/azure-help-support.md)] |
0 commit comments