Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubeadm: master node never ready

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?

like image 881
lang2 Avatar asked May 20 '17 14:05

lang2


1 Answers

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.

like image 182
Javier Salmeron Avatar answered Nov 14 '22 03:11

Javier Salmeron