For Cilium to serve a cluster's Services in place of kube-proxy, you skip the kube-proxy installation with kubeadm init --skip-phases=addon/kube-proxy, then install Cilium with Helm using kubeProxyReplacement=true. This lesson does that installation on three machines, proves that the Services answer while no kube-proxy iptables rule exists, and explains how Cilium assigns Pod addresses (its IPAM). It is aimed at readers who already know how to initialize a cluster with kubeadm and want to replace the default network.
What you will learn
- Initialize a cluster without kube-proxy, join two workers and install Cilium 1.20.5 with Helm
- Prove that Cilium replaces kube-proxy with
cilium-dbg status,iptables-saveand Cilium's Service table - Choose the Pod address pool and read the block each node receives
- Choose between the two IPAM modes,
cluster-poolandkubernetes - Recognize an exhausted pool and say why the per-node mask is chosen before installation
- Quote what the Cilium documentation asks for when Istio runs on the same cluster
Prerequisites
You know how to install a cluster with kubeadm and you have read Pod Networking, which explains the role of a CNI plugin (the component that gives each Pod an address and connects the Pod to the network). You have three Ubuntu 24.04 machines with containerd, kubeadm, kubelet and kubectl in 1.37, and Helm 4 on the control plane.
The outputs of this lesson were collected on 2026-11-15 on three machines named net-cp (control plane), net-w1 and net-w2 (workers), with Kubernetes v1.37.2, Helm v4.3.0 and Cilium 1.20.4. Two elements come from Cilium 1.20.5: the last line of the Helm output and the Cilium line of cilium-dbg status.
What does Cilium replace when it replaces kube-proxy?
When a Pod calls a Service (a stable virtual address in front of several Pods), someone has to turn this virtual address into the address of one of the Pods. By default, kube-proxy does it, a DaemonSet that writes iptables rules on each node. With kubeProxyReplacement=true, the Cilium agent does it: it loads into the kernel (with eBPF, small programs run as close as possible to the packets) a table of the Services and of the Pods that serve them.
The diagram follows the same call in both cases. On the left, kube-proxy writes KUBE-SVC rules that the packet goes through. On the right, the Cilium agent loads the eBPF table that the cilium-dbg service list command displays, and there is no KUBE-SVC rule at all.
Cilium keeps two constraints that kube-proxy does not have. The agent must reach the API server without going through a Service, since the kubernetes Service is served by nobody when it starts: that is the role of k8sServiceHost and k8sServicePort. And Cilium recommends a Linux kernel 5.10 or newer, which Ubuntu 24.04 provides with its 6.8 kernel.
How do you install a cluster without kube-proxy?
The installation takes three steps: initialize the control plane while skipping the kube-proxy phase, join the workers, then install Cilium. Between the second and the third, the nodes stay NotReady: no CNI plugin is in place yet, this is expected.
Initialize the control plane without kube-proxy
kubeadm installs kube-proxy in a phase called addon/kube-proxy. The --skip-phases option skips it:
sudo kubeadm init --skip-phases=addon/kube-proxyLook in the output for the list of installed addons. An excerpt of the real output:
[...][addons] Applied essential addon: CoreDNS
Your Kubernetes control-plane has initialized successfully![...]Only CoreDNS is announced: kube-proxy is neither installed nor mentioned. Then give yourself a kubeconfig, as the full output of kubeadm init asks:
mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/configJoin the two workers
The workers join the cluster with the join command that kubeadm init prints at the very end of its output, after the message about the Pod network. It has this form, with the control plane address of this lesson:
kubeadm join 10.10.50.14:6443 --token <token> \ --discovery-token-ca-cert-hash sha256:<fingerprint>Replace <token> and <fingerprint> with the values from your own output, then run the command with sudo on each worker. On each one, the output ends with This node has joined the cluster:. The workers also print a warning about kube-proxy, explained in the Troubleshooting section: it is normal.
Install Cilium as a kube-proxy replacement
Cilium is installed with its Helm chart, whose version is pinned with --version. Three values do the replacement: kubeProxyReplacement=true takes the place of kube-proxy, k8sServiceHost and k8sServicePort give the agent the direct address of the API server (here 10.10.50.14, the address of net-cp, and port 6443). The three ipam values set the Pod address pool, which the section on IPAM explains below.
helm repo add cilium https://helm.cilium.iohelm repo updatehelm install cilium cilium/cilium --version 1.20.5 --namespace kube-system \ --set kubeProxyReplacement=true \ --set k8sServiceHost=10.10.50.14 \ --set k8sServicePort=6443 \ --set ipam.mode=cluster-pool \ --set 'ipam.operator.clusterPoolIPv4PodCIDRList={10.244.0.0/16}' \ --set ipam.operator.clusterPoolIPv4MaskSize=24If you install with the cilium CLI (v0.20.3) instead of Helm, also pass --version 1.20.5: without this option, the CLI installs the image v1.20.3 by default.
The --namespace kube-system option sets the release namespace; without it, Helm takes the namespace of the current kubectl context. In Helm's output, check that the status is deployed and that the announced version is the right one:
NAME: cilium[...]NAMESPACE: kube-systemSTATUS: deployedREVISION: 1DESCRIPTION: Install complete[...]Your release version is 1.20.5.Wait for the agent to be deployed on each node, then look at the nodes:
kubectl -n kube-system rollout status ds/ciliumkubectl get nodes -o widedaemon set "cilium" successfully rolled outNAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIMEnet-cp.lab Ready control-plane 2m9s v1.37.2 10.10.50.14 <none> Ubuntu 24.04.5 LTS 6.8.0-147-generic (amd64) containerd://2.2.1net-w1.lab Ready <none> 115s v1.37.2 10.10.50.15 <none> Ubuntu 24.04.5 LTS 6.8.0-147-generic (amd64) containerd://2.2.1net-w2.lab Ready <none> 113s v1.37.2 10.10.50.16 <none> Ubuntu 24.04.5 LTS 6.8.0-147-generic (amd64) containerd://2.2.1The three nodes are Ready in v1.37.2: the network is in place, so the installation succeeded. To read back the values set, helm get values cilium -n kube-system returns exactly those of the command:
USER-SUPPLIED VALUES:ipam: mode: cluster-pool operator: clusterPoolIPv4MaskSize: 24 clusterPoolIPv4PodCIDRList: - 10.244.0.0/16k8sServiceHost: 10.10.50.14k8sServicePort: 6443kubeProxyReplacement: trueHow do you prove that Cilium replaces kube-proxy?
A cluster that answers does not prove that kube-proxy is absent: you need three proofs, each stronger than the last. The agent declares the replacement, no node carries a kube-proxy rule, and a Service answers anyway.
What does the Cilium agent say?
The cilium-dbg status command, run in an agent, summarizes the state of the network. The lines to look at are KubeProxyReplacement, Cilium and IPAM. Excerpt of the real output on net-cp (the Cilium line comes from Cilium 1.20.5, the other lines from Cilium 1.20.4):
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg statusKubernetes: Ok 1.37 (v1.37.2) [linux/amd64]KubeProxyReplacement: True [enp1s0 10.10.50.14 fe80::5054:8bff:fed2:13 (Direct Routing)]Cilium: Ok 1.20.5 (v1.20.5-15012141)IPAM: IPv4: 4/254 allocated from 10.244.0.0/24,Routing: Network: Tunnel [vxlan] Host: LegacyController Status: 23/23 healthy[...]KubeProxyReplacement: True answers the question, and the brackets give the network interface and the address through which Cilium serves the Services. The IPAM line is used in the next section. To keep only the useful line:
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg status | grep KubeProxyReplacementAre there still kube-proxy rules?
On each node, iptables-save lists the rules; grep -c counts those whose name contains KUBE-SVC, the chain that kube-proxy creates for each Service. On the control plane, also check that the DaemonSet does not exist:
sudo iptables-save | grep -c KUBE-SVCkubectl -n kube-system get ds kube-proxy0Error from server (NotFound): daemonsets.apps "kube-proxy" not foundThe 0 was collected on net-w1 and on net-cp. NotFound is the wanted proof: the DaemonSet never existed, since kubeadm init skipped the phase. Note that grep -c returns exit code 1 when it counts zero lines, and kubectl also returns 1 on NotFound. Both codes are expected here: do not take them for a failure in a script.
Does a Service still respond?
With no iptables rule, a Service must still stay reachable. Create a test application with two replicas and a Service, then call the Service from a worker:
kubectl create namespace demokubectl -n demo create deployment web --image=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 --replicas=2kubectl -n demo expose deployment web --port 80kubectl -n demo rollout status deployment webkubectl -n demo get svc web -o wideNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTORservice/web ClusterIP 10.106.185.207 <none> 80/TCP 17s app=webThe Service has the virtual address 10.106.185.207. Its two Pods, at 10.244.1.11 and 10.244.2.171, are listed in its EndpointSlice (kubectl -n demo get endpointslice); the section on IPAM also shows them with kubectl -n demo get pods -o wide. From a worker (with ssh net-w1.lab), call the virtual address:
curl -sI http://10.106.185.207/HTTP/1.1 200 OKServer: nginx/1.30.6Date: Sun, 15 Nov 2026 16:42:59 GMTContent-Type: text/htmlContent-Length: 896The 200 OK proves that the Service is served without kube-proxy. What remains is to see who serves it: the Cilium agent's Service table.
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg service listID Frontend Service Type Backend[...]6 10.106.185.207:80/TCP ClusterIP 1 => 10.244.1.11:80/TCP (active) 2 => 10.244.2.171:80/TCP (active)Line 6 associates the Service's virtual address (Frontend) with the two Pods (Backend), the same ones as in the EndpointSlice. It is this eBPF table, not an iptables chain, that translates the call. The omitted lines ([...]) describe other Services, including the kubernetes Service that leads to the API server.
Where do Pod addresses come from?
IPAM (IP Address Management) is the part of the network that decides which address each Pod receives. Cilium offers several modes. This lesson compares two: cluster-pool, the default mode, and kubernetes.
cluster-pool | kubernetes | |
|---|---|---|
| Who splits the pool per node | the Cilium operator, from a list of pools you provide | Kubernetes, through each node's podCIDR field |
| Where a node's block size is set | ipam.operator.clusterPoolIPv4MaskSize | in the cluster configuration, not in Cilium |
| When to choose it | you want a Cilium-specific pool, independent of kubeadm | the cluster already assigns a podCIDR to each node and you want to reuse it |
Only cluster-pool was installed and measured for this lesson. The kubernetes mode is described here from the Cilium documentation and has not been replayed: try it on a new cluster before relying on it.
Which pool should you choose?
The default cluster-pool pool is 10.0.0.0/8. In this cluster, the node network is 10.10.50.0/24, which is contained in this pool: a Pod could receive the address of an existing node. The 10.244.0.0/16 pool avoids this overlap, with a /24 block per node, that is 254 Pod addresses per node. Always choose a pool that overlaps neither the node network nor the Service network.
How do you read a node's block and a Pod's address?
Each node receives a block of the pool, visible in the CiliumNode resource. The node's Pods take their addresses in this block:
kubectl -n demo get pods -o widekubectl get ciliumnode net-w1.lab -o jsonpath='{.spec.ipam.podCIDRs}{"\n"}'NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESweb-877768f6b-k9mm7 1/1 Running 0 17s 10.244.2.171 net-w2.lab <none> <none>web-877768f6b-ln6rj 1/1 Running 0 17s 10.244.1.11 net-w1.lab <none> <none>["10.244.1.0/24"]The three nodes received a distinct block: 10.244.0.0/24 for net-cp, 10.244.1.0/24 for net-w1 and 10.244.2.0/24 for net-w2. The Pod on net-w1 is at 10.244.1.11 and the one on net-w2 at 10.244.2.171: each address is in the block of its node. On an agent, the IPAM line of cilium-dbg status gives the fill level of the block, for example IPv4: 4/254 allocated from 10.244.0.0/24.
What should you do when a node's pool is exhausted?
When the 254 addresses of a node's block are taken, the new Pods of that node do not start. This case was not provoked for this lesson: no exact message is published. Use kubectl get pods -o wide to spot the Pods stuck in ContainerCreating on the same node, read their events with kubectl describe pod, then compare with the IPAM line of cilium-dbg status on that node's agent.
The case is rare: the kubelet limits a node to 110 Pods by default, well before the 254 addresses, unless that limit has been raised.
The whole pool can also run out. The 10.244.0.0/16 pool split into /24 blocks offers 256 blocks: the 257th node receives none, and its Cilium agent waits for a block at startup. The Cilium documentation advises adding an element to clusterPoolIPv4PodCIDRList, without modifying the existing elements.
The per-node mask is chosen before installation: according to the Cilium documentation, changing clusterPoolIPv4MaskSize afterwards is not possible. So calculate the maximum number of Pods per node before choosing /24 or a wider block.
What should you do when Istio runs on the same cluster?
Cilium and Istio can coexist when Cilium replaces kube-proxy, provided you set two Helm values that the Cilium documentation asks for with Istio:
socketLB.hostNamespaceOnly=truelimits to the host network namespace the Service translation done at the socket level. A Pod's traffic thus keeps the Service address that the mesh reads.cni.exclusive=falsestops Cilium from renaming the node's other CNI configurations to*.cilium_bak, which it does by default and which would get in the way of Istio's CNI plugin.
These two values have not been replayed for this lesson.
The Cilium documentation also recommends keeping kube-proxy when Istio coexists: this is information about Cilium, and the lesson did not replay it.
The cluster of the Istio lessons of the course does not run under Cilium: it uses Calico, with kube-proxy. It is separate from the one in this lesson because Cilium's egress gateway requires bpf.masquerade=true, which Istio's ambient mode does not support.
Troubleshooting
Each row starts from what you observe. Always start with kubectl get nodes then cilium-dbg status.
| Symptom | Likely cause | Solution |
|---|---|---|
The nodes stay NotReady after kubeadm join | Cilium is not installed yet, or its agent has not started | Run helm install, then kubectl -n kube-system rollout status ds/cilium |
kubeadm join prints No kubeproxy.config.k8s.io/v1alpha1 config is loaded ... configmaps "kube-proxy" is forbidden | Expected warning: the addon/kube-proxy phase was skipped, so the join token cannot read the kube-proxy ConfigMap | Do nothing, check that the node does join the cluster |
| The Cilium agent does not start or does not reach the API server | Wrong k8sServiceHost or k8sServicePort: without kube-proxy, the agent cannot go through the kubernetes Service | Re-read helm get values cilium -n kube-system and fix the control plane address and port |
cilium-dbg status does not show KubeProxyReplacement: True | kubeProxyReplacement=true missing from the Helm values | Rerun helm upgrade with the value, then re-read the status |
iptables-save | grep -c KUBE-SVC does not return 0 | The cluster was initialized without --skip-phases=addon/kube-proxy | Start again on a new cluster initialized with the option |
| A Pod receives an address from the node network | The default 10.0.0.0/8 pool overlaps this network | Choose a separate pool at installation, such as 10.244.0.0/16 |
Pods of a single node stay in ContainerCreating | The node's address block is full (case not reproduced for this lesson) | Read kubectl describe pod and the IPAM line of that node's agent status |
Put it into practice
The lab initializes a cluster without kube-proxy, joins two workers, installs Cilium 1.20.5 with the 10.244.0.0/16 pool, then deploys the web Service. The validation reads the cluster state: kube-proxy absent, three Ready nodes, KubeProxyReplacement: True on each node, no KUBE-SVC or KUBE-SERVICES rule, a Service served from a worker and Pods in the chosen pool. It does not look at the commands you type.
Key points
kubeadm init --skip-phases=addon/kube-proxydoes not install kube-proxy; Cilium takes over withkubeProxyReplacement=true.- Without kube-proxy, the Cilium agent reaches the API server directly:
k8sServiceHostandk8sServicePortare mandatory. - Three proofs of the replacement:
KubeProxyReplacement: True, zeroKUBE-SVCrules and a Service that answers, visible incilium-dbg service list. - The Cilium Helm chart is pinned to a version (
--version 1.20.5); Cilium 1.20.5 does not declare Kubernetes 1.37, yet this cluster runs 1.37. - The
cluster-poolIPAM splits a pool into one block per node; the default10.0.0.0/8pool can overlap the node network, so you choose it. - The per-node mask is chosen before installation; a node whose 254 addresses are taken no longer starts any Pod.
- With Istio, the Cilium documentation asks for
socketLB.hostNamespaceOnly=trueandcni.exclusive=false, and recommends keeping kube-proxy. The labs' Istio cluster runs under Calico, not under Cilium.
Knowledge check
These questions cover the installation without kube-proxy, the proofs of the replacement and the IPAM.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Capture a Pod's traffic and read the cause of a failure
A new full quiz with random questions
Work again only on the questions you missed