`curl http://orders.shop.svc.cluster.local` hangs, and `kubectl get endpointslices -l kubernetes.io/service-name=orders` shows `ENDPOINTS <unset>`.
BeginnerTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer
Likely causes → The Service selector matches no Ready Pods: label typo (app: order vs app: orders), Pods in another namespace, or all matching Pods failing readiness.
Diagnose →
kubectl get svc orders -n shop -o jsonpath='{.spec.selector}{"\n"}'
kubectl get pods -n shop --show-labels | grep orders
kubectl get pods -n shop -l app=orders # use the exact selector
Fix → Align the Service selector with the Pod template labels, or fix readiness. Endpoints appear within seconds.
Prevent → Generate Service selectors and Pod labels from the same Helm helper; alert on Services with zero ready endpoints.
More on Services, DNS, Ingress and NetworkPolicy
Endpoints 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.IntermediateInside a Pod, `nslookup orders` returns `;; connection timed out; no servers could be reached`.BeginnerCoreDNS 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