Start by outlining the high-level path: external request → ingress → service → kube-proxy → pod. Then dive into each component's role, emphasizing how service discovery and load balancing work at each layer. Conclude by mentioning trade-offs and alternatives like Ingress controllers, service meshes, and CNI plugins.
Pro tip: Mention that kube-proxy in iptables mode uses random selection for load balancing, which can lead to uneven distribution, and that IPVS mode offers better performance and algorithms. This shows depth beyond basic knowledge.
Explain how an external request reaches the cluster, typically via a LoadBalancer service or an Ingress controller. Mention DNS resolution to the external IP.
Describe how the request hits a Service (ClusterIP) and how kube-proxy (or eBPF) intercepts and routes traffic to backend pods based on iptables/IPVS rules.
Detail how kube-proxy selects a pod from the Endpoints list, using random or round-robin algorithms, and how session affinity can be configured.
Explain how the packet reaches the pod's network namespace via the CNI plugin (e.g., Calico, Flannel), including any overlay or underlay networking.
Describe how the pod's application receives the request on its container port, processes it, and sends a response back through the same path.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.