kubeadm: CoreDNS is not starting on Ubuntu 18.04.Bionic Beaver

What keywords did you search in kubeadm issues before filing this one?

dns, resolv.conf, coredns

BUG REPORT

Versions

kubeadm version (use kubeadm version): kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:14:41Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):

    Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:08:34Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
    
  • Cloud provider or hardware configuration: baremetal (Intel Xeon, 2x2TB HDD, 32GB RAM)

  • OS (e.g. from /etc/os-release): Ubuntu 18.04 LTS (Bionic Beaver)

  • Kernel (e.g. uname -a): 4.15.0-24-generic

What happened?

After installation of kubernetes via kubeadm the coredns Pods won’t come up. kubectl get pods --all-namespaces prints this:

NAMESPACE     NAME                                  READY     STATUS    RESTARTS   AGE
kube-system   coredns-78fcdf6894-kgg8d              0/1       Pending   0          2h
kube-system   coredns-78fcdf6894-vl9jf              0/1       Pending   0          2h
kube-system   etcd-beetlejuice                      1/1       Running   0          2h
kube-system   kube-apiserver-beetlejuice            1/1       Running   0          2h
kube-system   kube-controller-manager-beetlejuice   1/1       Running   0          2h
kube-system   kube-proxy-bjdqd                      1/1       Running   0          2h
kube-system   kube-scheduler-beetlejuice            1/1       Running   0          2h

What you expected to happen?

coredns changes into status ‘Running’ and kubernetes is running without problems

How to reproduce it (as minimally and precisely as possible)?

This is the script I used for installation:

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

apt-get update
apt-get install -y docker.io
apt-get install -y kubeadm

kubeadm init --pod-network-cidr=10.27.0.0/16

Anything else we need to know?

I think yes, but I don’t know what… If you need some kind of logs, just tell me.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

too bad that there are no logs from the scheduler.

The contents of /var/lib/kubelet/kubeadm-flags.env are

the --resolv-conf flag seems to be added, so that’s OK.

By now it will be a single node kube.

call kubeadm reset and then kubeadm init ... again. then copy the config to your user dir and try installing a pod network plugin (weave):

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

and see if the dns pods ready up. this might not make sense, but please give it a try.

@sergej2705 the output from: kubectl describe pod <coredns-pod-ids>

and relevant errors from:

'systemctl status kubelet'
'journalctl -xeu kubelet'

would help more. thanks.