kube-proxy and Service Implementation
A Service is not a process. It is a set of packet-rewriting rules that kube-proxy programs on every node, which is why kube-proxy is one of the most privileged Pods in the cluster and why a Service has no traffic to intercept.
Cluster Component Security Guide 15 of 42 Intermediate
- Kubernetesapiserver v1.36.4, kubelet v1.36.3
- Runtimecontainerd 2.2.6
- CNICilium 1.18.1
- Built withkubeadm v1.36.3
- TimeAbout 14 min
kube-proxy in iptables mode - mode: "" defaults to iptables on Linux. Cilium is installed with kubeProxyReplacement=false, so kube-proxy is genuinely doing this work rather than being decorative.
- Host kernel7.0.0-29
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA5001 | 192.168.0.41 | Ubuntu 26.04 LTS | Control Plane Node (tainted NoSchedule) | 2 Core | 4 GB | 50 GB |
| CKA5001-NODE01 | 192.168.0.42 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA5001-NODE02 | 192.168.0.43 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA5001-NODE03 | 192.168.0.44 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you have to account for the most privileged Pod on a node. This matters because a Service is not a process - it is rules that kube-proxy writes, which is why that Pod runs with host networking and elevated privilege.
- reading kube-proxy's securityContext and its host network setting
- finding a Service expressed as the rules kube-proxy actually wrote
- checking the identity it runs as, which is far less privileged than the Pod itself
Before you start
- guide 14 - the other node-level component.
-
The most privileged Pod on the node
-
A Service, as rules
-
The identity it runs as