Interview Prep/Monitoring & Observability/Grafana, Dashboards and Kubernetes Monitoring

DNS lookups inside the cluster intermittently take 5 seconds. How do you monitor and catch this?

AdvancedScenarioGrafana, Dashboards and Kubernetes Monitoring
Answer

Situation read → Classic conntrack race or CoreDNS overload, often with ndots:5 causing many lookups.

What I'd do →

  1. Monitor CoreDNS: coredns_dns_request_duration_seconds, coredns_dns_responses_total{rcode="SERVFAIL"}, coredns_forward_requests_total.
  2. Add a blackbox DNS probe from inside the cluster.
  3. Deploy NodeLocal DNSCache to reduce conntrack races and load.
  4. Lower ndots in pod dnsConfig or use FQDNs with trailing dots for external names.
  5. Scale CoreDNS (HPA or proportional autoscaler).

Why → 5-second delays match the default resolver timeout after a dropped UDP packet.

Interview tip → Mentioning the 5s timeout and NodeLocal DNSCache shows real experience.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana, Dashboards and Kubernetes Monitoring