Interview Prep/Networking/DNS resolution failures

A Kubernetes pod can resolve `orders` but not `orders.payments`.

BeginnerTroubleshootingDNS resolution failures
Answer

Likely causes → orders resolves in the pod's own namespace; the Service in namespace payments doesn't exist, has a different name, or a NetworkPolicy blocks DNS from that pod.

Diagnose →

kubectl get svc -n payments
kubectl exec pod -- nslookup orders.payments.svc.cluster.local

Fix → Use the right name/namespace or create the Service.

Prevent → Prefer <svc>.<ns>.svc.cluster.local in cross-namespace config.

All Networking questions Roadmap: Networking for DevOps

More on DNS resolution failures