Inside a Pod, `nslookup orders` returns `;; connection timed out; no servers could be reached`.
BeginnerTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer
Likely causes → Pods cannot reach CoreDNS: CoreDNS Pods down, the kube-dns Service has no endpoints, a NetworkPolicy blocks UDP/TCP 53, or security groups block traffic between nodes.
Diagnose →
kubectl get pods -n kube-system -l k8s-app=kube-dns
kubectl get endpointslices -n kube-system -l kubernetes.io/service-name=kube-dns
kubectl exec web-x -- cat /etc/resolv.conf
kubectl run dnstest --rm -it --image=busybox:1.36 --restart=Never -- nslookup kubernetes.default
Fix → Restore CoreDNS (scale up, fix crash), add a NetworkPolicy egress rule for DNS, or open node-to-node UDP/TCP 53.
Prevent → At least 2 CoreDNS replicas with anti-affinity and a PDB, plus a DNS probe in synthetic monitoring.
More on Services, DNS, Ingress and NetworkPolicy
`curl http://orders.shop.svc.cluster.local` hangs, and `kubectl get endpointslices -l kubernetes.io/service-name=orders` shows `ENDPOINTS <unset>`.BeginnerEndpoints exist, but `curl orders:80` returns `Connection refused`.BeginnerA Service works when you curl the Pod IP but times out on the ClusterIP from every node.IntermediateCoreDNS Pods are in CrashLoopBackOff with `[FATAL] plugin/loop: Loop (127.0.0.1:41823 -> :53) detected for zone "."`.IntermediateCalls to `api.stripe.com` from Pods are slow, and CoreDNS logs show `api.stripe.com.payments.svc.cluster.local`, `api.stripe.com.svc.cluster.local` … all `NXDOMAIN`.IntermediateDNS lookups occasionally take exactly 5 seconds, then succeed.Advanced