coredns crashloopbackoff in kubernetes

前端 未结 2 387
挽巷
挽巷 2021-01-23 07:19

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

相关标签:
2条回答
  • 2021-01-23 08:10

    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.

    0 讨论(0)
  • 2021-01-23 08:11

    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.

    0 讨论(0)
提交回复
热议问题