Cloud Native 6 min read

Kubernetes DNS Resolution Issues and Troubleshooting Guide

This guide explains common Kubernetes DNS problems—including failure to resolve external domains, inter‑pod service discovery addresses, and related impacts on applications like Nginx reverse proxies—and provides step‑by‑step troubleshooting procedures such as checking CoreDNS, inspecting resolv.conf, and customizing dnsPolicy and dnsConfig in pod specifications.

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

When using Kubernetes, DNS resolution failures may occur, such as pods being unable to resolve external domains (e.g., baidu.com), service discovery addresses, or internal communication between pods, which can affect applications like Nginx reverse proxies that rely on stable domain names.

External domain troubleshooting: First verify that the CoreDNS component is running and inspect its logs for errors. Then check the /etc/resolv.conf file mounted in the pod for the DNS server entry; replacing it with a public DNS like 114.114.114.114 often resolves the issue. If problems persist, delete and recreate the CoreDNS deployment.

Internal service discovery address troubleshooting: Service discovery addresses follow the pattern ServiceName.NamespaceName.svc.cluster.local . When these cannot be resolved, errors like io.netty.resolver.dns.DnsNameResolverTimeoutException: [/10.96.0.10:53] query timed out after 1000 milliseconds appear. Steps include checking the pod’s /etc/resolv.conf for the correct nameserver ( 10.96.0.10 ), pinging the search domains, and, if necessary, overriding the default DNS configuration by setting dnsPolicy: "None" and providing a custom dnsConfig in the pod spec:

spec: containers: - image: jiangxlrepo/know-system:v1 name: knowsystem-v1 dnsPolicy: "None" dnsConfig: nameservers: - 10.96.0.10 searches: - knowsystem-svc.prod-knowsystem.svc.cluster.local options: - name: test

Overall troubleshooting flow: 1) Verify CoreDNS health and logs; 2) Ensure DNS settings in both node and pod resolv.conf files are correct; 3) Use dnsConfig to manually set nameservers and search domains when needed.

The article concludes with a summary of these steps and encourages readers to like, share, and follow for more technical content.

Cloud NativeKubernetesService DiscoveryTroubleshootingDNSCoreDNS
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.