Exam failed : blocking questions: etcd restore and cluster upgrade

Hi,
Can you please elaborate the solution because I am not getting where exactly the change is required. Following error I got in exam when I tried to upgrade the master node as per kubernetes documentation(Upgrading kubeadm clusters | Kubernetes).

Error: Unable to open the lock /var/<sub_folder>/<sub_folder>/<file_name> : permission denied

// sorry, I have forget the complete path and file name in error. The file was owned by root user.

Curios to know what I am missing here. Thanks !

1 Like

Hi @Sreenivasulu,

Can you please give us more detail the command you run to have this error? However, permission denied means you don’t have the necessary permission on the file. You can add sudo on the the command to run it as root.

Regard

Hi, I have ran below command to upgrade. I haven’t tried the command with ‘sudo’, thought it’s not needed which I should have tried once at least. There were commands in the k8s documentation which are having ‘sudo’ and I used to follow the same in practice labs, didn’t come across such error. Will make a note of it, thanks for the reply.

apt-mark unhold kubeadm && \
 apt-get update && apt-get install -y kubeadm=1.26.0-00 && \
 apt-mark hold kubeadm

Hi @Sreenivasulu,

These commands need root access because you install an application on the system. Please try the following command :

sudo apt-mark unhold kubeadm && \
sudo apt-get update && sudo apt-get install -y kubeadm=1.26.0-00 && \
sudo apt-mark hold kubeadm

or

sudo -i

apt-mark unhold kubeadm && \
 apt-get update && apt-get install -y kubeadm=1.26.0-00 && \
 apt-mark hold kubeadm

exit