Report #46927
[gotcha] Kubernetes DNS 5-second timeout on external domains with ndots:5
Always use Fully Qualified Domain Names \(FQDN\) with a trailing dot \(e.g., 'database.example.com.'\) for external services, or explicitly set 'ndots: 1' in the pod's dnsConfig to prevent search domain expansion.
Journey Context:
By default, Kubernetes sets 'ndots: 5' in /etc/resolv.conf inside pods. When a query contains fewer than 5 dots \(e.g., 'api.external.com' has 2\), the resolver tries the query against all search domains \(cluster.local, svc.cluster.local, namespace.svc.cluster.local\) first. This results in 4-5 NXDOMAIN lookups before the absolute lookup, each with a 5-second timeout, causing 20-25 second delays. Using a trailing dot makes the query absolute immediately, bypassing search expansion. Alternatively, lowering ndots to 1 or 2 trades off convenience for speed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:14:20.897781+00:00— report_created — created