From point A to point B
Point A: in chapter 3 your pods got an IP and everything worked, but you didn't choose how. Point B: by the end of this chapter you'll be able to choose the right IP address management (IPAM) mode for your cluster, decide between IPv4, IPv6 or both, and know why that decision is made before you install.
Changing the IPAM mode on a running cluster can cut connectivity for the workloads already running. The official documentation recommends creating a new cluster with the new configuration. The only live migration available today is from Cluster Scope to Multi-Pool, and it has its own guide.
What IPAM is and what a PodCIDR is
Outside Kubernetes, a machine gets its IP through DHCP or, with IPv6, through SLAAC. In Kubernetes, assigning IPs to pods is called IPAM (IP Address Management), and it's usually the CNI plugin's job.
Each node receives one or more address blocks called PodCIDRs, and the pods on that node take their IP from there. The question is who hands out those blocks. Depending on the answer, you have one IPAM mode or another:
Who hands out the blocks in each mode. Diagram: The House of Routing.
| Mode | Who assigns | Use it when |
|---|---|---|
| Kubernetes Host Scope | Kubernetes (controller manager) | You want the simplest option and your cluster already defines PodCIDRs |
| Cluster Scope (default) | The Cilium operator | You want Cilium to manage its own ranges without touching Kubernetes |
| Multi-Pool | The operator, from several pools | You need ranges per team or per customer, or ranges that grow without reinstalling |
| ENI | AWS, through the operator | You run on Amazon EKS and want IPs from the VPC itself |
10.244.1.0/24 is the same notation you use for subnets in traditional networking: 24 network bits and 256 addresses for the pods on that node.Kubernetes Host Scope
This is the mode you used in chapter 3 (ipam.mode=kubernetes). Kubernetes has one prefix for the whole cluster (on kind, 10.244.0.0/16) and gives each node a /24. Cilium only hands out IPs within that block.
# The block Kubernetes assigned to each node
kubectl get nodes -o custom-columns=NODE:.metadata.name,PODCIDRS:.spec.podCIDRs
It's easy to understand, but rigid:
- The block size is the same for every node; you can't give more addresses to just one.
- You can't add or remove ranges as the cluster grows.
Cluster Scope, the default mode
Here the one handing out blocks is the Cilium operator, not Kubernetes. It writes each node's block into its CiliumNode object and the agent reads it. Since it needs nothing special from Kubernetes, it's the mode Cilium uses if you don't specify another. In Helm it shows up as cluster-pool.
To try it, create a new cluster with the kind-cilium.yaml from chapter 3 and install Cilium without setting ipam.mode:
kind delete cluster
kind create cluster --config kind-cilium.yaml
helm install cilium cilium/cilium --version 1.20.3 -n kube-system
cilium status --wait
# The cluster pool and the block size per node
cilium config view | grep cluster-pool
# The block the operator gave each node
kubectl get ciliumnodes -o custom-columns=NODE:.metadata.name,PODCIDRS:.spec.ipam.podCIDRs
By default, the pool is 10.0.0.0/8 and each node gets a /24. Besides your pods' IPs, the agent reserves a few for itself: one for the router (cilium_host) and another for health checks.
When the pool runs short
Cluster Scope supports several ranges, but they're fixed at install time. If you run out of addresses, you can't expand them live. See it for yourself with a deliberately small pool:
# values-small-pool.yaml · lab only
ipam:
mode: cluster-pool
operator:
clusterPoolIPv4PodCIDRList:
- 10.99.0.0/28
- 10.99.1.0/28
clusterPoolIPv4MaskSize: 29
Each node gets a /29, that is, eight addresses. If you pin ten replicas to the same node, several stay in ContainerCreating. That node's agent tells you why:
# The agent running on kind-worker2
AGENT=$(kubectl -n kube-system get pods -l k8s-app=cilium \
--field-selector spec.nodeName=kind-worker2 -o name)
kubectl -n kube-system exec $AGENT -- cilium-dbg status | grep IPAM
# IPAM: IPv4: 6/6 allocated from 10.99.1.0/29
Multi-Pool: pools per namespace
Multi-Pool is the most flexible mode. You define several pools with the CiliumPodIPPool resource and decide which pods use each one. A single node can hold blocks from several pools, and the operator hands it new blocks when it needs them.
Each namespace takes its IPs from its own pool. Diagram: The House of Routing.
Install it on a new cluster. This lab uses native routing, which we cover in depth in chapter 5:
# values-multi-pool.yaml
ipam:
mode: multi-pool
operator:
autoCreateCiliumPodIPPools:
default:
ipv4:
cidrs: ["10.10.0.0/16"]
maskSize: 27
routingMode: native
autoDirectNodeRoutes: true
ipv4NativeRoutingCIDR: 10.0.0.0/8
endpointRoutes:
enabled: true
autoCreateCiliumPodIPPools creates a default pool at startup. Now add a pool for each team:
# pools.yaml
apiVersion: cilium.io/v2alpha1
kind: CiliumPodIPPool
metadata:
name: store-pool
spec:
ipv4:
cidrs: ["10.20.0.0/16"]
maskSize: 27
---
apiVersion: cilium.io/v2alpha1
kind: CiliumPodIPPool
metadata:
name: payments-pool
spec:
ipv4:
cidrs: ["10.30.0.0/16"]
maskSize: 27
To make every pod in a namespace use a pool, annotate the namespace with ipam.cilium.io/ip-pool:
kubectl apply -f pools.yaml
kubectl create namespace store
kubectl create namespace payments
kubectl annotate namespace store ipam.cilium.io/ip-pool=store-pool
kubectl annotate namespace payments ipam.cilium.io/ip-pool=payments-pool
kubectl -n store create deployment web --image=nginx:stable --replicas=10
kubectl -n payments create deployment web --image=nginx:stable --replicas=10
kubectl get pods -A -o wide | grep web
# The blocks each node holds, pool by pool
kubectl get ciliumnode kind-worker2 -o jsonpath='{.spec.ipam.pools}' | jq
Pods in store come from 10.20.x.x and pods in payments from 10.30.x.x. Scale one of them and you'll see the node receive a second /27 without reinstalling anything:
kubectl -n store scale deployment web --replicas=40
kubectl get ciliumnode kind-worker2 -o jsonpath='{.spec.ipam.pools.allocated}' | jq
Giving each team its own range helps you recognize traffic when it leaves the cluster. But a pod can also request a pool with its own annotation, so a pool isn't a security boundary. To isolate, use network policies (chapters 12 and 13).
ENI on AWS
On Amazon EKS, ENI mode assigns pods secondary addresses from each EC2 instance's elastic network interfaces (ENIs). Pods get real VPC IPs, and AWS security groups can be applied at the pod level.
- Turn it on with
ipam.mode=eniandeni.enabled=true. - Limit: the number of pods per node depends on how many ENIs and how many secondary IPs the instance type supports. For example, an
m5.largesupports 3 ENIs with 10 addresses each, about 30 pods. AWS prefix delegation assigns whole blocks (for example,/28) to each ENI and raises that number a lot. - No IPv6: today Cilium's ENI mode doesn't support IPv6 ENIs.
On clouds that come with another CNI preinstalled (EKS or GKE, for example), Cilium can use a taint (node.cilium.io/agent-not-ready) that keeps pods from being scheduled on a node until its agent is ready. That way pods are born managed by Cilium and not by the previous CNI.
IPv4, IPv6 or dual stack
Cilium was born IPv6-only and added IPv4 very early, because the ecosystem wasn't ready yet. Today almost all of its features support IPv6. The three options:
| Option | Advantage | Cost |
|---|---|---|
| IPv4 only | Maximum compatibility; it's the norm | Doesn't prepare you for the future |
| Dual stack | You try IPv6 without losing IPv4; a good transition | More complexity in addressing and observability |
| IPv6 only | Huge address space; ideal for new projects | You need NAT64/DNS64 to reach services that only speak IPv4 |
Before you decide, ask yourself: does your organization require IPv6? Do your monitoring and security tools understand IPv6? Do your external dependencies, such as some container registries, work without IPv4?
Dual stack lab
On Linux with IPv6 enabled, add ipFamily: dual to your kind configuration:
# kind-dual.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
networking:
disableDefaultCNI: true
ipFamily: dual
In Cilium, IPv6 is disabled by default; turn it on at install time:
kind create cluster --config kind-dual.yaml
helm install cilium cilium/cilium --version 1.20.3 -n kube-system \
--set ipam.mode=kubernetes \
--set ipv6.enabled=true
cilium status --wait
# Each node now has an IPv4 block and an IPv6 block
kubectl get nodes -o custom-columns=NODE:.metadata.name,PODCIDRS:.spec.podCIDRs
You request a dual stack service with ipFamilyPolicy:
apiVersion: v1
kind: Service
metadata:
name: web
spec:
ipFamilyPolicy: PreferDualStack
ipFamilies: [IPv6, IPv4]
selector:
app: web
ports:
- port: 80
# From a client pod, the same service over both families
kubectl exec client -- curl -s -o /dev/null -w "%{http_code}\n" -4 http://web
kubectl exec client -- curl -s -o /dev/null -w "%{http_code}\n" -6 http://web
On an IPv6-only cluster, use ipFamily: ipv6 in kind, install Cilium with ipv6.enabled=true and ipv4.enabled=false, and declare services with ipFamilyPolicy: SingleStack and ipFamilies: [IPv6].
2001:db8::/32, which is reserved for examples only. In production, take pod ranges from your organization's public IPv6 block and use unique local addresses (ULA) for internal services.Challenge
Answer before you open the solution.
1. You install Cilium without setting ipam.mode. Which mode does it use?
Cluster Scope (cluster-pool). The operator hands out blocks from 10.0.0.0/8 and writes them into each CiliumNode.
2. Your pods are stuck in ContainerCreating and cilium-dbg status shows "6/6 allocated." What happened?
The node's block ran out. In Cluster Scope you can't expand it live; in Multi-Pool, the operator would have handed out another block.
3. How do you make every pod in the payments namespace come from a specific pool?
By annotating the namespace with ipam.cilium.io/ip-pool=<pool>, in Multi-Pool mode.
4. Why should you decide the IPAM mode before installing?
Because changing it on a running cluster can break connectivity for existing workloads; the safe path is to create a new cluster.
What you take away
- IPAM decides who hands out PodCIDRs: Kubernetes, the Cilium operator or several pools.
- Cluster Scope is the default mode; Multi-Pool is the most flexible and grows live.
- ENI gives you VPC IPs on EKS, with a pod limit per instance type.
- IPv4, dual stack or IPv6 only: decide based on your strategy, your tools and your dependencies.
- The IPAM mode and the IP family are chosen before you install.
In the next chapter you follow the packet: how it travels between pods on the same node and between nodes, with native routing or with tunnels.
Official resources
- IP Address Management (IPAM)docs.cilium.io
- Multi-Pool IPAMdocs.cilium.io
- AWS ENI IPAMdocs.cilium.io
- IPv4/IPv6 dual-stackkubernetes.io
- kind: IP familykind.sigs.k8s.io
- Cilium: Up and Running (book)isovalent.com
Source and credits. This chapter summarizes and paraphrases the official book Cilium: Up and Running by Nico Vibert, Filip Nikolic and James Laverack (O'Reilly Media, 2026). The summary was produced with AI and reviewed, verified and approved by Jesús Espinoza. The diagrams and code examples are original work by The House of Routing and were checked against the official Cilium documentation. Cilium: Up and Running, the cover image, and related trade dress are trademarks of O'Reilly Media, Inc. This content is not affiliated with or endorsed by O'Reilly Media or Isovalent.