Pod DNS Not Working - Part 1
Can you debug a Kubernetes DNS failure in 2 commands? ?
Most engineers can't. Here's the trick senior SREs use ?
If your first instinct is to dive into CoreDNS logs — stop. There's a 2-command test that tells you exactly where the problem is before you waste 30 minutes debugging.
Run these inside the broken pod:
1. nslookup kubernetes.default
2. nslookup google.com
The pass/fail pattern is your map:
? Both fail → cluster DNS or firewall issue
? Internal works, external fails → CoreDNS forwarding broken
? Internal fails, external works → wrong DNS server in /etc/resolv.conf
? Both work but slow → DNS isn't broken, it's overloaded
Also watch HOW it fails:
- "No such host" = name doesn't exist
- "Timeout" = never reached the DNS server
Save this for your next K8s outage ?
Part 2 coming — when cluster DNS itself is dead.
#kubernetes #k8s #devops #coredns #kubernetesdns #kubernetestutorial #devopsinterview #kubernetesinterview #cloudnative #sre #kubectl #cka #ckad #kubernetestips #devopsengineer #containerization #k8stutorial #cloudengineer #kubernetesshorts #kubernetestroubleshooting
KodeKloud
...