https://rancher.com/ logo
#general
Title
# general
f

flat-translator-32204

11/17/2022, 4:51 PM
Hello all, I have setup a k3s cluster on AWS EC2 instances (one master + 2 worker nodes). I am trying to deploy a pod on one of the worker nodes, in this pod a docker image is pulled and this docker image internally is running some scripts to fetch package from the internet. But I am seeing an issue with DNS resolution in this pod
wget: unable to resolve host address
however upon logging onto that pod and trying to ping 8.8.8.8, the packets are being transmitted successfully.
Copy code
bash-4.3# ping <http://google.com|google.com>
ping: bad address '<http://google.com|google.com>'

bash-4.3# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=49 time=1.133 ms
64 bytes from 8.8.8.8: seq=1 ttl=49 time=1.084 ms
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.083/1.109/1.137 ms
bash-4.3#
Note: 1. Security groups are proper with access to all http traffic. So I am not sure why the DNS resolution is failing on the EC2 instances. I have tried restarting coredns service
sudo kubectl -n kube-system rollout restart deployment coredns
and it temporarily fixes the issue but when I delete and recreate the pod, I again see issue with DNS resolution. Please let me know of there is anything needs to be changed in config files or is there any setup issue.
57 Views