I have setup kubernetes
in ubuntu 16.04
. I am using kube version 1.13.1
and using weave for networking. I have initialized the cluster usi
I had the same problem in ubuntu 16.04
. My /etc/resolv.conf
pointed to loopback address too. I first tried as S Andrew to change the resolv.conf
file manually but although without any luck.
In my case, I have resolved this issue disabling dnsmasq
.
In /etc/NetworkManager/NetworkManager.conf
, comment on the following line in the [main] section:
[main]
#dns=dnsmasq
Dnsmasq makes it simple to specify the nameserver to use for a given domain but sets automatically a loopback address and this makes coredns
to crash.
After this the /etc/resolv.conf
file pointed to my DNS Servers supplied by my ISP.
I have resolved this issue. In my case I had below contents of /etc/resolv.conf
nameserver 127.0.1.1
I first used the below command to get the correct IP as the device was in client's network.
nmcli device show <interfacename> | grep IP4.DNS
After this I updated the file /etc/resolvconf/resolv.conf.d/head
with below contents
nameserver 192.168.66.21
and then run the below command to regenerate the resolv.conf
sudo resolvconf -u
After this I had below contents in /etc/resolv.conf
:
nameserver 192.168.66.21
nameserver 127.0.1.1
I then deleted the coredns
pods and everything worked fine. Thanks.