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?