Back to all scenarios
Scenario #176
Networking
K8s v1.18, On-premise

Pod DNS Resolution Failure Due to CoreDNS Configuration Issue

DNS resolution failures occurred within pods due to a misconfiguration in the CoreDNS config map.

Find this helpful?
What Happened

CoreDNS was misconfigured to not forward DNS queries to external DNS servers, causing pods to fail when resolving services outside the cluster.

Diagnosis Steps
  • 1Ran kubectl exec in the affected pods and verified DNS resolution failure.
  • 2Inspected the CoreDNS ConfigMap and found that the forward section was missing the external DNS servers.
Root Cause

CoreDNS was not configured to forward external queries, leading to DNS resolution failure for non-cluster services.

Fix/Workaround
• Updated the CoreDNS ConfigMap to add the missing external DNS server configuration.
• Restarted the CoreDNS pods to apply the changes.
Lessons Learned

Always review and test DNS configurations in CoreDNS, especially for hybrid clusters.

How to Avoid
  • 1Use automated validation tools to check CoreDNS configuration.
  • 2Set up tests for DNS resolution to catch errors before they impact production.