Skip to content
Aviato Consulting
Google Cloud Architecture Tool

GKE IP Address & CIDR Calculator

Size Google Kubernetes Engine (GKE) Node, Pod, and Service CIDR ranges in seconds. Built on official Google Cloud IPAM formulas for GKE Autopilot & Standard (8–256 pods/node), GKE-Managed Services, and Private Service Connect.

Preset:

1. Network & Cluster Parameters

65,536 IPs
4,092 node IPs
/16 (65,532 nodes) 4 GCP reserved IPs deducted /29 (4 nodes)
/26 per node (64 IPs)
512 node blocks
/14 (262k IPs) 32,768 Pod IPs /24 (256 IPs)
4,096 Services
Calculated Capacity

2. Cluster Limits & Subnet Plan

Max Clusters
1
in 10.0.0.0/16
Max Nodes / Cluster
510
170 per zone
Max Pods / Cluster
16,320
32 pods / node
Max Services
4,096
GKE-Managed
Node count is limited by the Pod range (/17 = 512 node blocks).

Assigned IP Ranges

Subnet CIDR Start – End IP Capacity
Remaining unallocated IP blocks in network ▾
View generated gcloud & Terraform commands ▾
gcloud CLI
 
Terraform
 

Need a hand planning your Shared VPC or GKE migration?

Talk directly with an Aviato Google Cloud Principal Architect—no SDRs, no slide decks.

Book a 20-Min Architecture Call →
Quick Summary

The 3 IP Address Ranges Every GKE Cluster Needs

Unlike traditional virtual machines that only need a single IP address per server, a Google Kubernetes Engine (GKE) cluster is a miniature network inside your Google Cloud Virtual Private Cloud (VPC). Every cluster coordinates three distinct pools of IP addresses:

1. Primary Subnet Range

Node IP Addresses

Assigned to the underlying Compute Engine virtual machines (Nodes) that run your containers. Every node takes 1 IP from the subnet's primary CIDR range, minus 4 reserved GCP subnet IPs.

2. Secondary Alias Range

Pod IP Addresses

Assigned to individual application containers (Pods) running on those nodes. GKE carves this secondary range into fixed blocks (e.g., /26 or /24) and hands one whole block to each node at boot time.

3. ClusterIP Virtual IPs

Service IP Addresses

Internal load-balancing virtual IPs (Services) that give dynamic Pods a single stable address inside the cluster. Modern GKE clusters use Google's 34.118.224.0/20 range so Services consume 0 VPC IPs.

GKE Networking Explained for Beginners: How Nodes, Pods, and Subnets Fit Together

If you are new to Kubernetes or Google Cloud networking, seeing a single cluster ask for thousands of IP addresses—and three separate CIDR blocks—can feel overwhelming. The easiest way to picture GKE networking is to think of your cluster as an apartment complex inside a gated corporate campus:

  • The VPC (Virtual Private Cloud) is your private campus road network: It owns a large block of private IPv4 addresses (typically from RFC 1918 space like 10.0.0.0/16, which holds 65,536 total addresses).
  • Nodes are the apartment buildings (Virtual Machines): Each Node is a Compute Engine VM that needs its own street address on the main road. That street address comes from your subnet's Primary IP Range.
  • Pods are the individual apartments inside each building: A Pod is the smallest deployable unit in Kubernetes—usually one running application container. In GKE's VPC-native (Alias IP) networking mode, every single Pod gets its own routable internal IP address from a Secondary Pod IP Range. Because these Pod IPs are natively understood by Google Cloud's Andromeda software-defined network, Pods on different VMs (or other GCP services like Cloud SQL and Memorystore) can talk directly to each other without slow Network Address Translation (NAT) overlays.
  • Services are the building's front-desk switchboard: Because Pods are ephemeral—constantly scaling up, crashing, or being replaced with brand-new Pod IPs during deployments—other microservices shouldn't hardcode a Pod's IP. A Kubernetes Service (ClusterIP) creates a permanent virtual IP address that automatically forwards traffic to whichever healthy Pods match that service right now.

Quick CIDR Refresher: Why Does /17 Have More IPs Than /24?

In IPv4 networking, CIDR notation (like 10.0.0.0/20) tells you how many of the 32 bits in an IP address are locked for the network prefix versus left free for individual hosts. The total number of IP addresses in any CIDR block is 2(32 - prefix):

  • Smaller slash numbers = Bigger networks: A /16 leaves 16 bits free (216 = 65,536 IPs). A /17 cuts that in half (215 = 32,768 IPs).
  • Larger slash numbers = Smaller networks: A /24 leaves 8 bits free (28 = 256 IPs). A /26 leaves 6 bits free (26 = 64 IPs). Every time you increase the slash number by +1, you halve the number of IP addresses.

The #1 Beginner Trap: Why GKE Reserves 2x Your Max Pods per Node

The most common mistake in GKE capacity planning is assuming that if your cluster runs 200 Pods, you only need 200 Pod IP addresses. GKE does not hand out Pod IPs one by one from a shared pool. Instead, the moment a new Node VM boots up, GKE slices a fixed CIDR block out of your Pod Secondary Range and assigns that entire block exclusively to that Node.

