There is a private GKE regional cluster with master-ipv4-cidr set to 172.16.0.0./28?
Can an additional private GKE regional cluster ( in another region ) with same master-ipv4-cidr 172.16.0.0./28 be created without causing any conflict to either the existing cluster or the new cluster?
The CIDR range used for the control plane (--master-ipv4-cidr
) must be unique with the same VPC. So if you are creating two clusters in different regions but on the same VPC, the ranges must be unique. You can use something like https://www.calculator.net/ip-subnet-calculator.html?cclass=any&csubnet=28&cip=172.16.0.0&ctype=ipv4&printit=0&x=78&y=19 to find the next range.
You can find the documentation on the uniqueness requirement under https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#private_cp. You'll need to scroll down until you see the description for --master-ipv4-cidr
:
--master-ipv4-cidr 172.16.0.0/28 specifies an internal IP address range for the control plane (optional for Autopilot). This setting is permanent for this cluster and must be unique within the VPC. The use of non RFC 1918 internal IP addresses is supported.