A Pod in namespace `web` cannot resolve `redis`, which runs in namespace `cache`.
BeginnerTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer
Likely causes → Short names resolve only within the Pod's own namespace through the search list. redis becomes redis.web.svc.cluster.local, which does not exist.
Diagnose →
kubectl exec web-x -n web -- nslookup redis.cache.svc.cluster.local
Fix → Use redis.cache or the full redis.cache.svc.cluster.local in the app configuration.
Prevent → Always configure cross-namespace dependencies with <svc>.<namespace>.svc.cluster.local; it also avoids extra search-domain lookups.
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.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`.Intermediate