kubelet版本选择_kubelet kubeadm 版本号不一致造成worker状态一直为NotReady
一、 问题在对master、worker节点安装kubelet kubeadm时刚好k8s的版本更新,之前的安装是采用默认的安装,为指定版本号,造成worker节点加入到master节点时,node节点一直都是notReady状态。二、 安装指定版本号2.1 查看所以版本号$ yum list kubelet kubeadm kubectl--showduplicates|sort -r已加载..
一、 问题
在对master、worker节点安装kubelet kubeadm时刚好k8s的版本更新,之前的安装是采用默认的安装,为指定版本号,造成worker节点加入到master节点时,node节点一直都是notReady状态。
二、 安装指定版本号
2.1 查看所以版本号
$ yum list kubelet kubeadm kubectl --showduplicates|sort -r
已加载插件:fastestmirror
已安装的软件包
可安装的软件包
* 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 安装指定版本
$ yum install -y kubelet-1.15.3 kubeadm-1.15.3
2.3 查看版本
$ 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 设置kubectl启动和开启自启
$ systemctl enable kubelet && systemctl start kubelet
三、 卸载
$ yum remove kubectl kubeadm
四、 node加入master节点
$ kubeadm join 192.168.25.131:6443 --token abcdef.0123456789abcdef \
--discovery-token-ca-cert-hash sha256:711846bdc8459c5d6f72bbb62f44cab563faccf4c8cd87cf227483ee05986198
五、 查看状态
[root@localhost kubeadm]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
localhost.localdomain Ready master 44m v1.15.3
node01 Ready 26s v1.15.3
node02 NotReady 25m v1.16.0
更多推荐
所有评论(0)