> Markdown version of https://opspane.dev/kubernetes/pod-cidr/ for AI agents and readers: the same text, without navigation or the interactive tool.
>
> The tool computes its result with JavaScript in the browser, so this file holds the reference text, worked examples and FAQ. Open the page to run it on your own input.
>
> Link the Kubernetes Pod & Service CIDR planner: `pod`, `svc` and `node` (one CIDR, or IPv4 and IPv6 separated by a comma for dual-stack), `mask`, `mask6` (node CIDR mask sizes) and `max` (kubelet maxPods), e.g. https://opspane.dev/kubernetes/pod-cidr/?pod=10.42.0.0%2F16%2C2001%3Adb8%3A42%3A%3A%2F56&svc=10.43.0.0%2F16%2C2001%3Adb8%3A43%3A%3A%2F112
>
> Answer endpoint for agents: the same URL parameters on https://opspane.dev/kubernetes/pod-cidr/answer.md return the computed result as Markdown, without JavaScript, e.g. https://opspane.dev/kubernetes/pod-cidr/answer.md?pod=10.42.0.0%2F16%2C2001%3Adb8%3A42%3A%3A%2F56&svc=10.43.0.0%2F16%2C2001%3Adb8%3A43%3A%3A%2F112

# Kubernetes Pod & Service CIDR Planner

Max nodes and Pods per node from --node-cidr-mask-size, Service CIDR limits, kube-dns IP and overlaps for IPv4, IPv6 and dual-stack clusters.

## Quick answer

- Max nodes = `2^(mask − prefix)`: a /16 cluster CIDR with the default /24 node mask holds 256 nodes, with /25 blocks 512.
- Pods per node = the smaller of the block's addresses minus 3 and kubelet's maxPods (110 by default): a /24 has 253 Pod IPs, so 110 Pods run.
- Service CIDR: at most a /12 for IPv4, and a /n holds `2^(32 − n) − 2` ClusterIPs: kubeadm's `10.96.0.0/12` holds 1,048,574, with kube-dns on the 10th address.
- The Pod CIDR, Service CIDR, node network and Docker's `172.17.0.0/16` must not share addresses.

## How to size Pod and Service CIDRs

1. Pick your platform to load its defaults, or type your own cluster (Pod) CIDR, node CIDR mask size, Service CIDR and kubelet maxPods. Add the node subnet or VPC to check it too.
2. Read the tiles: how many nodes the cluster CIDR holds, how many Pod addresses each node block has, and whether kubelet's maxPods or the block is the limit that binds.
3. Check the overlaps. The Pod CIDR, Service CIDR, node network and Docker's `172.17.0.0/16` must not share addresses; Apply fixes moves the range at fault to the nearest free private block.
4. Copy the kubeadm configuration or the k3s flags, or copy the link to share the exact plan.

This planner is for clusters whose Pods get addresses from a cluster CIDR: kubeadm and other kube-controller-manager setups, k3s, GKE VPC-native, AKS kubenet and Azure CNI Overlay, Cilium cluster-pool — IPv4, IPv6 or dual-stack. On Amazon EKS with the VPC CNI, Pods take addresses from VPC subnets instead — size those with the EKS max Pods calculator and the VPC subnet planner.

## How node CIDR blocks are carved

kube-controller-manager cuts the cluster CIDR into equal blocks of `--node-cidr-mask-size` and gives each node the next free one: `2^(mask − prefix)` blocks in all. Inside a block, host-local IPAM keeps the network address, the bridge gateway and the broadcast address, so a block of `2^(32 − mask)` addresses holds that many minus 3 Pods. With the default maxPods of 110:

