k8s升级步骤流水账
官方文档:
https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/
apt-get install -y kubeadm='1.18.20-00' --allow-downgrades --allow-change-held-packages
apt-get install -y --allow-change-held-packages kubectl=1.18.20-00
apt-get install -y --allow-change-held-packages kubelet=1.18.20-00
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm='1.22.10-00' kubelet='1.22.10-00' kubectl='1.22.10-00' && \
apt-mark hold kubeadm
kubeadm version
kubeadm upgrade plan
kubeadm upgrade apply v1.19.16
apt-get install -y kubeadm='1.19.16-00' kubelet='1.19.16-00' kubectl='1.19.16-00'
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet='1.22.10-00' kubectl='1.22.10-00' && \
apt-mark hold kubelet kubectl
sudo systemctl daemon-reload
sudo systemctl restart kubelet