Recently gave CKAD exam, not able to set namespace

Hi All,

Recently gave CKAD exam was not able to set namespace using
kubectl config set-context --current --namespace <name>

was getting file lock error

search CKAD doc it was written than you can get root access by sudo-i

tried this command on my machine getting error

kubernetes$sudo -i kubectl config set-context --current --namespace rev3
error: no current context is set

And also no notepad was found

can anyone please help
as I’m reattempting the exam.

Thanks

You should be setting contexts on candidate-node, which is the prompt you are at when you first open the terminal, not any other node you may have SSH’ed onto.

You do not require sudo - you should already have root privilege, and sudo -i will change your linux user to root from what it is when you open the terminal, and root most likely does not have a KUBECONFIG file

The notepad is the mousepad application.

image

1 Like

Thanks a lot for helping!!