Question
Upgrade the cluster (Master and Worker node) from 1.18.0 to 1.19.0
Make sure to first drain both Nodes and make them available after upgrade.
Answer
Get the nodes and their version:
kubectl get nodeskubectl drain controlplane --ignore-daemonsetskubectl get nodeskubectl get po -o wideapt updateapt install kubeadm=1.19.0-00kubeadm upgrade apply v1.19.0apt install kubelet=1.19.0-00
systemctl restart kubeletkubectl get nodeskubectl uncordon controlplane
kubectl get nodeskubectl drain node01 --ignore-daemonsetskubectl get po -o widessh node01
apt updateapt install kubeadm=1.19.0-00kubeadm upgrade nodeapt install kubelet=1.19.0-00
systemctl restart kubeletkubectl get nodeskubectl uncordon node01
kubectl get nodes