I'm following the k3s tutorial for troubleshooting DNS,
When I after step 2 "Add KUBECONFIG for user.", if run this command,
kubectl run -it --rm --restart=Never busybox --image=busybox:1.28 -- nslookup www.google.com I get this error,
nslookup: can't resolve 'www.google.com' pod "busybox" deleted pod default/busybox terminated (Error) However, I'm running k3s. It's a single node cluster, and on the same machine that k3s is installed I can run nslookup www.google.com, and everything works. The tutorial doesn't say where to go from there? What could cause DNS failures for external resolution inside of k3s, but not ousdie of k3s?
My core DNS logs show,
[ERROR] plugin/errors: 2 google.com. AAAA: read udp 10.42.0.6:40115->1.1.1.1:53: i/o timeout [ERROR] plugin/errors: 2 google.com. A: read udp 10.42.0.6:54589->1.1.1.1:53: i/o timeout And when I run curl on an external server, I get
command terminated with exit code 6
While this was the first symptom for me, it turns out that I also can't ping or curl/wget external websites by IP. For these reasons I think the problem is even more complex, and perhaps involves IP tables.
I uploaded my iptables -L information here