Cloud Native 6 min read

Kubernetes DNS Resolution Issues and Troubleshooting Guide

This article explains common Kubernetes DNS resolution failures, both for external domains and internal service discovery addresses, and provides a step‑by‑step troubleshooting workflow that includes checking CoreDNS, examining resolv.conf, adjusting DNS settings, and recreating CoreDNS when necessary.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Kubernetes DNS Resolution Issues and Troubleshooting Guide

When using Kubernetes, you may encounter DNS resolution failures such as pods being unable to resolve external domains (e.g., baidu.com) or internal service discovery addresses, which can break inter‑pod communication and affect applications like Nginx reverse‑proxying to Tomcat.

1. External domain resolution troubleshooting

1) Verify that the CoreDNS component is running and inspect its logs for errors. 2) Check the /etc/resolv.conf file mounted in the pod; replace the DNS server with a public one (e.g., 114.114.114.114) to see if the issue resolves. 3) If the problem persists, delete and recreate the CoreDNS deployment.

2. Internal service discovery address troubleshooting

Service discovery addresses follow the pattern serviceName.namespace.svc.cluster.local (e.g., knowsystem-svc.prod-knowsystem.svc.cluster.local ). When CoreDNS cannot resolve these, pods will report errors such as:

io.netty.resolver.dns.DnsNameResolverTimeoutException: [/10.96.0.10:53] query timed out after 1000 milliseconds (no stack trace available)

Typical steps:

Inspect the pod’s /etc/resolv.conf to ensure the nameserver points to the CoreDNS service ( nameserver 10.96.0.10 ) and that the search domains are correctly set.

Ping the search domains; excessive search entries can cause DNS timeouts.

Manually configure the dnsConfig field in the pod’s specification to set custom DNS servers or search domains.

Redeploy the pod and verify that the new DNS configuration resolves the service discovery address.

3. Summary of troubleshooting steps

Check CoreDNS pod status and logs.

Validate DNS settings in the node’s and pod’s /etc/resolv.conf .

Use dnsConfig in the pod spec to override DNS or search domains if needed.

Following these steps should help you identify and resolve most Kubernetes DNS resolution problems.

KubernetesService DiscoveryClusterTroubleshootingDNSCoreDNS
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.