Home » VMware » 5V0-23.20 » Which kubectl command should be used to change the active vSphere namespace to namespace-01?
Which kubectl command should be used to change the active vSphere namespace to namespace-01?
A. kubectl config use-context namespace-01
B. kubectl describe ns namespace-01
C. kubectl get ns namespace-01
D. kubectl config change-context namespace-01
Answer: A
Explanation:
A context element in a kubeconfig file is used to group access parameters under a convenient name.
Each context has three parameters: cluster, namespace, and user. By default, the kubectl commandline tool uses parameters from the current context to communicate with the cluster.
To choose the current context: kubectl config use-context ctx001