Solutions to practice test - OS Upgrades
Let us explore the environment first. How many nodes do you see in the cluster?
How many applications do you see hosted on the cluster?
Run the command ‘kubectl get pods -o wide’ and get the list of nodes the pods are placed on
Run the command kubectl drain node01 –ignore-daemonsets
Run the command ‘kubectl get pods -o wide’ and get the list of nodes the pods are placed on
Run the command kubectl uncordon node01
Run the command kubectl get pods -o wide
Why are there no pods on node01?
Use the command kubectl describe node master and look under taint section to check if it has any taints.
Run the command kubectl drain node02 –ignore-daemonsets
Check the applications hosted on the node02.
Check the list of pods
What would happen to hr-app if node02 is drained forcefully?
Run the command kubectl drain node02 –ignore-daemonsets –force
Run the command kubectl cordon node03