| Node mask | Addresses | Pod IPs | Pods per node | Binds | Nodes in a /16 | Pods in a /16 | Nodes in a /14 | Pods in a /14 | GKE max Pods |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `/20` | 4,096 | 4,093 | 110 | maxPods | 16 | 1,760 | 64 | 7,040 | 2,048 |
| `/21` | 2,048 | 2,045 | 110 | maxPods | 32 | 3,520 | 128 | 14,080 | 1,024 |
| `/22` | 1,024 | 1,021 | 110 | maxPods | 64 | 7,040 | 256 | 28,160 | 512 |
| `/23` | 512 | 509 | 110 | maxPods | 128 | 14,080 | 512 | 56,320 | 256 |
| `/24` | 256 | 253 | 110 | maxPods | 256 | 28,160 | 1,024 | 112,640 | 128 |
| `/25` | 128 | 125 | 110 | maxPods | 512 | 56,320 | 2,048 | 225,280 | 64 |
| `/26` | 64 | 61 | 61 | addresses | 1,024 | 62,464 | 4,096 | 249,856 | 32 |
| `/27` | 32 | 29 | 29 | addresses | 2,048 | 59,392 | 8,192 | 237,568 | 16 |
| `/28` | 16 | 13 | 13 | addresses | 4,096 | 53,248 | 16,384 | 212,992 | 8 |

GKE sizes the other way round: each node's range has at least twice as many addresses as its maximum Pods, rounded up to a power of two (`/24` for 110 Pods, `/26` for 32), so addresses freed by a deleted Pod are not reused immediately. The last column is the most Pods GKE allows for that block size.

kubeadm also refuses a node mask more than 16 bits longer than the Pod CIDR prefix (a `/8` with `/25` blocks). kube-controller-manager only enforces that limit for IPv6; for IPv4 it accepts any mask from the cluster prefix to `/32`.

## Platform defaults

| Platform | Pod CIDR | Node mask | Service CIDR | maxPods | Nodes | Pods per node | kube-dns |
| --- | --- | --- | --- | --- | --- | --- | --- |
| kubeadm + Flannel | `10.244.0.0/16` | `/24` | `10.96.0.0/12` | 110 | 256 | 110 | `10.96.0.10` |
| k3s | `10.42.0.0/16` | `/24` | `10.43.0.0/16` | 110 | 256 | 110 | `10.43.0.10` |
| Dual-stack | `10.42.0.0/16,2001:db8:42::/56` | `/24` | `10.43.0.0/16,2001:db8:43::/112` | 110 | 256 | 110 | `10.43.0.10` |
| GKE VPC-native | `10.4.0.0/14` | `/24` | `34.118.224.0/20` | 110 | 1,024 | 110 | `34.118.224.10` |
| AKS CNI Overlay | `10.244.0.0/16` | `/24` | `10.0.0.0/16` | 250 | 256 | 250 | `10.0.0.10` |
| Cilium cluster-pool | `10.0.0.0/8` | `/24` | `10.96.0.0/12` | 110 | 61,440 | 110 | `10.96.0.10` |

- kubeadm sets no Pod CIDR by default; Flannel expects `10.244.0.0/16`, passed to `kubeadm init` as `--pod-network-cidr`. The Service subnet defaults to `10.96.0.0/12`.
- GKE chooses a `/14` Pod range when you don't set one (the address shown is an example) and, from Standard 1.29 and Autopilot 1.27, puts Services on the Google-managed `34.118.224.0/20`. GKE's kube-dns address is not shown here because GKE assigns it.
- AKS Azure CNI Overlay gives every node a fixed `/24` and allows up to 250 Pods per node; its Service CIDR must be smaller than `/12`.
- Cilium's cluster-pool default `10.0.0.0/8` overlaps kubeadm's Service range and every node network in 10.x — 2 overlaps for the row above. Set `clusterPoolIPv4PodCIDRList` before installing; existing entries can't be changed later.

## Service CIDR rules

- **Largest:** a `/12` for IPv4. kubeadm enforces it on every version, and kube-apiserver did until 1.34 with "specified --service-cluster-ip-range is too large; for 32-bit addresses, the mask must be >= 12".
- **Smallest:** kubeadm wants at least 10 addresses, because kube-dns takes the 10th — a `/28` is the smallest range that works.
- **Reserved:** the network and broadcast addresses are never handed out, so a `/n` holds `2^(32 − n) − 2` ClusterIPs. The `kubernetes` Service always takes the first usable address.
- **Static band:** the lowest `min(max(16, size / 16), 256)` addresses are kept for Services that ask for a specific ClusterIP, such as kube-dns; dynamic allocation uses them only when the rest is exhausted.
- **Growing it:** from Kubernetes 1.33 you can add a ServiceCIDR object instead of rebuilding the cluster.

