A Pod can reach a Service in another namespace by ClusterIP but `curl https://orders.shop.svc` fails with a TLS error `x509: certificate is valid for orders.example.com, not orders.shop.svc`.
IntermediateTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer
Likely causes → The backend serves a certificate issued for its external name. The internal Service DNS name is not in the certificate SANs.
Diagnose →
kubectl run tls --rm -it --image=nicolaka/netshoot --restart=Never -- \
openssl s_client -connect orders.shop.svc:443 -servername orders.shop.svc </dev/null 2>/dev/null | openssl x509 -noout -ext subjectAltName
Fix → Issue a certificate (cert-manager) that includes orders.shop.svc and orders.shop.svc.cluster.local, or call the internal endpoint over plain HTTP inside a mesh with mTLS.
Prevent → cert-manager Certificates with both external and internal DNS names for services that must use TLS in-cluster.
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