kubectl and kubeconfig · Question 10 of 12
How do you make all following kubectl commands in the current context refer to the namespace shop?
1 answer is correct. Medium Created with AI
Show answer
Answer
- A kubectl config set-context --current --namespace=shop
Explanation
set-context --current changes the active context in the kubeconfig. After that, -n shop is no longer needed. kubectl does not evaluate an environment variable named NAMESPACE.