kubectl exec [POD-NAME] -n [NAMESPACE] -- nslookup [NAME] and read the node-local-dns logs to isolate the failing hop. Common fixes: correct the Pod’s dnsConfig or search domains, set dnsPolicy: ClusterFirstWithHostNet for host-network Pods, and allow DNS egress to node-local-dns in any NetworkPolicy.
This covers DNS failures from inside a Pod on CoreWeave Kubernetes Service (CKS): names that fail to resolve, intermittent lookups, or slow resolution. It explains how DNS works on CKS, how to test resolution from a Pod, and the common pitfalls. To forward queries for your own private domains, see Forward DNS queries to your private or internal domains instead.
What you are seeing
DNS problems from a Pod usually surface as one of these symptoms:| Symptom | What it usually means |
|---|---|
NXDOMAIN / Name or service not known | The name genuinely does not exist, or the wrong search domain is being appended. |
SERVFAIL | A resolver was reached but failed to answer, often a misconfigured forward zone pointing at an unreachable upstream. |
| Intermittent failures or timeouts | A stale client connection pinned to an old resolver Pod, or a NetworkPolicy blocking DNS egress. |
| Slow resolution | Too many search-domain attempts (high ndots), or upstream latency for external names. |
NXDOMAIN means the name was looked up and not found, while SERVFAIL means a resolver was reached but could not produce an answer. NXDOMAIN points at the name or the search path. SERVFAIL points at a broken forwarder.
How DNS works on CKS
Understanding the path tells you which component to check.- Pods with the default
dnsPolicy: ClusterFirstsend queries to thenode-local-dnscache running on each Node at the link-local address169.254.0.1. node-local-dnsserves cluster zones such as*.svc.cluster.localand forwards everything else. It runs as a DaemonSet inkube-systemwith the labelk8s-app=node-local-dns, which you use as the target both for log reads and for DNS egress allow rules.
Test resolution from a Pod
Run these read-only tests from the Pod that is failing.nslookup is not in the image, use getent hosts [NAME] or python3 -c "import socket; print(socket.gethostbyname('[NAME]'))".
Read the node-local-dns logs
You can read thenode-local-dns logs directly. They show forwarding decisions and reloads.
Common pitfalls
The following sections describe the most common causes of Pod DNS failures and how to address each one.Cluster names resolve but external names do not (or the reverse)
The direction of the failure points to the cause:- External works,
*.svc.cluster.localfails: the Pod’sdnsConfigmay override the cluster search domains, or aNetworkPolicyis blocking egress tonode-local-dns. Confirm/etc/resolv.conflists the cluster search domains, and that any default-deny policy allows DNS egress tonode-local-dns. For the exact Cilium selector, see Cilium network policy on CKS. - Cluster works, external fails: the upstream forward path is failing. Check the
node-local-dnslogs for forwarding errors.
hostNetwork Pods use the wrong resolver
A Pod withhostNetwork: true and the default dnsPolicy uses the Node’s resolver, not cluster DNS, so cluster names fail. Set dnsPolicy: ClusterFirstWithHostNet so a host-network Pod resolves cluster Services.
Stale connections after node-local-dns rolls
Long-lived clients that resolve once and reuse a pinned connection can break whennode-local-dns Pods roll. A common case: an application or proxy configured with a hardcoded resolver address (for example, an nginx resolver directive pointing at a Service ClusterIP) opens a single connection that the data plane maps to one resolver Pod. When that Pod rolls, the client keeps using the dead path and DNS fails permanently until the client restarts.
To recover and prevent recurrence:
ndots and search-domain overhead
A highndots value causes the resolver to try each search domain before a name is resolved as absolute, which adds latency and can mask the real result. If a name resolves only with a trailing dot ([NAME].), the search list is the cause. Set an explicit dnsConfig.options ndots value on the Pod, or use fully qualified names.
What this is not
The following are common misconceptions about Pod DNS failures:- This is not a Service connectivity problem. If a name resolves correctly but the connection still fails, see Troubleshoot pod-to-service connectivity.
- This is not something you fix by editing the Node’s
/etc/resolv.conf. The Node resolver is managed by the system and is not the right layer for cluster DNS changes. Use PoddnsConfig, or the override ConfigMap described in Forward DNS queries to your private or internal domains. node-local-dnsis notkube-dns. Policies and references that targetkube-dnsdo not apply on CKS.
When to open a ticket
Open a support ticket when:node-local-dnslogs show forwarding errors that you cannot tie to your own ConfigMap overrides.- DNS fails cluster-wide from multiple Nodes for names that should resolve, with no
NetworkPolicyin the path.
NXDOMAIN, SERVFAIL, or timeout), the Pod’s /etc/resolv.conf, and a sample of node-local-dns logs. See Troubleshoot networking for related symptoms.
Server Errors