coredns crashloopbackoff in kubernetes

前端 未结 2 388
挽巷
挽巷 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: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  | 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.

提交回复
热议问题