Cluster Upgrades: ================= primary master: --------------- VERSION=1.20.2 apt-get update apt-get install -y --allow-change-held-packages "kubeadm=$VERSION-00" && apt-mark hold kubeadm kubeadm version kubeadm upgrade plan kubectl drain $(hostname) --ignore-daemonsets --delete-local-data kubeadm upgrade apply "v$VERSION" sed "s/^kubernetesVersion: .*$/kubernetesVersion: $VERSION/" -i /etc/kubernetes/kubeadm.config apt-get update && apt-get install -y --allow-change-held-packages "kubelet=$VERSION-00" "kubectl=$VERSION-00" && apt-mark hold kubelet kubectl // security updates + reboot ? kubectl uncordon $(hostname) secondary master: ----------------- VERSION=1.20.2 apt-get update apt-get install -y --allow-change-held-packages "kubeadm=$VERSION-00" && apt-mark hold kubeadm kubectl drain $(hostname) --ignore-daemonsets --delete-local-data kubeadm upgrade node apt-mark unhold kubelet kubectl && apt-get update && apt-get install -y kubelet="$VERSION-00" "kubectl=$VERSION-00" && apt-mark hold kubelet kubectl // security updates + reboot ? kubectl uncordon $(hostname) worker nodes: ------------- VERSION=1.20.2 apt-get update apt-get install -y --allow-change-held-packages "kubeadm=$VERSION-00" && apt-mark hold kubeadm @primary master: kubectl drain --ignore-daemonsets --delete-local-data kubeadm upgrade node apt-mark unhold kubelet kubectl && apt-get update && apt-get install -y kubelet="$VERSION-00" "kubectl=$VERSION-00" && apt-mark hold kubelet kubectl // security updates + reboot ? @primary master: kubectl uncordon