I am using rke 1.2.4 to create my cluster. My pods’ /etc/resolv.conf is configured with a DNS server that matches the DNS server that was automatically filled in when I ran rke setup. However, I realized that the pods can’t resolve external hostnames using this entry and I need to add another nameerver in the pods (notably, 8.8.8.8). From the documentation on Rancher’s website on “Configuring CoreDNS”, the pod should pick up the namesevers configured on the host. I modifed /etc/resolv.conf on the host (both worker and master nodes), recreated my pod (actually deployment), went inside the pod and checked if ts /etc/resolv.confi was updated. It was not. I see one other option, which is to add an upstreamnameserver section in cluster.yml but I have not tried it (I’m worried about any inadvertant side effects, if any).
My question is, if I updated the hosts /etc/resolv.conf, why isn’t CoreDNS using it to resolve external queries?