Back to all scenarios
Scenario #188
Networking
K8s v1.18, GKE

DNS Query Timeout Due to Unoptimized CoreDNS Config

DNS queries were timing out in the cluster, causing delays in service discovery, due to unoptimized CoreDNS configuration.

Find this helpful?
What Happened

The CoreDNS configuration was not optimized for the cluster size, resulting in DNS query timeouts under high load.

Diagnosis Steps
  • 1Checked CoreDNS logs and saw frequent query timeouts.
  • 2Used kubectl describe pod on CoreDNS pods and found that they were under-resourced, leading to DNS query delays.
Root Cause

CoreDNS was misconfigured and lacked adequate CPU and memory resources to handle the query load.

Fix/Workaround
• Increased CPU and memory requests/limits for CoreDNS.
• Optimized the CoreDNS configuration to use a more efficient query handling strategy.
Lessons Learned

CoreDNS needs to be properly resourced and optimized for performance, especially in large clusters.

How to Avoid
  • 1Regularly monitor DNS performance and adjust CoreDNS resource allocations.
  • 2Fine-tune the CoreDNS configuration to improve query handling efficiency.