How do you debug DNS problems in a cluster?
IntermediateProductionObservability & Day-2 Operations
Answer
Check CoreDNS Pods and logs, test resolution from a debug Pod, look for NXDOMAIN due to ndots, throttled upstream (conntrack races, UDP limits), and the forward target. Scale CoreDNS with the cluster-proportional autoscaler, add NodeLocal DNSCache, and monitor coredns_dns_request_duration_seconds and error counts.
kubectl -n kube-system logs -l k8s-app=kube-dns --tail=50
kubectl run -it --rm d --image=busybox:1.36 -- nslookup kubernetes.default
More on Observability & Day-2 Operations
What are the three pillars of observability and the standard tools on Kubernetes?BeginnerWhat is kube-state-metrics and how does it differ from metrics-server?BeginnerWhich alerts do you set up first on a cluster?BeginnerWhere do container logs live and how do you ship them?BeginnerWhat is the difference between `kubectl logs --previous` and `kubectl logs -f`?BeginnerWhat does a good runbook for a Kubernetes alert include?Beginner