kubeadm: master node never ready
Asked Answered
P

1

10

I'm following a blog post to setup a kubernetes cluster with kubeadm. So I have a Virtualbox created with bridge network and simply followed the instructions.

I initially just did kubeadm init and it didn't work (master NotReady). So I figured maybe an older version might work better.

So I did

kubeadm init --kubernetes-version v1.6.2

It finished quite quickly. But kubeadm get nodes always returns:

master    NotReady   4m        v1.6.3

I checked the docker images that was downloaded and they're like this:

gcr.io/google_containers/kube-proxy-amd64                v1.6.2              7a1b61b8f5d4        4 weeks ago         109.2 MB
gcr.io/google_containers/kube-controller-manager-amd64   v1.6.2              c7ad09fe3b82        4 weeks ago         132.7 MB
gcr.io/google_containers/kube-apiserver-amd64            v1.6.2              e14b1d5ee474        4 weeks ago         150.5 MB
gcr.io/google_containers/kube-scheduler-amd64            v1.6.2              b55f2a2481b9        4 weeks ago         76.76 MB
gcr.io/google_containers/etcd-amd64                      3.0.17              243830dae7dd        12 weeks ago        168.9 MB
gcr.io/google_containers/pause-amd64                     3.0                 99e59f495ffa        12 months ago       746.9 kB

and output of docker ps shows that the following containers are using pause

k8s_POD_kube-scheduler-master_kube-system_e4c05f51e4e89758e2fb58eb9c457e66_2
k8s_POD_kube-controller-manager-master_kube-system_14cceb4cae4afafe5d2872cedc46b03f_2
k8s_POD_etcd-master_kube-system_7075157cfd4524dbe0951e00a8e3129e_2
k8s_POD_kube-apiserver-master_kube-system_bd46883c0ce86694060fb2924470cfa7_2

I'm a bit confused:

  1. Under what situation would the master node get into Ready state?

  2. Why the difference between the version I asked (and the docker images tag) and the version reported by kubeadm?

Pendulum answered 20/5, 2017 at 14:5 Comment(2)
Really too little information: Log into the master node, go to /var/log/ and checkout the kubernetes related logfiles. Also get information from docker to see if any container has been started on the master.Sy
@NorbertvanNobelen Thanks for the info. I've updated the question with docker ps output. Also I'm checking kube-controoler-manager log but hasn't found anything meaningful yet.Pendulum
D
12

It looks like you did not set a Network Overlay. For example, if for flanneld it would be like this

 kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
 kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml

After this, your node should change to Ready.

Delvalle answered 22/5, 2017 at 12:43 Comment(2)
the first file is 404 now. For me these URLs work: kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml and kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.ymlBauer
it does work on AWS EC2 Ubuntu 18.04 but I have no idea how it worked. I initiated my cluster by sudo kubeadm init . When should I have set a network?Guthrun

© 2022 - 2024 — McMap. All rights reserved.