Interview Prep/Real-World Interview/DNS, TLS and certificates

Pods across the cluster log "dial udp 10.96.0.10:53: i/o timeout" and "getaddrinfo EAI_AGAIN" during peak traffic.

IntermediateTroubleshootingDNS, TLS and certificates
Answer

Likely causes → CoreDNS is overloaded or being throttled: only two replicas for hundreds of nodes, a tight CPU limit, OOMKills, or a flood of queries caused by ndots:5 expanding every external name into several search-domain lookups.

Diagnose →

kubectl -n kube-system get pods -l k8s-app=kube-dns -o wide
kubectl -n kube-system top pods -l k8s-app=kube-dns
kubectl -n kube-system logs -l k8s-app=kube-dns --tail=50
kubectl exec deploy/api -- cat /etc/resolv.conf

Check coredns_dns_requests_total and coredns_forward_request_duration_seconds in Prometheus.

Fix → Scale CoreDNS (or enable the cluster-proportional-autoscaler), remove its CPU limit, and deploy NodeLocal DNSCache so most queries never leave the node. Use FQDNs with a trailing dot or dnsConfig.options: [{name: ndots, value: "2"}] for chatty services.

Prevent → Alert on CoreDNS error rate and latency, and size DNS for peak, not average.

All Real-World Interview questions Roadmap: Interview readiness

More on DNS, TLS and certificates