Interview Prep/Networking/Kubernetes, Containers, MTU & Performance Basics

What does `externalTrafficPolicy: Local` change on a LoadBalancer Service?

AdvancedConceptKubernetes, Containers, MTU & Performance Basics
Answer

With the default Cluster, a node may forward traffic to a pod on another node, adding a hop and SNAT, so the pod loses the client source IP. With Local, a node only serves traffic to its own pods, preserving client IP and avoiding the extra hop, and the load balancer's health check removes nodes without local pods.

Trade-off: uneven distribution if pods are not spread evenly across nodes, so combine it with topology spread constraints.

All Networking questions Roadmap: Networking for DevOps

More on Kubernetes, Containers, MTU & Performance Basics