NodePort traffic works on one node but not others. What could be wrong?
IntermediateScenarioServices, Ingress and DNS
Answer
Situation read → Service of type NodePort answers on node A's IP but times out on node B.
What I'd do →
- Check
externalTrafficPolicy(Local only answers on nodes that host a pod) - Check the node security group or firewall allows the 30000-32767 range
kubectl get pods -o wideto see which nodes host pods- Check kube-proxy health on node B
- Use
externalTrafficPolicy: Clusterif you want any node to answer
Why → With Local, nodes without a local endpoint drop traffic to preserve the client IP.
Interview tip → Mention health checks used by cloud LBs rely on this behaviour.
More on Services, Ingress and DNS
A Service has no endpoints. How do you find out why?BeginnerWhen do you use ClusterIP, NodePort, LoadBalancer and ExternalName?BeginnerTraffic to a Service works from some pods but times out from others. How do you debug it?AdvancedYou want to expose three HTTP services under one hostname with different paths. How?Intermediateingress-nginx returns 404 for a new host. What do you check?Intermediateingress-nginx returns 502 or 503 intermittently. What are the likely reasons?Intermediate