其他分享
首页 > 其他分享> > k8s升级

k8s升级

作者:互联网

1.查看可升级的列表

yum list --showduplicates kubeadm --disableexcludes=kubernetes

 

2.验证升级计划

kubeadm version

kubeadm upgrade plan

 

3.升级

yum install -y kubeadm-1.24.3-0 --disableexcludes=kubernetes

kubeadm upgrade apply v1.24.3(输入yes)

yum install -y kubelet-1.24.3-0

yum install -y kubectl-1.24.3-0

#升级节点1

kubectl cordon node01

kubectl drain node01 --ignore-daemonsets

yum install -y kubelet-1.24.3-0

yum install -y kubectl-1.24.3-0

systemctl daemon-reload 
systemctl restart kubelet

kubectl uncordon node01

#升级节点2

kubectl cordon node01

kubectl drain node01 --ignore-daemonsets

yum install -y kubelet-1.24.3-0

yum install -y kubectl-1.24.3-0

systemctl daemon-reload 
systemctl restart kubelet

kubectl cordon node02

标签:kubectl,node01,升级,yum,install,kubeadm,k8s,1.24
来源: https://www.cnblogs.com/52shaidan/p/16575902.html