Kubernetes CIDR Planning Guide
How to Size Pod CIDRs in Kubernetes to Avoid IP Exhaustion
IP exhaustion is one of the most common and painful problems in production Kubernetes clusters. The root cause is almost always under-provisioning the Pod CIDR block at cluster creation time. Unlike compute or memory, you cannot easily expand a CIDR block after a cluster is deployed — it requires migrating to a new cluster.
Use this formula to calculate your minimum Pod CIDR size: Required Pod IPs = Target Nodes × Max Pods per Node × (1 + Growth Buffer). Always round up to the next power of 2. For production clusters, a /14 (262,144 IPs) or larger is recommended to accommodate future growth, node pool expansions, and cluster autoscaler headroom.
Overlay vs. Non-Overlay Networking (AWS VPC CNI vs. Calico/Cilium)
Overlay networking (Calico VXLAN, Cilium Geneve, Flannel) creates a virtual Layer 2 or Layer 3 network on top of your existing infrastructure. Pod IPs come from a separate CIDR range that is independent of the node network. This gives you maximum flexibility in IP planning — your Pod CIDR can use any RFC 1918 range regardless of your VPC. The tradeoff is encapsulation overhead (~50 bytes for VXLAN, ~30 bytes for Geneve) which slightly reduces maximum throughput on high-bandwidth links.
Non-overlay networking (AWS VPC CNI, Azure CNI) assigns pod IPs directly from the VPC or VNet subnet. This eliminates encapsulation overhead and provides native VPC routing, security group integration, and flow logs visibility. However, it requires careful IP planning because pods and nodes compete for the same address space. Each node consumes MaxPods + 1 IPs from the VPC subnet. AWS VPC CNI also has per-instance ENI limits that constrain max pods per node.
Use this K8s CIDR planner to visualize exactly how many IPs each approach requires and whether your planned CIDR blocks overlap.
Why Service CIDR and Pod CIDR Must Never Overlap with Node VPCs
Kubernetes relies on IP routing tables and iptables rules to direct traffic between pods, services, and external endpoints. If the Pod CIDR or Service CIDR overlaps with the VPC/Node CIDR, the kernel routing tables become ambiguous — traffic intended for a VPC resource (e.g., an RDS database at 10.0.1.50) may be intercepted by a pod or service, or vice versa. This causes silent connectivity failures that are extremely difficult to debug because packets are delivered to the wrong destination without any error signal.
The golden rule: Pod CIDR, Service CIDR, and VPC CIDR must be three mutually exclusive address ranges. A common and safe convention is VPC = 10.0.0.0/16, Pods = 10.244.0.0/16, Services = 10.96.0.0/12. This planner's overlap detection matrix will immediately flag any collisions before you deploy your cluster.