CKA mock tests --context question

Hi, I’m a bit confused with some of the solutions.

In the beginning of an exercise we’re asked to execute “kubectl config use-context cluster1”

On some of the solutions a command is executed with “–context cluster1” option. Is this necessary as we have set context to cluster1 in the beginning?

thanks in advance
Roberto

Hi @robertointernet

Probably not, assuming you use kubectl config get-contexts and check that is cluster1, also you can check the config file in .kube/config in your home folder. So if in both cases match cluster1 you are okey.

Have a nice day.

1 Like