Cloud / Kubernetes

Kubernetes Pod and Service CIDR Planning

How to choose pod-CIDR and service-CIDR for a Kubernetes cluster, avoid conflicts with node and VPC networks, and plan for cluster growth.

Kubernetes IP address spaces

A Kubernetes cluster uses three distinct CIDR ranges:

CIDR TypeUsed ForFlagTypical Value
Pod CIDR IP addresses assigned to each pod --pod-network-cidr 10.244.0.0/16
Service CIDR Virtual IPs for Kubernetes Services --service-cluster-ip-range 10.96.0.0/12
Node CIDR IP addresses of the cluster nodes (from your VPC/cloud) 10.0.0.0/16

All three must be non-overlapping. If any two overlap, inter-pod or pod-to-service communication will break.

CNI-specific defaults

CNI PluginDefault Pod CIDRNotes
Flannel 10.244.0.0/16 Simple overlay, VXLAN or host-gw
Calico 192.168.0.0/16 Conflicts with home networks — change it
Cilium 10.0.0.0/8 Wide default; configure per-cluster range
AWS VPC CNI Node subnet IPs Pods use VPC IPs directly (no overlay)
GKE Dataplane V2 10.4.0.0/14 Managed by GKE, customisable

How to size your pod CIDR

  • Nodes × pods per node = total pod IPs needed. Each node typically gets a /24 (254 pods max) from the pod CIDR. With 50 nodes, you need at least 50 × 256 = 12,800 IPs — a /18 (16,384) would work; a /16 (65,536) gives comfortable room.
  • Use 10.x.x.x ranges for pod and service CIDRs. Avoid 192.168.x.x (Calico default) — it conflicts with employee home VPN routes.
  • Pod CIDR cannot be changed after cluster creation without recreating the cluster. Size generously.
  • The service CIDR is usually much smaller than the pod CIDR — a /12 (1 million) is more than enough for any cluster's service count.

Frequently Asked Questions

What CIDR should I use for Kubernetes pods?

Use a /16 from the 10.x.x.x space, separate from your node and service CIDRs. 10.244.0.0/16 (Flannel default) is common. Size based on nodes × pods-per-node — each node typically gets a /24, so plan for at least (node count × 256) total pod IPs. Avoid 192.168.x.x (Calico default) — it conflicts with employee home networks over VPN.

What is the difference between pod CIDR and service CIDR?

Pod CIDR provides real, routable IP addresses to pods — each pod gets a unique IP from this range. Service CIDR provides virtual IPs to Kubernetes Services (ClusterIP) — these IPs only exist in kube-proxy routing rules and are not routable on the underlying network. Both ranges must not overlap each other or the node network.

Can you change the pod CIDR after cluster creation?

No — neither the pod CIDR nor the service CIDR can be changed without rebuilding the cluster from scratch. Choose both ranges generously before creating the cluster. A /16 for pods and a /12 for services is a safe default for most workloads.