Which command shows the current namespace context in your kubectl configuration?
easy📝 Conceptual Q2 of 15
Kubernetes - Namespaces
Which command shows the current namespace context in your kubectl configuration?
Akubectl get namespaces
Bkubectl config current-context
Ckubectl config view --minify | grep namespace
Dkubectl describe namespace
Step-by-Step Solution
Solution:
Step 1: Identify command to view current namespace
The command 'kubectl config view --minify | grep namespace' filters the current context's namespace.
Step 2: Differentiate from other commands
'kubectl config current-context' shows context name, not namespace; 'kubectl get namespaces' lists all namespaces; 'kubectl describe namespace' shows details of a namespace.
Final Answer:
kubectl config view --minify | grep namespace -> Option C