Interview Prep/Kubernetes/Services, DNS, Ingress and NetworkPolicy

A Service works when you curl the Pod IP but times out on the ClusterIP from every node.

IntermediateTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer

Likely causes → Service translation is broken cluster-wide: kube-proxy DaemonSet not running or crash-looping (bad config after upgrade), or the CNI's kube-proxy replacement misconfigured. Also check that you are using the right port (ClusterIP port, not targetPort).

Diagnose →

kubectl get ds kube-proxy -n kube-system
kubectl logs -n kube-system ds/kube-proxy --tail=50
# On a node, iptables mode
sudo iptables-save -t nat | grep orders
# IPVS mode
sudo ipvsadm -Ln | grep -A3 <cluster-ip>

Fix → Fix kube-proxy (version must match the cluster, config map valid). On EKS, update the kube-proxy add-on to the version for your Kubernetes release.

Prevent → Upgrade kube-proxy, CoreDNS and the CNI together with the control plane.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Services, DNS, Ingress and NetworkPolicy