← writing

How a request reaches a Kubernetes pod

Rudra Narayan Panda ·

Pods come and go, and their IP addresses go with them. Kubernetes networking is the set of pieces that give clients a stable address anyway. This is the second of two posts. The first covers what runs where. This one follows a request in, and covers two changes in 2026 that older guides miss.

every pod gets an IP

The Kubernetes network model says each pod has its own IP address, and any pod can reach any other pod without NAT. Kubernetes only states the rule. A network plugin (CNI), such as Calico, Cilium or Flannel, does the wiring, and the container runtime calls it to set up the pod's network when the pod starts.

services give pods a stable address

A Service has a virtual IP (the ClusterIP), a DNS name such as web.default.svc.cluster.local, and a label selector. The pods that match the selector are listed in EndpointSlices, each with a ready flag:

kubectl get endpointslices -l kubernetes.io/service-name=web

In iptables and nftables mode, the ClusterIP is not on any network interface. kube-proxy runs on every node, watches Services and EndpointSlices, and programs the node's packet filter so traffic to the ClusterIP is rewritten to the IP of one ready pod. Pods whose endpoint is not ready are skipped. Without that rewrite, the address leads nowhere. Some network plugins, Cilium for one, can replace kube-proxy and do this themselves.

A Service in front of three pods A client pod sends traffic to the Service's virtual ClusterIP. kube-proxy's rules on the node rewrite it to the IP of one ready pod. The EndpointSlice lists all three pods with a ready flag, and kube-proxy reads it. kube-proxy skips the third pod because it is not ready. EndpointSlice web 10.0.1.4 ready 10.0.2.7 ready 10.0.1.9 not ready read by kube-proxy client pod 10.0.3.8 Service web ClusterIP 10.96.0.12 kube-proxy rewrites to a pod pod 10.0.1.4 Ready pod 10.0.2.7 Ready pod 10.0.1.9 not Ready listed as not ready, so kube-proxy skips it In iptables and nftables mode the ClusterIP is on no interface. It exists only in kube-proxy's rules, on every node.
Example addresses. The client talks to the Service address, and the node's rules send each connection to one ready pod.

kube-proxy has three modes on Linux, and one is on its way out

modestatus
iptablesThe default. It works everywhere, and the rules slow down as the number of Services grows.
nftablesGA since v1.33. It needs Linux kernel 5.13 or later. It is the recommended choice, and you have to select it yourself because clusters do not switch on upgrade.
ipvsDeprecated since v1.35. SIG Network wrote on 16 Nov 2026 that it plans to remove it in v1.40, and recommends nftables for v1.36 and later.

If you run IPVS, plan the move to nftables. In a kubeadm cluster that means setting mode: nftables in the kube-proxy ConfigMap and restarting kube-proxy. IPVS-specific options need to be mapped across by hand. The announcement is linked at the end.

service types

typewhat it adds
ClusterIPThe virtual IP, reachable only inside the cluster. The default.
NodePortAlso opens a port on every node (30000 to 32767 by default) that forwards to the Service.
LoadBalancerAlso asks the cloud provider for an external load balancer pointing at the Service.
ExternalNameNo proxying. The Service name resolves to a DNS name you give it.

layer 4 and layer 7

A Service works at layer 4. It sees an IP address and a port, over TCP or UDP, and nothing of the HTTP request inside. It cannot send /api to one Service and /static to another, or choose by hostname, or terminate TLS for several domains. That is layer 7 work, and it needs something that reads HTTP: an Ingress controller or a Gateway API implementation, running as pods in your cluster behind a LoadBalancer or NodePort Service.

ingress is frozen, and ingress-nginx is retired

The Ingress API is still GA, but it is feature-frozen, and new development has moved to the Gateway API. The most widely used controller, the community ingress-nginx, was retired. SIG Network announced on 11 Nov 2025 that maintenance would end in March 2026. After that date there are no more releases, bug fixes or security updates. Existing deployments keep running, but nothing patches them. The retirement covers that one project. Other Ingress controllers are separate projects, and they are not part of it.

The Gateway API, whose core resources have been GA since October 2023, is the recommended replacement. It splits what Ingress puts in one object. A platform team owns the Gateway (the listener, the addresses, the TLS), and each app team owns an HTTPRoute that attaches to it:

Who owns what in the Gateway API The platform team owns the GatewayClass and the Gateway. An app team owns an HTTPRoute, which attaches to the Gateway with parentRefs and sends traffic to Services with backendRefs. platform team owns GatewayClass which controller Gateway listeners, addresses, TLS uses class app team owns HTTPRoute hostnames, paths, rules parentRefs Service api Service web backendRefs
The Gateway belongs to the platform team. App teams attach their own routes to it and point them at Services.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: web
spec:
  parentRefs:
    - name: public-gateway
  hostnames: ["example.com"]
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api
      backendRefs:
        - name: api
          port: 80

one request, end to end

One request, end to end A client resolves the name through DNS to a cloud load balancer, which works at layer 4. The load balancer typically sends traffic to a NodePort on one of the nodes, where kube-proxy's rules forward it to a gateway pod. The gateway pod reads the HTTP host and path at layer 7 and picks a route. It then reads the route's Service EndpointSlices and usually sends to the IP of one ready pod directly. inside the cluster client browser, curl, a service DNS: example.com becomes the load balancer's IP cloud load balancer for a LoadBalancer Service typically sends to a NodePort on one of the nodes L4 node: kube-proxy rules gateway Service's NodePort kube-proxy forwards the connection to one gateway pod L4 gateway pod reads the HTTP request reads host and path, picks the route and its Service L7 pod one of the Service's pods the gateway reads the Service's EndpointSlices, sends to a pod IP L4 sees an IP address and a port. L7 sees the HTTP request.
The load balancer and the node's rules only see addresses and ports. Only the gateway reads the HTTP request, and it usually sends straight to a pod IP.

where it breaks

symptomcheck
Service name does not resolve, pod IP worksDNS: the CoreDNS pods, and the pod's /etc/resolv.conf.
Service resolves but connections failkubectl get endpointslices -o yaml. No endpoints means the selector matches nothing. Endpoints with ready: false mean no pod is ready yet.
LoadBalancer stays <pending>Whether a cloud controller or load balancer implementation is installed, and the cloud quota.
404 from the gatewayThat the route is attached to the Gateway, and that the hostname and path match the request.
NodePort answers on some nodes onlyThe Service's externalTrafficPolicy. With Local, only nodes that run a matching pod answer.

what I checked

The dates and versions above come from the Kubernetes project's own posts, linked below, and I rechecked them in November 2026. I wrote this from the documentation, not from experiments on a cluster. The commands and the table are a starting point. If you are moving off ingress-nginx or IPVS, read the migration notes for your own distribution and test on a copy of your cluster first.

sources