About Me

My photo
I am MCSE in Data Management and Analytics with specialization in MS SQL Server and MCP in Azure. I have over 13+ years of experience in IT industry with expertise in data management, Azure Cloud, Data-Canter Migration, Infrastructure Architecture planning and Virtualization and automation. Contact me if you are looking for any sort of guidance in getting your Infrastructure provisioning automated through Terraform. I sometime write for a place to store my own experiences for future search and read by own blog but can hopefully help others along the way. Thanks.

The specified service CIDR [IP range] is conflicted with an existing subnet CIDR [IP range]" is caused by a conflict between the service CIDR (Cluster IPs) specified in the az aks create command and the CIDR of an existing subnet in the virtual network

Issue:- 

(ServiceCidrOverlapExistingSubnetsCidr) The specified service CIDR 10.0.0.0/16 is conflicted with an existing subnet CIDR 10.0.0.0/24

Code: ServiceCidrOverlapExistingSubnetsCidr

Message: The specified service CIDR 10.0.0.0/16 is conflicted with an existing subnet CIDR 10.0.0.0/24

Target: networkProfile.serviceCIDR


Explanation of this error:-

The error message "The specified service CIDR 10.0.0.0/16 is conflicted with an existing subnet CIDR 10.0.0.0/24" is caused when the service CIDR (Cluster IPs) you specified in the az aks create command overlaps with the CIDR of an existing subnet in the virtual network.

The service CIDR is the IP range that is used by the Kubernetes services in the AKS cluster. It must be different from the CIDR of any existing subnets in the virtual network.

Here are a few things you can try to fix this error:

Choose a different service CIDR range that does not overlap with any existing subnets in the virtual network.

If you have the necessary permissions, you can change the CIDR of the existing subnet to a different range that does not overlap with the service CIDR.

If you don't have the necessary permissions to change the existing subnet, you can use a different VNet or create a new VNet with a different CIDR range and use it to create the AKS cluster.


If you already created the cluster and this error occured, you can use az aks update command to update the service CIDR,

az aks update --resource-group myResourceGroup --name myAKSCluster --service-cidr 10.1.0.0/16

Please note that, it is important to adjust the parameters like resource group name, location, cluster name, and CIDR as per your requirement and also make sure that you have the necessary permissions to create resources in the specified resource group and location.



No comments: