The inconsistent version number of kubelet kubeadm causes the worker status to remain NotReady

Keywords: Operation & Maintenance kubelet Kubernetes yum Linux

I. Questions

When installing kubelet kubeadm on master and worker nodes, it happens to update the version of k8s. Previously, the default installation was adopted. When the worker node joined the master node, the node was always in notReady state.

Installation of the specified version number

2.1 Check So Version Number

$ yum list kubelet kubeadm kubectl  --showduplicates|sort -r

//Loaded plug-in: fastest mirror
//Installed packages
//Installable packages
 * updates: mirrors.zju.edu.cn
Loading mirror speeds from cached hostfile
kubelet.x86_64                       1.16.0-0                        kubernetes 
kubelet.x86_64                       1.16.0-0                        @kubernetes
kubelet.x86_64                       1.15.4-0                        kubernetes 
kubelet.x86_64                       1.15.3-0                        kubernetes 
kubelet.x86_64                       1.15.2-0                        kubernetes 
kubelet.x86_64                       1.15.1-0                        kubernetes 
kubelet.x86_64                       1.15.0-0                        kubernetes 
...

2.2 Install the specified version

$ yum install -y kubelet-1.15.3 kubeadm-1.15.3

2.3 View Version

$ kubeadm version
--------------------------------------------------------------------------------------------
kubeadm version: &version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3**", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:11:18Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

$ kubectl version --client
--------------------------------------------------------------------------------------------
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

$ kubelet --version
-------------------------------------------------------------------------------------------
Kubernetes v1.15.3

2.4 Set up kubectl start and start-up

$ systemctl enable kubelet && systemctl start kubelet

Unloading

$ yum remove kubectl kubeadm

4. Node joins master node

$ kubeadm join 192.168.25.131:6443 --token abcdef.0123456789abcdef \
    --discovery-token-ca-cert-hash sha256:711846bdc8459c5d6f72bbb62f44cab563faccf4c8cd87cf227483ee05986198

V. View Status

[root@localhost kubeadm]# kubectl get nodes
NAME                    STATUS     ROLES    AGE   VERSION
localhost.localdomain   Ready      master   44m   v1.15.3
node01                  Ready      <none>   26s   v1.15.3
node02                  NotReady   <none>   25m   v1.16.0

Posted by ihcra on Mon, 30 Sep 2019 08:05:12 -0700