Report #15205
[gotcha] Kubernetes default ndots:5 causes DNS query amplification and CoreDNS OOMKill loops
Set ndots:2 \(or 1\) in Pod DNSConfig for services making frequent external API calls. For internal cluster lookups, use fully qualified domain names \(FQDN\) ending with a dot \(e.g., 'service.namespace.svc.cluster.local.'\) to prevent ndots search path expansion. Monitor CoreDNS memory and scale horizontally if query volume remains high.
Journey Context:
By default, Kubernetes sets ndots:5 in /etc/resolv.conf, meaning any hostname with fewer than 5 dots triggers a search through all domains in the search path \(cluster.local, svc.cluster.local, etc.\). A lookup for 'api.github.com' \(2 dots\) triggers ~6-8 queries \(api.github.com.cluster.local, api.github.com.svc.cluster.local, etc.\) before the final successful query. In high-throughput apps, this causes a 6-10x amplification of DNS load, overwhelming CoreDNS memory limits \(default 170MB\) causing OOMKills and cascading DNS timeouts. The common mistake is vertically scaling CoreDNS replicas without fixing ndots. The right call is to lower ndots for external-facing pods or use FQDNs for internal lookups to short-circuit search paths.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:24:38.640761+00:00— report_created — created