Skip to main content

Why can't my pods resolve DNS?

Syself support For release

When pods cannot resolve DNS, test a cluster name from inside a pod first. The result shows whether the problem is in the cluster or upstream of it:

plaintext
				kubectl exec <pod> -- nslookup kubernetes.default.svc.cluster.local
			
  • The cluster name fails or times out. Check that the CoreDNS pods in kube-system are running and that the kube-dns Service has endpoints. Then check your network policies. A policy that denies all egress also blocks DNS, so allow UDP and TCP port 53 to CoreDNS.
  • Cluster names resolve, external names do not. The problem is upstream of CoreDNS. CoreDNS forwards external names to the node's resolvers: 1.1.1.1 and 8.8.8.8 by default, or the servers in the dnsServers cluster variable if you set it. Check that those resolvers answer.
  • AAAA lookups for cluster names come back empty. This is expected, because pods and Services are IPv4-only.

Syself Autopilot runs CoreDNS and scales it with the cluster, so you do not manage its replica count. If CoreDNS stays unhealthy, prepare a support case.

The commands and the policy rule for port 53 are in Diagnose pod DNS resolution. To change the upstream resolvers, see Understand in-cluster DNS (CoreDNS).

Still stuck?

Prepare your case, then email us.