Even more importantly, GKE reserves a CIDR block with at least twice as many IP addresses as your configured Max Pods per Node. Google Cloud enforces this 2x buffer so that when Kubernetes performs a rolling update or terminates old Pods while starting replacement Pods on the same node, the Linux kernel and CNI plugin never run out of free addresses mid-transition.

For example, in a GKE Standard cluster using the default of 110 Pods per node:

  1. Double the target Pod count: 110 × 2 = 220 IPs.
  2. Round up to the next power of two: 256 IPs, which is a /24 subnet slice.
  3. Result: Every single node locks 256 Pod IPs the instant it starts—even if that node is currently running only 2 Pods! If your Pod secondary range is a /21 (2,048 IPs), your cluster hits a hard ceiling of 2,048 ÷ 256 = 8 nodes, even if your Node subnet has room for 1,000 VMs.
Max Pods per Node Per-Node Pod CIDR Pod IPs Locked per Node Recommended Use Case
8 Pods / node /28 16 IPs Tight RFC 1918 Shared VPCs or large single-tenant GPU/database nodes
16 Pods / node /27 32 IPs Compact dev/test clusters or small machine types (e2-medium / n2-standard-2)
32 Pods / node Autopilot Default /26 64 IPs Default for GKE Autopilot and best-practice starting point for most production clusters
64 Pods / node /25 128 IPs High-density microservice node pools (8+ vCPUs per node)
110 Pods / node Standard Default /24 256 IPs Default for GKE Standard; only keep if you have ample /14–/16 Pod IP space
128 Pods / node /24 256 IPs Same /24 footprint as 110 Pods/node, unlocking 18 extra Pods per node for free
256 Pods / node /23 512 IPs Very large 32–128+ vCPU nodes running hundreds of lightweight sidecar/daemon Pods

Why Modern GKE Clusters Save Massive Amounts of IP Space

