Interview Prep/Networking/Containers, Kubernetes, IPv6 and packet captures

A NodePort Service answers on some nodes and times out on others.

IntermediateTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer

Likely causes → externalTrafficPolicy: Local is set: only nodes running a ready pod for that Service answer; others drop the traffic (by design, to preserve client IP). Otherwise, security groups or host firewalls differ between nodes.

Diagnose →

kubectl get svc myapp -o jsonpath='{.spec.externalTrafficPolicy}'; echo
kubectl get pods -l app=myapp -o wide           # which nodes have pods
curl -m 3 http://<node-ip>:<nodeport>/          # per node

Fix → Either use Cluster policy (any node forwards, client IP is SNATed), or keep Local and make sure the LB health-checks healthCheckNodePort so it only sends traffic to nodes with pods.

Prevent → Use Local only behind an LB that honours the health-check node port; spread pods with topology spread constraints.

All Networking questions Roadmap: Networking for DevOps

More on Containers, Kubernetes, IPv6 and packet captures