deployment: coredns stuck at ContainerCreating

I am running the latest kubeadm 1.11 where CoreDNS is the default. I’ve also installed weave-net plugin. However, I still cannot get coredns pod running …

linux-uwkw:~ # kubectl get pods --namespace=kube-system
NAME                                           READY     STATUS              RESTARTS   AGE
coredns-78fcdf6894-fv74n                       0/1       ContainerCreating   0          6m
coredns-78fcdf6894-pnq22                       0/1       ContainerCreating   0          6m
etcd-linux-uwkw.fritz.box                      1/1       Running             0          5m
kube-apiserver-linux-uwkw.fritz.box            1/1       Running             0          5m
kube-controller-manager-linux-uwkw.fritz.box   1/1       Running             0          5m
kube-proxy-785pk                               1/1       Running             0          6m
kube-scheduler-linux-uwkw.fritz.box            1/1       Running             0          5m
weave-net-8tqdh                                2/2       Running             0          6m

Any debug tips?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 32 (4 by maintainers)

Most upvoted comments

I was missing the looback binary of CNI. Now everything is fine,

I’m running into the same issue, and I have IPv6 enabled. I’m using a fresh setup using kubeadm on Ubuntu Server 18.04.

NAMESPACE     NAME                               READY   STATUS              RESTARTS   AGE
kube-system   coredns-576cbf47c7-k2xxd           0/1     ContainerCreating   0          91m
kube-system   coredns-576cbf47c7-pqk9k           0/1     ContainerCreating   0          91m

When I run describe I get the following error message,

$ kubectl describe pod coredns-576cbf47c7-pqk9k
Error from server (NotFound): pods "coredns-576cbf47c7-pqk9k" not found

Which isn’t very useful.

Any luck @doctorCC? Also, @drpaneas, what do you mean by loopback for CNI?

This is probably an issue with your container networking. For your “describe”, you need -n kube-system.

On Fri, Oct 5, 2018 at 2:49 PM Scott Morris notifications@github.com wrote:

I’m running into the same issue, and I have IPv6 enabled. I’m using a fresh setup using kubeadm on Ubuntu Server 18.04.

NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-576cbf47c7-k2xxd 0/1 ContainerCreating 0 91m kube-system coredns-576cbf47c7-pqk9k 0/1 ContainerCreating 0 91m

When I run describe I get the following error message,

$ kubectl describe pod coredns-576cbf47c7-pqk9k Error from server (NotFound): pods “coredns-576cbf47c7-pqk9k” not found

Which isn’t very useful.

Any luck @doctorCC https://github.com/doctorCC? Also, @drpaneas https://github.com/drpaneas, what do you mean by loopback for CNI?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coredns/deployment/issues/87#issuecomment-427508314, or mute the thread https://github.com/notifications/unsubscribe-auth/AJB4s6NBlCj_JlbhztOkZp47npM3mR1Vks5uh9P7gaJpZM4V7hUW .

I was missing the looback binary of CNI. Now everything is fine,

how exactly did u set the ‘loopback’?

  • go get -d github.com/containernetworking/plugins
  • cd ~/go/src/github.com/containernetworking/plugins
  • ./build.sh
  • sudo cp bin/* /opt/cni/bin/

Could you elaborate? I am having a similar issue, where I was trying to use the flannel plugin (which is Running) but there are 2 coredns which seem to be stuck in ContainerCreating kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-78fcdf6894-sdvhr 0/1 ContainerCreating 0 6m kube-system coredns-78fcdf6894-t94cp 0/1 ContainerCreating 0 6m kube-system etcd-ubuntu 1/1 Running 0 5m kube-system kube-apiserver-ubuntu 1/1 Running 0 5m kube-system kube-controller-manager-ubuntu 1/1 Running 0 5m kube-system kube-flannel-ds-s390x-7z2zx 1/1 Running 0 2m kube-system kube-proxy-bk62x 1/1 Running 0 6m kube-system kube-scheduler-ubuntu 1/1 Running 0 5m

executing spifire’s recommended steps did not work. running this work:

kubectl -n kube-system apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml

(kubernetes/kubernetes#48798) as recommended by smorrisfv

run this command to active flannel mode it works. core dns gets running.

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml

Actually, I only had to do a:

sudo systemctl restart containerd and the CoreDNS containers got created the next second.

Thank you @spitfire88! This works for me. Although I have now idea why I need to download and compile something when I’m trying to use kubeadm

Thanks @johnbelamaric for your help. I found my issue, it was a bug in Flannel (coreos/flannel#1044) when running on K8s 1.12. What fixed it for me was the suggestion from this comment (kubernetes/kubernetes#48798).

I’m running into the same issue, and I have IPv6 enabled. I’m using a fresh setup using kubeadm on Ubuntu Server 18.04.

NAMESPACE     NAME                               READY   STATUS              RESTARTS   AGE
kube-system   coredns-576cbf47c7-k2xxd           0/1     ContainerCreating   0          91m
kube-system   coredns-576cbf47c7-pqk9k           0/1     ContainerCreating   0          91m

When I run describe I get the following error message,

$ kubectl describe pod coredns-576cbf47c7-pqk9k
Error from server (NotFound): pods "coredns-576cbf47c7-pqk9k" not found

Which isn’t very useful.

Any luck @doctorCC? Also, @drpaneas, what do you mean by loopback for CNI?

you should add --namespace=kube-system when you run describe pod command.