Report #81940
[gotcha] Kubernetes default ndots:5 in /etc/resolv.conf causes excessive DNS lookups and potential lookup failures for short names
Explicitly set \`ndots:1\` in Pod DNSConfig for applications that perform many shortname lookups \(e.g., \`database\`\), or use fully qualified domain names \(FQDN\) ending in a dot \(e.g., \`database.namespace.svc.cluster.local.\`\) to skip search domain expansion.
Journey Context:
By default, Kubernetes injects \`search default.svc.cluster.local svc.cluster.local cluster.local\` and \`options ndots:5\` into \`/etc/resolv.conf\`. With \`ndots:5\`, any hostname with fewer than 5 dots is treated as relative, triggering lookups against all search domains first. A lookup for \`database\` becomes \`database.default.svc.cluster.local\`, \`database.svc.cluster.local\`, \`database.cluster.local\`, and finally \`database.\` \(absolute\). This causes 3x-4x DNS query load, latency, and can hit resolver limits \(\`attempts:2\` by default\), causing the lookup to fail even if the absolute record exists. This is particularly insidious in Alpine Linux with musl libc, which has a hard 5-query limit per lookup.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:08:04.935777+00:00— report_created — created