
A VPC-native GKE cluster takes its addresses from three ranges on one subnet. Each node's primary address comes from the subnet's primary range, while Pod and Service addresses come from secondary ranges on the same subnet through alias IP ranges. Planning a cluster means sizing those three ranges against the largest cluster you will ever run, because at least one of them cannot be changed later. On the Professional Cloud Network Engineer exam, this topic shows up as CIDR arithmetic and as a choice between letting GKE create the ranges and defining them yourself.
A subnet in a VPC network can carry one primary range plus one or more secondary ranges. Alias IP ranges let a VM's network interface own extra addresses from a secondary range in addition to its primary address, and Google Cloud routes traffic for those alias addresses to the VM.
GKE uses the same mechanism. A VPC-native cluster is what IP aliasing provides: nodes take their primary addresses from the subnet's primary range, and Pods and Services take addresses from secondary ranges on that subnet.
There are three ways a cluster's addressing can be set up, and they lead to different results:
gcloud container clusters create with --enable-ip-alias and --create-subnetwork has GKE build the subnet and both secondary ranges automatically. The cluster is VPC-native, but the default Pod range is a /14, which takes far more address space than most clusters need.--no-enable-ip-alias produces a routes-based cluster, which is not VPC-native.Planning up front matters because the Service secondary range cannot be changed once the cluster uses it, and some teams also require every range to be sized once at creation with no later expansion. The approach that holds up is to size each range against the largest number it must ever hold, including nodes added by autoscaling.
Each node takes one address from the subnet's primary range, and Google Cloud reserves four addresses in every primary range. The usable count is therefore the block size minus four. A /26, for example, has 64 addresses and leaves 60 for nodes. To size the node range, add four to the maximum node count and pick the smallest block that holds the total.
GKE gives each node its own block from the Pod secondary range, and nodes do not share blocks. By default, with Pod CIDR overprovisioning left enabled, the block has roughly twice as many addresses as the maximum Pods per node setting. The extra room lets GKE avoid giving a Pod IP address to a new Pod right after another Pod releases it. GKE sizes the block only from the configured maximum, not from how many Pods usually run.
That produces a small set of per-node block sizes:
With overprovisioning turned off, the doubling goes away, so the per-node block only needs to hold the maximum itself and is typically one size smaller.
To size the whole Pod range, multiply the per-node block by the maximum node count, then pick the smallest CIDR that holds the total. A cluster that can grow to 10 nodes at the default maximum of 110 Pods, for example, needs ten /24 blocks, or 2,560 addresses. A /21 holds only 2,048, so the smallest Pod range that fits is a /20 of 4,096.
A prefix one bit longer holds half as many addresses, and so half as many per-node blocks. Because nodes never share a block, a range that holds fewer blocks than the maximum node count stops the cluster from growing to its full size.
Each Service gets one ClusterIP from the Service secondary range, so the range has to hold the largest number of Services the cluster will ever run. Each bit removed from the prefix doubles the address count: a /22 holds 1,024 addresses, a /21 holds 2,048 and a /20 holds 4,096. The right size is the smallest block whose count covers the maximum number of Services.
Because the Service range cannot be changed once the cluster uses it, an underestimate here cannot be corrected later by expanding the range.
The maximum Pods per node setting is the main lever on Pod range size. If workloads never need the default of 110 Pods on a node, lowering the maximum to 64 shrinks each node's block from a /24 to a /25. That halves the per-node block, so the same number of nodes fits in a Pod range one size smaller.
When an organization's RFC 1918 space is fully used, it can build cluster ranges from public blocks it does not own and use them only inside its own network. Google calls this privately used public IP (PUPI) addressing. The node subnet and its Pod and Service secondary ranges can all come from PUPI space.
One default needs attention in that design. By default GKE rewrites the source of Pod traffic to the node IP whenever the destination falls outside the RFC 1918 ranges, and PUPI destinations fall outside those ranges. Traffic from Pods to PUPI destinations therefore arrives with node addresses unless default SNAT is turned off with --disable-default-snat.
For the Professional Cloud Network Engineer exam, we would work through the ranges in order: the node range from the maximum node count plus the four reserved addresses, the Pod range from the per-node block times the maximum node count, and the Service range from the maximum number of Services, each rounded up to the smallest CIDR that fits.
Our Professional Cloud Network Engineer practice exams cover GKE IP address planning alongside private clusters and VPC subnet design, with detailed explanations that drill these distinctions.