Score:1

coredns will not start on the vagrant ubuntu/impish64 image but will start and run successfully with ubuntu/bionic

ru flag

I am trying to run k8s on ubuntu/impish64. I have a reference env that is successfully running ubuntu/bionic. The only differences between the environments is the ubuntu image and ip address ranges

This is the Bionic output:

vagrant@ubuntu-bionic:~$ kubectl get pods -n kube-system -o wide
NAME                               READY   STATUS    RESTARTS       AGE    IP              NODE       NOMINATED NODE   READINESS GATES
coredns-64897985d-bk74z            1/1     Running   2 (3d2h ago)   4d8h   10.244.0.6      machine1   <none>           <none>
coredns-64897985d-jhghl            1/1     Running   2 (3d2h ago)   4d8h   10.244.0.7      machine1   <none>           <none>
etcd-machine1                      1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>
kube-apiserver-machine1            1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>
kube-controller-manager-machine1   1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>
kube-flannel-ds-7c6mh              1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>
kube-proxy-r982l                   1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>
kube-scheduler-machine1            1/1     Running   2 (3d2h ago)   4d8h   192.168.33.20   machine1   <none>           <none>

This is the impish output:

vagrant@ubuntu-impish:~$ kubectl get pods -n kube-system -o wide
NAME                               READY   STATUS    RESTARTS   AGE   IP          NODE       NOMINATED NODE   READINESS GATES
coredns-64897985d-bd47f            0/1     Pending   0          45m   <none>      <none>     <none>           <none>
coredns-64897985d-s9bct            0/1     Pending   0          45m   <none>      <none>     <none>           <none>
etcd-machine1                      1/1     Running   0          45m   10.0.2.15   machine1   <none>           <none>
kube-apiserver-machine1            1/1     Running   0          45m   10.0.2.15   machine1   <none>           <none>
kube-controller-manager-machine1   1/1     Running   0          45m   10.0.2.15   machine1   <none>           <none>
kube-proxy-2sknk                   1/1     Running   0          45m   10.0.2.15   machine1   <none>           <none>
kube-scheduler-machine1            1/1     Running   0          45m   10.0.2.15   machine1   <none>           <none>

Two potentially telling clues are:

Jan 21 09:22:21 ubuntu-impish kubelet[8744]: I0121 09:22:21.657003    8744 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"

Jan 21 09:22:24 ubuntu-impish kubelet[8744]: E0121 09:22:24.425056    8744 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"

Attempting to install flannel fails with the following:

vagrant@ubuntu-impish:~$ sudo kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
The connection to the server localhost:8080 was refused - did you specify the right host or port?

Any Suggestions?

moonkotte avatar
in flag
Welcome to the community! You're running last command with `sudo` and getting the error because there's no `kubectl config` under root user. Try to run without `sudo`, should do the trick
Rajesh Dutta avatar
br flag
The above mentioned suggestion does make sense. @Dwight Have you tried it?
Dwight J. Browne avatar
ru flag
@moonkotte. Thank you! it worked. Rajesh Dutta yes.
Score:1
in flag

Posting the answer out of comments.


The answer is very short:

Last command should be executed without sudo because there's no context created for kubectl under root user.

You can check config in ~/.kube/config

Wytrzymały Wiktor avatar
it flag
Hello @DwightJ.Browne and welcome to StackOverflow! Please remember to [react to answers for your questions](https://stackoverflow.com/help/someone-answers). That way we know if the answers were helpful and other community members could also benefit from them. Try to [accept answer](https://stackoverflow.com/help/accepted-answer) that is the final solution for your issue, upvote answers that are helpful and comment on those which could be improved or require additional attention. Enjoy your stay!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.