Back to all scenarios
Scenario #166
Networking
K8s v1.22, Google GKE

Intermittent Connectivity Failures Due to Pod DNS Cache Expiry

Intermittent connectivity failures due to pod DNS cache expiry, leading to failed DNS lookups for external services.

Find this helpful?
What Happened

Pods experienced intermittent connectivity failures because the DNS cache expired too quickly, causing DNS lookups to fail for external services.

Diagnosis Steps
  • 1Checked pod logs and observed errors related to DNS lookup failures.
  • 2Inspected the CoreDNS configuration and identified a low TTL (time-to-live) value for DNS cache.
Root Cause

The DNS TTL was set too low, causing DNS entries to expire before they could be reused.

Fix/Workaround
• Increased the DNS TTL value in the CoreDNS configuration.
• Restarted CoreDNS pods to apply the new configuration.
Lessons Learned

Proper DNS caching settings are critical for maintaining stable connectivity to external services.

How to Avoid
  • 1Set appropriate DNS TTL values based on the requirements of your services.
  • 2Regularly monitor DNS performance and adjust TTL settings as needed.