Pods intermittently log `dial tcp: lookup orders on 10.96.0.10:53: i/o timeout`, about 5 seconds per failure.
AdvancedTroubleshootingDNS resolution failures
Answer
Likely causes → The classic conntrack race: glibc sends A and AAAA queries in parallel from the same socket, both UDP packets hit DNAT at once, one loses the conntrack insert and is dropped, and the resolver waits its 5 s timeout. Also CoreDNS overload or too few replicas.
Diagnose →
conntrack -S | grep insert_failed # on nodes; rising = the race
kubectl -n kube-system top pod -l k8s-app=kube-dns
Fix → Add options single-request-reopen (glibc) via dnsConfig, deploy NodeLocal DNSCache (avoids DNAT for DNS), or switch to a CNI that avoids the race. Scale CoreDNS.
Prevent → Alert on CoreDNS latency and insert_failed; run NodeLocal DNSCache by default.
More on DNS resolution failures
`dig app.example.com` returns `status: NXDOMAIN`.Beginner`dig` returns `status: SERVFAIL` for one domain while other domains resolve fine.Intermediate`curl: (6) Could not resolve host: api.example.com` inside a container but it resolves on the host.BeginnerA DNS change was made 2 hours ago, but some users still reach the old IP.BeginnerJava service keeps connecting to an old IP long after the DNS record changed.IntermediateIn Kubernetes, external lookups from pods are slow and CoreDNS logs show many NXDOMAIN queries like `api.stripe.com.default.svc.cluster.local`.Intermediate