Report #55840
[gotcha] High DNS query latency and timeouts in Kubernetes for external domains
Set ndots:1 in the Pod's DNSConfig for workloads querying many external domains, or use fully qualified domain names \(trailing dot\) in connection strings to force absolute lookup immediately
Journey Context:
By default, Kubernetes sets ndots:5 in /etc/resolv.conf \(inherited from legacy glibc defaults\). This means any domain name with fewer than 5 dots is treated as relative, triggering sequential suffix searches \(e.g., 'api.stripe.com' becomes 'api.stripe.com.namespace.svc.cluster.local.', then '.svc.cluster.local.', etc.\) before trying the absolute name. Each failed search hits the cluster DNS \(CoreDNS\), causing 5x query load and 5-second timeouts per attempt \(default 5s timeout\). This cripples external API calls. The common mistake is using short names like 'database' or 'api.stripe.com' without a trailing dot. The fix is to set ndots:1 for pods doing external calls \(so only single-label names are relative\), or strictly use FQDNs like 'api.stripe.com.' \(note the dot\) to bypass search entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:13:16.899660+00:00— report_created — created