| Service CIDR | ClusterIPs | kubernetes.default | kube-dns (10th) | Static band | Dynamic |
| --- | --- | --- | --- | --- | --- |
| `10.96.0.0/12` | 1,048,574 | `10.96.0.1` | `10.96.0.10` | 256 | 1,048,318 |
| `10.96.0.0/16` | 65,534 | `10.96.0.1` | `10.96.0.10` | 256 | 65,278 |
| `10.96.0.0/20` | 4,094 | `10.96.0.1` | `10.96.0.10` | 256 | 3,838 |
| `10.96.0.0/24` | 254 | `10.96.0.1` | `10.96.0.10` | 16 | 238 |
| `10.96.0.0/28` | 14 | `10.96.0.1` | `10.96.0.10` | 0 | 14 |

## IPv6 and dual-stack clusters

Range fields take one CIDR or an IPv4 and an IPv6 CIDR separated by a comma, as the flags do — `--cluster-cidr` with `10.42.0.0/16,2001:db8:42::/56`. kube-controller-manager accepts at most two, one per family, and gives each node a block of each (`spec.podCIDRs`). The IPv6 node mask is `--node-cidr-mask-size-ipv6`, default `/64`; on a dual-stack cluster the plain `--node-cidr-mask-size` is refused in favour of the `-ipv4` and `-ipv6` flags.

For IPv6, and only for IPv6, the node mask may be at most 16 bits longer than the cluster prefix — so with `/64` blocks the cluster CIDR must be a `/48` or longer:

| IPv6 cluster CIDR | /64 node blocks | Pods at maxPods 110 |
| --- | --- | --- |
| `/44` | refused | kube-controller-manager won't start |
| `/48` | 65,536 | 7,208,960 |
| `/52` | 4,096 | 450,560 |
| `/56` | 256 | 28,160 |
| `/60` | 16 | 1,760 |
| `/64` | 1 | 110 |

Inside an IPv6 block, CNI host-local IPAM keeps only the network address and the gateway — IPv6 has no broadcast address — so a `/64` has 264 − 2 Pod addresses.

### IPv6 Service CIDR rules

- **Largest:** kubeadm caps it at 20 host bits — `/108` ("for 128-bit addresses, the mask must be >= 108"), as kube-apiserver did before 1.34. From 1.34 the IPAddress allocator accepts down to `/64` and refuses anything larger.
- **Before 1.34** the bitmap allocator used at most 65,536 addresses of an IPv6 range, so kubeadm notes that `/108` to `/112` is clamped to `/112`; k3s documents `/112` as its largest IPv6 Service CIDR.
- **Reserved:** only the network address, so a `/n` holds 2128 − n − 1 ClusterIPs. The static band is the same `min(max(16, size / 16), 256)`.

| IPv6 Service CIDR | ClusterIPs (1.34+) | Before 1.34 | 10th address (kube-dns) | Static band |
| --- | --- | --- | --- | --- |
| `fd00:10:96::/108` | 1,048,575 | 65,535 | `fd00:10:96::a` | 256 |
| `fd00:10:96::/112` | 65,535 | 65,535 | `fd00:10:96::a` | 256 |
| `fd00:10:96::/116` | 4,095 | 4,095 | `fd00:10:96::a` | 256 |
| `fd00:10:96::/120` | 255 | 255 | `fd00:10:96::a` | 16 |
| `fd00:10:96::/124` | 15 | 15 | `fd00:10:96::a` | 0 |

Unique local ranges (`fd00::/8`, RFC 4193) are the usual choice for Pods and Services; a global prefix makes Pods directly routable, which is a feature only with a firewall in front. Amazon EKS IPv6 clusters are single-stack: Pods take addresses from the subnet's `/64` and EKS assigns the Service CIDR from `fc00::/7` itself.

## Overlaps that break clusters

