What is the ndots setting and why does it affect Kubernetes DNS performance?

AdvancedConceptDNS
Answer

ndots:5 in a pod's resolv.conf means any name with fewer than 5 dots is first tried with each search domain appended (api.example.com.default.svc.cluster.local, then ...svc.cluster.local, and so on) before the bare name. External lookups therefore generate several NXDOMAIN queries first.

Mitigate by using trailing-dot FQDNs, lowering ndots with dnsConfig, or running NodeLocal DNSCache.

dnsConfig:
  options:
    - name: ndots
      value: "2"
All Networking questions Roadmap: Networking for DevOps

More on DNS