I am encountering an issue with Kubernetes where my pods cannot resolve hostnames (such as google.com
or kubernetes.default
).
I currently have
Check coredns pods log, if you see errors like:
# kubectl logs --namespace=kube-system coredns-XXX
...
[ERROR] plugin/errors ... HINFO: read udp ... read: no route to host
Then make sure firewalld masquerade is enabled on the host:
# firewall-cmd --list-all
...
masquerade: yes
Enable if it's "no":
# firewall-cmd --add-masquerade --permanent
# firewall-cmd --reload
*You may need to restart/reboot after this