flat-translator-32204
11/17/2022, 4:51 PMwget: 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.
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.