If you have used older GKE calculators (including Google's original 2019 IPAM web app), you might notice they force you to allocate a Service subnet and a /28 master subnet out of your precious RFC 1918 VPC space. Our calculator incorporates three major modern GKE networking improvements:

  • GKE-Managed Service Ranges (34.118.224.0/20): ClusterIP Services only need to be reachable inside the cluster itself. When you choose GKE-Managed Service Range, GKE uses Google's privately routed 34.118.224.0/20 range (4,096 Services). It uses 0 IPs from your VPC, and every cluster in your estate can reuse the exact same range without conflict.
  • Private Service Connect (PSC) Control Planes: Previously, creating a Private GKE Cluster required VPC Network Peering between your VPC and Google's tenant project, consuming a unique /28 subnet (16 IPs) per cluster. Modern GKE clusters use Private Service Connect (PSC) to expose the Kubernetes API endpoint inside your VPC with 0 extra peering subnets.
  • Regional Zone Balancing: A Regional GKE cluster spreads nodes evenly across 3 availability zones (for example, australia-southeast1-a, -b, and -c) for high availability. That is why our calculator rounds the safe node ceiling to a multiple of your active zones and shows your per-zone node capacity.

Where Our Calculations Come From: Official Google Cloud Documentation & Formulas

Every number in the Aviato GKE IP Calculator is derived directly from Google Cloud's official Kubernetes Engine networking formulas and Google's open-source IP Address Management (IPAM) reference implementation. Specifically, the calculator evaluates:

  1. Usable Node IPs from Primary Subnet: Max_Nodes_From_Subnet = 2(32 - node_netmask) - 4 (accounting for the 4 reserved IPv4 addresses in every Google Cloud subnet: network address, default gateway, second-to-last reserved IP, and broadcast address).
  2. Per-Node Pod Prefix Length: Node_Pod_Netmask = clamp(31 - ceil(log2(Max_Pods_Per_Node)), 23, 28).
  3. Max Nodes Supported by Pod Secondary Range: Max_Nodes_From_Pods = floor(2(32 - pod_netmask) / 2(32 - Node_Pod_Netmask)).
  4. Effective Cluster Node Ceiling: Raw_Max_Nodes = min(Max_Nodes_From_Subnet, Max_Nodes_From_Pods), rounded down to an even multiple of active cluster zones (Raw_Max_Nodes - (Raw_Max_Nodes mod Zones)).
  5. Multi-Cluster Subnet Bin-Packing: To calculate how many identically sized GKE clusters fit inside your available supernet (e.g., 10.0.0.0/16), we sort all requested primary, secondary, and control plane CIDRs from largest block (smallest prefix number) to smallest block to ensure natural CIDR boundary alignment with zero fragmentation, then compute the exact remaining unallocated CIDR blocks.

You can verify all underlying formulas and platform limits in the official Google Cloud documentation:

Related Google Cloud Architecture Tools & Guides

FAQ

GKE IP Calculator & Networking FAQs

How does GKE calculate the IP address range needed for Pods on each node?

GKE uses a "2x rule" based on the maximum number of Pods per node (`--max-pods-per-node`). To protect against IP exhaustion while Pods are terminating and being replaced, GKE reserves a subnet slice for each node with at least twice as many IP addresses as the configured maximum Pods per node. Specifically, the per-node Pod netmask is calculated as `31 - ceil(log2(max_pods_per_node))`. For example, the GKE Standard default of 110 Pods per node reserves a `/24` (256 IPs) per node, while the GKE Autopilot default of 32 Pods per node reserves a `/26` (64 IPs) per node.

Why did my GKE cluster run out of Pod IP addresses when I only have a few Pods running?

In a VPC-native GKE cluster, Pod IP addresses are allocated to nodes in fixed blocks when each node (VM) boots—not one-by-one as individual Pods start. If your cluster uses the Standard default of 110 max Pods per node, every single node locks an entire `/24` block (256 Pod IPs) from your Pod secondary range immediately. Even if a node only runs 3 Pods, all 256 IPs in its `/24` slice are unavailable to other nodes. Reducing `--max-pods-per-node` (for example, to 32 or 64) or adding a secondary Pod CIDR via discontinuous multi-Pod CIDR ranges resolves this bottleneck.

What is the difference between GKE Autopilot and GKE Standard default IP ranges?

GKE Autopilot defaults to 32 max Pods per node (`/26` or 64 Pod IPs per node), a `/17` secondary Pod range (32,768 IPs supporting up to 512 nodes), and a `/20` Service range (4,096 ClusterIP Services). GKE Standard defaults to 110 max Pods per node (`/24` or 256 Pod IPs per node), a `/14` secondary Pod range (262,144 IPs supporting up to 1,024 nodes), and a `/20` Service range. Because Autopilot uses `/26` node slices instead of `/24`, it uses 4x fewer Pod IPs per node.

Why does every Google Cloud VPC subnet lose 4 usable IP addresses?

Google Cloud reserves 4 IPv4 addresses in every primary VPC subnet range (`2^(32 - netmask) - 4`). These are the network address (first IP, e.g., `.0`), the default subnet gateway (second IP, e.g., `.1`), the second-to-last IP reserved by Google Cloud for future use (e.g., `.254`), and the broadcast address (last IP, e.g., `.255`). Note that this 4-IP deduction applies to the primary Node subnet, whereas secondary alias IP ranges for Pods are divided directly into fixed node blocks (`/23` to `/28`).

What is a GKE-Managed Service range (34.118.224.0/20) and does it use my VPC IPs?

When you leave the Service secondary IP range unspecified in newer GKE clusters, GKE automatically assigns ClusterIP Services from Google-managed range `34.118.224.0/20` (providing 4,096 Service VIPs). Because `34.118.224.0/20` is routed strictly inside your cluster and not exported over VPC peering or Cloud VPN, it consumes zero RFC 1918 IP addresses from your VPC subnet—And the same `34.118.224.0/20` range can be safely reused across every GKE cluster in your Shared VPC.

Do I still need a /28 subnet for the GKE Private Cluster control plane?

Not for new clusters using Private Service Connect (PSC). Modern GKE clusters provision the Kubernetes API control plane on Google-managed Private Service Connect endpoints, which require 0 extra `/28` VPC peering subnets and eliminate `/28` CIDR overlap headaches in Shared VPCs. You only need a dedicated or shared `/28` (16 IPs) control plane range when maintaining legacy VPC-peered private clusters.

Can I expand a GKE Pod or Node IP range after the cluster is created?

Yes, with different mechanisms for each range. Primary Node subnets can be expanded in place in Google Cloud VPC (by decreasing the prefix length, e.g., from `/22` to `/20`) as long as the adjacent CIDR block is unallocated. Secondary Pod ranges cannot be resized in place, but GKE supports discontinuous multi-Pod CIDR—allowing you to attach additional secondary IP ranges to the subnet and assign them to new or existing node pools without recreating the cluster. Service CIDR ranges cannot be modified after cluster creation.

Why do GKE node Upgrades require extra spare IP addresses?

During GKE node pool upgrades, GKE uses Surge Upgrades (by default `maxSurge=1` per zone) or Blue-Green upgrades to replace VMs without downtime. Before draining an old node, GKE spins up temporary surge nodes—each of which claims a primary Node IP and a full per-node Pod CIDR slice (`/26` or `/24`). Always leave at least 1–3 spare node blocks per zone (or 100% spare capacity if using Blue-Green node pool upgrades) so automated GKE control plane and node upgrades never stall due to IP exhaustion.

Fixed price, fixed date

Talk to an architect who has done this before.

Bring your current setup and the outcome you need. You will get a view on the approach, the risks and roughly what it costs.

Book a 20-min architecture call

Straight to a senior GCP architect. No SDR, no slide deck.

Not ready to talk? See how we migrated Hapana off AWS →

Or call +61 2 8359 9507 · Hello@aviato.consulting

Call us Book a call

Quick navigation