5V0-23.20 · Question #29
Which kubectl command should be used to change the active vSphere namespace to namespace-01?
The correct answer is A. kubectl config use-context namespace-01. 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 command- line tool uses parameters from the current context to communicate with the…
Question
Which kubectl command should be used to change the active vSphere namespace to namespace-01?
Options
- Akubectl config use-context namespace-01
- Bkubectl describe ns namespace-01
- Ckubectl get ns namespace-01
- Dkubectl config change-context namespace-01
How the community answered
(32 responses)- A72% (23)
- B16% (5)
- C9% (3)
- D3% (1)
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 command- line tool uses parameters from the current context to communicate with the cluster. To choose the current context: kubectl config use-context ctx001
Topics
Community Discussion
No community discussion yet for this question.