A simple script that enumerates nodes, cordons/drains them, upgrades kubelet and kubectl, then uncordons. Roughly follows the official docs and assumes that the control plane is already updated.
Steps I ran on the Control Plane first:
KUBE_VERSION=1.20.5
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm=${KUBE_VERSION}-00 && \
apt-mark hold kubeadm
kubeadm upgrade -v5 apply v$KUBE_VERSION # <-- First CP node
kubeadm upgrade node # <-- other CP nodes
Note that the above steps only upgrade control-plane components, and you still need to upgrade kubelet (which is why the control plane nodes are not filtered out in upgrade-cluster.sh).