A Pod or Service range that shares addresses with something you route to wins locally: nodes send that traffic into the overlay or to kube-proxy instead of the real host. The usual collisions, each computed by the planner with its suggested fix:

| Case | Pod · Service · Node | First overlap | Fix |
| --- | --- | --- | --- |
| Pod CIDR on Docker's bridge | `172.17.0.0/16 · 10.96.0.0/12 · 10.0.0.0/16` | Pod CIDR / docker0: 172.17.0.0/16 (65,536 addresses) | Pod CIDR → 172.18.0.0/16 |
| Cilium's default pool on a 10.x VPC | `10.0.0.0/8 · 10.96.0.0/12 · 10.10.0.0/16` | Pod CIDR / Node network: 10.10.0.0/16 (65,536 addresses) | Pod CIDR → 10.128.0.0/9 |
| Service CIDR equal to a peered VPC | `10.244.0.0/16 · 10.100.0.0/16 · 10.100.0.0/16` | Service CIDR / Node network: 10.100.0.0/16 (65,536 addresses) | Service CIDR → 10.101.0.0/16 |
| Calico's 192.168.0.0/16 on an office network | `192.168.0.0/16 · 10.96.0.0/12 · 192.168.1.0/24` | Pod CIDR / Node network: 192.168.1.0/24 (256 addresses) | Pod CIDR → 10.0.0.0/16 |

- **docker0:** Docker's default bridge takes `172.17.0.0/16` on every host that runs it — CI runners, bastions, build hosts. Keep Pod and Service ranges out of it, or move the bridge with `bip` in `daemon.json`.
- **VPC peering, VPN and on-prem:** overlay Pod ranges are not routed in the VPC, but any peered network, VPN or on-prem range inside them becomes unreachable from Pods. Check the whole estate with the CIDR overlap checker.
- **Office and home networks:** Calico's sample pool `192.168.0.0/16` covers most LANs; give it a 10.x or 100.64.x range instead.

## Verification

- Node blocks, the node mask rules and the Service-range skipping come from kube-controller-manager's source (the `cidrset` package and `range_allocator.go`); the unit tests port its vectors — 256 blocks for a `/16` at `/24`, `127.0.0.0/8` at `/32`, block indexes and occupied ranges — and read 2026-11-20.
- Error texts are quoted from kubeadm's validation package and its constants and kube-apiserver's Service range check; the static band and first-address rules from the Kubernetes Service ClusterIP allocation docs and `calculateRangeOffset`, which gives a range of 16 addresses or fewer no static band.
- IPv6 and dual-stack: the 16-bit node-mask limit and the `/64` default from kube-controller-manager's source, the dual-stack flag checks from its `validateCIDRs`, the `/64` floor and 2n − 1 ClusterIPs from the 1.34+ IPAddress allocator, the 65,536 cap from the old bitmap allocator, and the dual-stack example from the k3s documentation (read 2026-11-20).
- Platform defaults come from the kubeadm, k3s, GKE, AKS and Cilium documentation linked below. The engine runs at 100% line and branch coverage, and the e2e spec proves your ranges never leave this tab.

