Skip to content

IP Address Management (IPAM): CCA practice questions

IPAM decides where pod addresses come from, and Cilium supports several modes. The choice should be made when the cluster is built: the documentation warns that changing the IPAM mode of a live cluster can cause persistent loss of connectivity, recommends a fresh cluster for a mode change, and names cluster-pool to multi-pool as the only online migration currently available.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What IP Address Management (IPAM) covers in CCA

IPAM decides where pod addresses come from, and Cilium supports several modes. The choice should be made when the cluster is built: the documentation warns that changing the IPAM mode of a live cluster can cause persistent loss of connectivity, recommends a fresh cluster for a mode change, and names cluster-pool to multi-pool as the only online migration currently available.

Cluster scope is the default. The Cilium operator carves per-node PodCIDRs out of clusterPoolIPv4PodCIDRList and writes them to spec.ipam.podCIDRs of each CiliumNode; the agent waits for that range and then hands out addresses locally. Because Kubernetes is not involved, this works even when the controller manager does not allocate node CIDRs. Two operational rules matter. When the pool runs low, add a new entry to the list instead of editing an existing one, and leave clusterPoolIPv4MaskSize alone, because neither can be changed safely. The default pod range is 10.0.0.0/8, so a node network inside 10.x conflicts with it: traffic meant for other nodes is treated as pod traffic and node connectivity breaks until a non-overlapping pod CIDR is configured.

Kubernetes host scope, ipam.mode=kubernetes, uses the PodCIDR that Kubernetes assigns to each v1.Node. The controller manager must run with --allocate-node-cidrs, otherwise the agents wait at startup for a range that never appears.

Multi-pool, ipam.mode=multi-pool, is the most flexible option and the only one with several CIDRs per node and dynamic allocation that also works with tunnel routing. Pools are CiliumPodIPPool resources with CIDR lists and a fixed mask size. A pod picks a pool through the ipam.cilium.io/ip-pool annotation on itself or its namespace, or through the pool's podSelector and namespaceSelector. Pods that match nothing use the pool named default, unless ipam.cilium.io/require-pool-match is set to true, which blocks allocation until a non-default pool matches. A pod that matches two pools for one address family gets no address, so selectors must not overlap. Annotations are read only when a pod is created. The agent records its needs in spec.ipam.pools.requested of its CiliumNode and the operator answers in spec.ipam.pools.allocated.

Cloud modes hand allocation to the provider. With AWS ENI the operator is the only component that calls the EC2 API, which avoids rate limits, and it keeps a pre-allocation watermark of free addresses on each node so new pods do not wait for API calls. Azure IPAM, GKE and CRD-backed modes take their CIDRs from outside Cilium and support direct routing only. The IPAM feature table lists seven modes: Kubernetes host scope, cluster scope, multi-pool, CRD-backed, AWS ENI, Azure IPAM and GKE.

Key points

  • Cluster scope is the default and is driven by the operator through CiliumNode objects.
  • Grow a cluster pool by appending CIDRs; editing entries or the mask size is unsafe.
  • ipam.mode=kubernetes needs kube-controller-manager --allocate-node-cidrs.
  • In multi-pool mode a pod must match exactly one pool per IP family.
  • The only documented online IPAM migration is cluster-pool to multi-pool.

Three sample questions

12 CCA questions on IP Address Management (IPAM), 12 with explanations. How practice works

Question 1

Which of the following is NOT a supported IPAM mode in Cilium?
  1. A.Cluster Pool
  2. B.Kubernetes Host Scope
  3. C.CRD-based
  4. D.Host-Local

Correct answer: D

Cilium supports several IPAM modes including Cluster Pool (default), Kubernetes (using PodCIDR from the node spec), and CRD-based IPAM, but "Host-Local" is not a supported IPAM mode in Cilium.

Question 2

In Cilium's default IPAM mode, which component assigns the per-node PodCIDRs and where are they recorded?
  1. A.kube-controller-manager, in spec.podCIDR of each v1.Node
  2. B.The Cilium operator, in spec.ipam.podCIDRs of each CiliumNode
  3. C.The cloud provider, through its node metadata API
  4. D.Each agent chooses a free range at random on startup

Correct answer: B

Cluster scope is the default IPAM mode: the Cilium operator manages per-node PodCIDRs through the v2.CiliumNode resource (spec.ipam.podCIDRs) and each node allocates IPs from its range. Why the other options are wrong. "kube-controller-manager, in spec.podCIDR of each v1.Node": That is Kubernetes host scope (ipam.mode=kubernetes), not the default. "Each agent chooses a free range at random on startup": Agents wait until the operator publishes the range. "The cloud provider, through its node metadata API": Cloud IPAM modes such as ENI or Azure are separate, non-default modes.

Sources: CNCF CCA curriculum (CCA_Curriculum.pdf), Cilium docs: Cluster Scope IPAM, Cilium docs: IP Address Management (IPAM)

Question 3

You set ipam.mode=kubernetes and the cilium-agents stay waiting at startup. What is the most likely cause?
  1. A.No etcd key-value store is configured
  2. B.The cilium-operator has not created a CiliumPodIPPool yet
  3. C.kube-controller-manager lacks --allocate-node-cidrs
  4. D.kube-proxy is still running on the nodes

Correct answer: C

In Kubernetes host scope the agent waits until a PodCIDR is available on the v1.Node object; the docs stress that kube-controller-manager must run with --allocate-node-cidrs so that Kubernetes allocates those ranges. Why the other options are wrong. "The cilium-operator has not created a CiliumPodIPPool yet": CiliumPodIPPool belongs to multi-pool IPAM. "No etcd key-value store is configured": IPAM in this mode does not need a kvstore. "kube-proxy is still running on the nodes": kube-proxy has nothing to do with PodCIDR allocation.

Sources: CNCF CCA curriculum (CCA_Curriculum.pdf), Cilium docs: Kubernetes Host Scope IPAM, Cilium docs: IP Address Management (IPAM)

Practice this topic

Focus mode keeps every question on IP Address Management (IPAM) until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CCA practice across all topics.

Sources

The explanation above was checked against these official documents.

Frequently asked questions

Can I move pods to another multi-pool pool by changing the annotation?

Not for running pods. The pool annotation is evaluated at pod creation, so the pod has to be recreated to get an address from the new pool.