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:
Post a Comment