I have a question on the "kubectl config use-context *** " with respect to upgrade:
Say in the exam you are in worker node and they asked you to upgrade to the master node to V1.26.
you will have to ssh to master node and there you will first execute the command "kubectl config use-context *** "
and start the upgrade process ?
Yes exactly and It’s important to check the official documentation for upgrading specific version.
In the K8 doc page(Upgrading kubeadm clusters) it has not maintained when to use context ("kubectl config use-context *** ")
kubectl config use-context command switches context in kubeconfig file, it is not used for upgrading a Kubernetes cluster. Upgrading a cluster requires different commands with ssh to master node first and context switching is not necessary.
In the exam they give you the use context command as part of the question. You copy it and paste to the terminal at the start of each question.
Thank you @unnivkn and @Alistair Mackay