OverconstrainedZonalAllocationRequest error when adding a Nodepool in AKS cluster

Ifiokobong Offiong 56 Reputation points
2022-06-22T15:59:35.67+00:00

I have this error when i try to add a new nodepool to my AKS cluster

(ReconcileVMSSAgentPoolFailed) Code="OverconstrainedZonalAllocationRequest" Message="Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove   
some constraints and try again. Constraints applied are:\n  - Availability Zone\n  - Networking Constraints (such as Accelerated Networking or IPv6)\n  - VM Size\n"  
Code: ReconcileVMSSAgentPoolFailed  
Message: Code="OverconstrainedZonalAllocationRequest" Message="Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n  - Availability Zone\n  - Networking Constraints (such as Accelerated Networking or IPv6)\n  - VM Size\n"  

this is the command i used to add the nodepool

az aks nodepool add --cluster-name mycluster --name mypool --resource-group myrg --node-count 1 --max-pods 100 --max-surge 9 --mode User --node-taints sku=mytaint:NoSchedule --node-vm-size Standard_DC4ds_v3 --vnet-subnet-id $my-subnet_ID --zones 1 2 3 --kubernetes-version 1.21.9 --enable-encryption-at-host  

Any suggestion on how to fix this without me changing the VM_Size? Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,329 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,254 questions
0 comments No comments
{count} vote

Accepted answer
  1. Manu Philip 19,271 Reputation points MVP
    2022-06-23T04:16:37.847+00:00

    I found the reason. The VM Size is not available only in zone 1 of westeurope and you have specified 3 zones. Check it using the cmdlet below:

    az vm list-skus --location westeurope --all true --resource-type virtualMachines --output table  
    

    Select the appropriate VM size from the cmdlet output

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Manu Philip 19,271 Reputation points MVP
    2022-06-22T16:38:39.207+00:00

    As the error message suggests, there is a constraint to the resources in the region where you are trying to deploy the aks :

    Constraints applied are:\n  - Availability Zone\n  - Networking Constraints (such as Accelerated Networking or IPv6)\n  - VM Size\n"  
    

    So, it's a good idea to check the Usage+Quota under subscription blade as below
    Make sure that you have enough quota available for the deployment and the region is supported to deploy the specifications. It could be a capacity issue in one ore multiple zones also

    213937-image.png

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    2 people found this answer helpful.
    0 comments No comments

  2. Ifiokobong Offiong 56 Reputation points
    2022-06-22T22:23:01.04+00:00

    Hi, thank you for your response. When i checked the blade as you suggested in the image, i did not find the VM (Standard_DC4ds_v3 - a DCdsv3-series VM ) listed for West Europe which is where i have my aks cluster deployed

    But this VM is listed as available in West Europe on this link

    It is confusing as the link shows that it is available in West europe, but it is not listed under usage+quotas in my subscription

    1 person found this answer helpful.
    0 comments No comments

  3. Ifiokobong Offiong 56 Reputation points
    2022-06-23T07:30:22.293+00:00

    Thank you very much

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.