Solutions to practice test cluster upgrade process
What is the current version of the cluster?
How many nodes are part of this cluster?
Check what nodes the pods are hosted on.
Count the number of deployments
Run the command kubectl get pods -o wide
You are tasked to upgrade the cluster. User’s accessing the applications must not be impacted. And you cannot provision new VMs. What strategy would you use to upgrade the cluster?
Run the kubeadm upgrade plan command
Run the kubectl drain master –ignore-daemonsets
Run the command apt install kubeadm=1.18.0-00 and then kubeadm upgrade apply v1.18.0 and then apt install kubelet=1.18.0-00 to upgrade the kubelet on the master node
Run the command kubectl uncordon master
Run the command kubectl drain node01 –ignore-daemonsets
Run the commands: apt install kubeadm=1.18.0-00 and then kubeadm upgrade node. Finally, run apt install kubelet=1.18.0-00.
Run the command kubectl uncordon node01