:thread: K3s DNS Issues — CoreDNS Fails to Resolve...
# k3s
b
🧵 K3s DNS Issues — CoreDNS Fails to Resolve Cluster Services Hi #CGGQEHPPW, I'm running a single-node k3s setup and I'm experiencing persistent DNS resolution issues inside the cluster. Here's a summary of the problem and what I've tried: 🧩 Symptoms • From debug pods: • nslookup kubernetes.default • → ** server can't find kubernetes.default: NXDOMAIN • Ingress controller logs: • dns_lookup(): failed to query the DNS server for <service>.application.svc.cluster.local • server returned error code: 3: name error • CoreDNS logs show: • [ERROR] plugin/errors: 2 kubernetes.default.svc.cluster.local. A: no such host • [WARNING] No files matching import glob pattern: /etc/coredns/custom/*.override • listen tcp 8080 bind: address already in use 🔍 What I've Tried • Restarted CoreDNS and k3s • Patched CoreDNS with
hostNetwork: true
→ caused port 8080 conflicts • Verified CoreDNS is listening and logs no fatal errors • Confirmed Ingress controller and CoreDNS fail to resolve cluster service names • Verified k3s API server cert SANs are correct (public IP and internal IPs) • API server is accessible via public IP and NodePort, but not via ClusterIP (
10.43.0.10
) 🙏 What I'm Looking For • How to fix DNS resolution for
*.svc.cluster.local
in this k3s setup without a reinstall • Any way to safely reset or reconfigure Flannel/CNI to restore service IP routing • Advice on diagnosing why CoreDNS can't access the API server over
10.43.0.10
Thanks in advance for any help!
r
Did you happen to find a solution to this? It looks like I am having the same, or very similar issue.
Just to compare notes a little... I am seeing in on the node:
Copy code
cat /run/flannel/subnet.env
FLANNEL_NETWORK=10.42.0.0/16
FLANNEL_SUBNET=10.42.2.1/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
and a pod running on the node:
Copy code
cat /etc/resolv.conf
search mynamespace.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.43.0.10
options ndots:5
but the address
10.43.0.10
doesn't seem to be assigned/allocated to anything
I do have an iptables rule on the node, but I am not sure why.
Copy code
iptables -L | grep 10.43
RETURN     all  --  anywhere             10.43.0.0/16         /* allow traffic to primary/secondary cluster IP range - EKROEGTNIJ3AP3LC */
REJECT     tcp  --  anywhere             10.43.168.0          /* default/nginx has no endpoints */ tcp dpt:http reject-with icmp-port-unreachable