k8wiz
Kubernetes
Hard
Networking

What does externalTrafficPolicy: Local do on a NodePort or LoadBalancer Service?

Select your answer:

Show answer and explanation

Answer: Preserves the client IP and only uses pods on the receiving node

Explanation

With the default Cluster policy, a node can forward traffic to a pod on another node, and SNAT hides the client IP. Local skips that extra hop, so the pod sees the real client IP. The trade-off is that nodes without a ready local pod drop the traffic and load can be uneven. Cloud load balancers use the Service's healthCheckNodePort to stop sending traffic to those nodes.