Ryebridge:
With regard to “sudo -i”…If this command is issued once, is this enough to execute subsequent commands which require elevated permission or should we be using “sudo <command>” every time we need to run a command ? Thinking about troubleshooting and installation/upgrades as the exam env doesn’t automatically have root access.
Vitor Jr.:
sudo -i means interactive. Each command after this will be executed as root until you type exit or press Ctrl + d
Vitor Jr.:
I really prefer to use sudo for each command. It’s easy to forget to rollback to normal user a run a bunch of commands with root supposed to be executed with a less privileged user
Ryebridge:
Very good point @Vitor Jr. I will use without sudo -i.
sudo apt-mark unhold kubeadm && \
sudo apt-get update && sudo apt-get install -y kubeadm=1.20.0-00 && \
sudo apt-mark hold kubeadm
sudo kubeadm upgrade apply v1.20.0
sudo apt-mark unhold kubelet kubectl && \
sudo apt-get update && sudo apt-get install -y kubelet=1.20.0-00 kubectl=1.20.0-00 && \
sudo apt-mark hold kubelet kubectl
sudo systemctl daemon-reload
sudo systemctl restart kubelet