yum list --showduplicates kubeadm --disableexcludes=kubernetes
yum install -y kubeadm-1.16.3-0 --disableexcludes=kubernetes #所有节点
kubeadm version
kubeadm upgrade plan #查看集群是否可以升级,升级后各组件的版本信息
kubeadm config images list | sed -e 's/^/docker pull/g' -e 's#k8s.gcr.io#registry.cn-hangzhou.aliyuncs.com/google_containers#g' | sh -x
docker images | grep registry.cn-hangzhou.aliyuncs.com/google_containers | awk '{print "docker tag",$1":"$2,$1":"$2}' | sed -e 's/registry.cn-hangzhou.aliyuncs.com\/google_containers/k8s.gcr.io/2' | sh -x
docker images | grep registry.cn-hangzhou.aliyuncs.com/google_containers | awk '{print "docker rmi """$1""":"""$2}' | sh -x
kubeadm upgrade apply v1.16.3
kubeadm upgrade node
升级各个组件
yum install -y kubelet-1.16.3 kubectl-1.16.3 --disableexcludes=kubernetes
systemctl daemon-reload
systemctl restart kubelet
kubeadm upgrade node
yum install -y kubelet-1.16.3 kubectl-1.16.3 --disableexcludes=kubernetes
systemctl daemon-reload
systemctl restart kubelet