CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

kube-proxy: iptables and IPVS Modes

Trace one Service from its ClusterIP through three iptables chains to the DNAT rule that rewrites the packet, then switch a cluster to IPVS and read the same routing out of ipvsadm. Two implementations of the same abstraction, both visible.

Services and Networking Guide 53 of 103 Advanced

Written against the versions above. Chain names contain a hash of the Service identity, so yours will differ. The structure will not.

iptables on the four-node cluster; the IPVS switch is done on the single-node cluster, where a mode change affects nothing else.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA4001192.168.0.191Ubuntu 26.04 LTSControl Plane Node (single-node cluster)2 Core4 GB50 GB

Before you start

  1. Which mode is kube-proxy in, and how to tell reliably

  2. Follow one ClusterIP through three chains

  3. Session affinity, visible as a different rule

  4. Switch to IPVS

  5. The same routing, in a table you can actually read

  6. Switch back

Official sources