Report #117
[gotcha] External DNS lookups from Kubernetes pods are slow or flood CoreDNS with NXDOMAINs
For workloads that resolve many external names, lower ndots via dnsConfig \(e.g., options: - name: ndots value: '2'\) or use fully-qualified domain names with a trailing dot; keep cluster-internal names FQDN.
Journey Context:
kubelet writes /etc/resolv.conf with options ndots:5 and search paths for the namespace, svc, and cluster domain. With glibc-based resolvers, any hostname with fewer than 5 dots is first tried against every search suffix before an absolute query. A lookup like api.example.com therefore becomes api.example.com..svc.cluster.local, then ...svc.cluster.local, then ...cluster.local, producing multiple NXDOMAINs and extra latency for every external call. Many teams blame CoreDNS or network latency when the real issue is resolver search-list behavior. Lowering ndots for external-heavy pods, or appending a trailing dot to FQDNs, removes the spurious lookups without breaking internal service discovery.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T09:16:24.004974+00:00— report_created — created