AKS cluster cannot create succeed in own vnet/subnet

Nolan Le 5 Reputation points
2025-02-12T03:15:24.88+00:00

ProvisioningState/failed/VMExtensionProvisioningError

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,266 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Markapuram Sudheer Reddy 665 Reputation points Microsoft Vendor
    2025-02-12T15:07:29.8166667+00:00

    Hi Nolan Le,

    In continuation to above, I have tried working in my tenant its working for me as I can able to create aks cluster within existing vnet and subnet and please follow given below steps to resolve the issue -

    Ensure your Service Principal have Contributor permission.

    Please try to execute below command in Azure Cloud Shell.

    az aks create --resource-group <your resource group name> --name <name of your aks cluster> --node-count <node count> --generate-ssh-keys --service-principal <application(client)ID> --client-secret <client secret> --network-plugin azure --vnet-subnet-id <your subnet ID> --service-cidr <service cidr> --dns-service-ip <your dns service ip>
    

    Make sure that service cidr should not overlap with subnet cidr and dns-service-ip is an IP from the range specified in service cidr. https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/create-upgrade-delete/error-code-servicecidroverlapexistingsubnetscidr

    To find out Subnet ID:User's image

    If you encounter any issue during the execution of above command like "Azure subscription is not registered to use the 'Microsoft.ContainerService' namespace" try to execute below command:

    az provider register --namespace Microsoft.ContainerService
    

    and wait for some time till the registration is completed, you can check by using below command:

    az provider show --namespace Microsoft.ContainerService --query registrationState
    

    If the information is helpful, please click on "Accept Answer" and "Upvote"

    If you have any queries, please do let us know, we will help you.


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.