|
| 1 | +--- |
| 2 | +title: Troubleshoot the AKSCapacityError error code |
| 3 | +description: Discusses how to troubleshoot the AKSCapacityError error when you create or start a Kubernetes cluster. |
| 4 | +ms.date: 05/29/2024 |
| 5 | +author: axelgMS |
| 6 | +ms.author: axelg |
| 7 | +editor: v-jsitser |
| 8 | +ms.reviewer: chiragpa, anbubin, v-leedennis |
| 9 | +ms.service: azure-kubernetes-service |
| 10 | +ms.topic: troubleshooting-problem-resolution |
| 11 | +ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
| 12 | +--- |
| 13 | +# Troubleshoot the AKSCapacityError error code |
| 14 | + |
| 15 | +This article discusses how to identify and resolve the `AKSCapacityError` error that might occur when you create or start a Microsoft Azure Kubernetes Service (AKS) cluster. |
| 16 | + |
| 17 | +## Symptoms |
| 18 | + |
| 19 | +When you try to create or start an AKS cluster, you receive one of the following error messages: |
| 20 | + |
| 21 | +> **Code:** AKSCapacityError |
| 22 | +> |
| 23 | +> **Message 1:** Creating or starting a free tier cluster is unavailable at this time in region \<Region\>. To create a new cluster, we recommend using an alternate region, or create a paid tier cluster. For a list of all the Azure regions, visit <https://aka.ms/aks/regions>. For more details on this error, visit <https://aka.ms/akscapacityerror>. |
| 24 | +> |
| 25 | +> **Message 2:** Creating a new cluster or starting cluster is unavailable at this time in region \<Region>. To create a new cluster, we recommend using an alternate region. For a list of all the Azure regions, visit <https://aka.ms/aks/regions>. For more details on this error, visit <https://aka.ms/akscapacityerror>. |
| 26 | +
|
| 27 | +If you then try to do an operation on that cluster after it doesn't start, you receive the following error message: |
| 28 | + |
| 29 | +> **"statusCode":** "InternalServerError", |
| 30 | +> |
| 31 | +> **"serviceRequestId":** null, |
| 32 | +> |
| 33 | +> **"statusMessage":** "{**\"code\":** \"KubernetesAPICallFailed\", **\"message\":** \"API call to Kubernetes API Server failed.\"}. |
| 34 | +
|
| 35 | +## Cause |
| 36 | + |
| 37 | +You're trying to deploy a cluster in a region that has limited capacity. |
| 38 | + |
| 39 | +When you create or start an AKS cluster, Microsoft Azure allocates compute resources to your subscription. You might occasionally experience the `AKSCapacityError` error because of significant growth in demand for Azure Kubernetes Service in specific regions. |
| 40 | + |
| 41 | +The `KubernetesAPICallFailed` error message indicates that the AKS cluster didn't start and doesn't have an associated control plane. Therefore, calls to the API server are failing. In this case, you have to retry the Start operation. |
| 42 | + |
| 43 | +## Resolution |
| 44 | + |
| 45 | +### Solution 1: Select a different region |
| 46 | + |
| 47 | +The easiest and quickest solution is to try to deploy to a different region (for example, NorthEurope instead of WestEurope or UAENorth instead of QatarCentral). To find nearby regions, visit the [Azure Geographies page](https://azure.microsoft.com/explore/global-infrastructure/geographies/#overview). |
| 48 | + |
| 49 | +This approach might not be feasible if you already have existing resources in the requested region, but it's the preferred solution in a dev/test scenario. |
| 50 | + |
| 51 | +### Solution 2: Try deploying a cluster that has different settings |
| 52 | + |
| 53 | +The infrastructure that hosts AKS managed clusters have different allocation reservations. Therefore, AKS might have more capacity for public clusters than for private clusters. If you encounter the `AKSCapacityError` error when you try to create a private cluster, try to create a public cluster instead or vice versa. |
| 54 | + |
| 55 | +### Solution 3: Use an Azure Enterprise subscription |
| 56 | + |
| 57 | +When capacity is running low, we limit free tier AKS clusters for customers who don't have an Enterprise Agreement (EA) subscription first in order to reserve resources for real production scenarios. Make sure that you use an EA subscription to create your AKS cluster. |
| 58 | + |
| 59 | +### Solution 4: Retry the operation |
| 60 | + |
| 61 | +Capacity is often reclaimed when other users stop or delete their AKS clusters. Therefore, the operation might succeed if you retry it later. |
| 62 | + |
| 63 | +## More information |
| 64 | + |
| 65 | +- Ensuring capacity for users is a top priority for Microsoft, and we're working around the clock to reach this goal. The increasing popularity of Azure services emphasizes the need for us to scale up our infrastructure even more rapidly. With that in mind, we're expediting expansions and improving our resource deployment process to respond to strong customer demand. We're also adding a large amount of compute infrastructure monthly. |
| 66 | + |
| 67 | + We have identified several methods to improve how we load-balance under a high-resource-usage situation, and how to trigger the timely deployment of needed resources. Additionally, we're significantly increasing our capacity, and will continue to plan for strong demand across all regions. [This September 2021 Azure Blog article](https://azure.microsoft.com/blog/advancing-reliability-through-a-resilient-cloud-supply-chain/) discusses improvements that we're making toward delivering a resilient cloud supply chain. |
| 68 | + |
| 69 | +- [General troubleshooting of AKS cluster creation issues](troubleshoot-aks-cluster-creation-issues.md) |
| 70 | + |
| 71 | +[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)] |
0 commit comments