Back to all scenarios
Scenario #130
Networking
K8s v1.19, Azure AKS
DNS Resolution Failure for Services After Pod Restart
DNS resolution failed for services after restarting a pod, causing internal communication issues.
Find this helpful?
What Happened
After restarting a pod, the DNS resolution failed for internal services, preventing communication between dependent services.
Diagnosis Steps
- 1Checked CoreDNS logs and found that the pod's DNS cache was stale.
- 2Verified that the DNS server address was correctly configured in the pod’s /etc/resolv.conf.
Root Cause
DNS cache not properly refreshed after pod restart.
Fix/Workaround
• Restarted CoreDNS to clear the stale cache.
• Verified that DNS resolution worked for services after the cache refresh.
Lessons Learned
Ensure that DNS caches are cleared or refreshed when a pod restarts.
How to Avoid
- 1Monitor DNS resolution and configure automatic cache refreshing.
- 2Validate DNS functionality after pod restarts.