Hi @Tej_Singh_Rana @Mumshad Mannambeth - Could you please let me know whether th . . .

Mukund Bhatia:
Hi @Tej_Singh_Rana @Mumshad Mannambeth - Could you please let me know whether the steps below are good enough to upgrade a single node kubernetes cluster?

Upgrade control plane

sudo -i
swapoff -a ----> In exam is it necessary to disable swap?
kubectl drain controlplane --ignore-daemonsets
apt install -y kubeadm=1.19.0-00
kubeadm upgrade plan
kubeadm upgrade apply v1.19.0
apt install -y kubelet=1.19.0-00
apt install -y kubectl=1.9.0-00
sudo systemctl daemon-reload
sudo systemctl restart kubelet
kubectl uncordon controlplane
kubectl get nodes

Upgrade node01

kubectl drain node01 --ignore-daemonsets
ssh node01

sudo -I
swapoff -a
apt install -y kubeadm=1.19.0-00
kubeadm upgrade node
apt install -y kubelet=1.19.0-00
apt install -y kubectl=1.9.0-00
sudo systemctl daemon-reload
sudo systemctl restart kubelet
Exit

Kubectl uncordon node01

The steps above are from the solution video https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/learn/lecture/18277588#notes and the steps above are different from the kubernetes documentation https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/. So, could you please suggest which steps to follow if in exam there is a task to upgrade a kubeadm cluster?

Tej_Singh_Rana:
Hello, @Mukund Bhatia
Steps from both ( from courses and k8s docs) are correct.
You can prefer from k8s docs because you can access that page during the exam so less chances for mistakes.

Mukund Bhatia:
@Tej_Singh_Rana - Thank you very much. Is there a need to disable swap before carrying out the upgrade steps?

Tej_Singh_Rana:
Yeah, it is. You can check this point in the “Before you begin” section in the <Upgrading kubeadm clusters | Kubernetes upgrade docs>.

Mukund Bhatia:
Thank you, @Tej_Singh_Rana