Mock Exam 1 - Question --context flag

After setting my kubeconfig to use the below context why do i need to use the --context flag when trying to view logs for the pod logger-complete-cka04-arch. It appears all other api calls like get, describe, etc work fine but logs need the additional context flag, why is that and are there other resources that need that flag as well?

For this question, please set the context to cluster3 by running:

kubectl config use-context cluster3

A pod called logger-complete-cka04-arch has been created in the default namespace. Inspect this pod and save ALL the logs to the file /root/logger-complete-cka04-arch on the student-node.

Mostly, if you’ve called k config use-context, you won’t need to add the --context flag to kubectl, although it won’t hurt.

If you have a question where they ask you to save the command in a file, however, using the --context flag is a good practice, since it will guarantee that the kubectl command in the file interacts with the correct cluster. But I don’t think this is a common practice; usually you can assume the command file is executed in the appropriate context.