- [cidrset (kube-controller-manager)](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go)
- [kubeadm validation](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/validation/validation.go)
- [Service ClusterIP allocation](https://kubernetes.io/docs/concepts/services-networking/cluster-ip-allocation/)
- [IPv4/IPv6 dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/)
- [IPAddress allocator (1.34+)](https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/service/ipallocator/ipallocator.go)
- [k3s dual-stack options](https://docs.k3s.io/networking/basic-network-options)
- [kubeadm configuration (v1beta4)](https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/)
- [kubelet configuration](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/)
- [CNI host-local IPAM](https://www.cni.dev/plugins/current/ipam/host-local/)
- [k3s server flags](https://docs.k3s.io/cli/server)
- [GKE: maximum Pods per node](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr)
- [GKE: VPC-native clusters](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/alias-ips)
- [AKS: Azure CNI Overlay](https://learn.microsoft.com/en-us/azure/aks/concepts-network-azure-cni-overlay)
- [Cilium cluster-pool IPAM](https://docs.cilium.io/en/stable/network/concepts/ipam/cluster-pool/)

## FAQ

### How many nodes does a /16 cluster CIDR hold?

With the default --node-cidr-mask-size of 24, a /16 holds 2^(24 − 16) = 256 node blocks, so 256 nodes; with /25 blocks it holds 512. Each node gets one block as its spec.podCIDR, and a node that finds no free block never becomes Ready for Pods.

### How many Pods can a node with a /24 podCIDR run?

A /24 has 256 addresses; the network, the bridge gateway (or CNI router) and the broadcast address leave 253 for Pods. kubelet's maxPods defaults to 110, so maxPods binds and 110 Pods run per node. A /25 has 125 Pod addresses — still enough for 110, but not for AKS's 250.

### What is the largest Service CIDR Kubernetes accepts?

A /12 for IPv4 (20 host bits): kubeadm refuses anything larger, and kube-apiserver did too until 1.34 with "specified --service-cluster-ip-range is too large; for 32-bit addresses, the mask must be >= 12". The kubeadm default 10.96.0.0/12 is exactly that size and holds 1,048,574 ClusterIPs. From 1.34 the API server's IPAddress allocator drops the IPv4 limit, but most installers still apply it. For IPv6 the same 20 bits make a /108; the 1.34+ allocator accepts down to a /64.

### How many nodes does an IPv6 cluster CIDR hold?

At the default --node-cidr-mask-size-ipv6 of 64, a /48 holds 65,536 node blocks — and that is the ceiling: kube-controller-manager refuses an IPv6 node mask more than 16 bits longer than the cluster prefix ("New CIDR set failed; the node CIDR size is too big"), so a /44 doesn't start at all. Each /64 has 2^64 − 2 Pod addresses, so kubelet's maxPods always binds.

### How do I plan a dual-stack cluster?

Write each range as an IPv4 and an IPv6 CIDR separated by a comma, exactly as --cluster-cidr and --service-cluster-ip-range take them. Every node gets one block of each family, so the cluster holds as many nodes as the family with fewer blocks; the planner shows which one runs out first and writes kubeadm and k3s configuration with --node-cidr-mask-size-ipv4 and -ipv6, since plain --node-cidr-mask-size is refused on dual-stack clusters.

### Why is kube-dns 10.96.0.10?

By convention: kubeadm puts the cluster DNS Service on the 10th address of the Service range and the kubernetes.default Service on the first (10.96.0.1). Both sit in the static band — the first 256 addresses — which the allocator only hands out dynamically when the rest of the range is full.

### What happens if --node-cidr-mask-size is smaller than the cluster CIDR prefix?

kubeadm rejects the config. kube-controller-manager starts anyway for IPv4, but the cluster CIDR then holds no block of that size, so every node gets "CIDR allocation failed; there are no remaining CIDRs left to allocate in the accepted range". The planner flags a /15 node mask on a /16 cluster CIDR as an error and offers /24 as the fix.

### Can the Service CIDR sit inside the Pod CIDR?

It shouldn't. kube-controller-manager marks every node block the Service range overlaps as used — 10.96.0.0/12 inside 10.0.0.0/8 costs 4,096 of 65,536 /24 blocks — and CNIs with their own IPAM, such as Cilium's cluster-pool, don't skip it at all, so a Pod can get an address that is also a ClusterIP.

## Related tools

- [CIDR Overlap Checker](https://opspane.dev/network/cidr-overlap/): Paste labeled IPv4 or IPv6 CIDRs to find every overlap and containment, the merged summary routes, host-bit fixes and private or public ranges.
- [VPC Subnet Planner](https://opspane.dev/network/vpc-subnet-planner/): Split a VPC CIDR into aligned subnets per AZ, sized by prefix or host count (EKS pods), with AWS usable IPs, dual-stack /64s and aws_subnet Terraform.
- [EKS Max Pods Calculator](https://opspane.dev/kubernetes/eks-max-pods/): Calculate max pods per node for every EC2 instance type, with prefix delegation and the IP addresses your pod CIDR must hold.
