VMware Carbon Black Cloud Enterprise EDR (2020) — Question 44
Which kubectl command should be used to change the active vSphere namespace to namespace-01?
Answer options
- 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
Correct answer: A
Explanation
The command 'kubectl config use-context namespace-01' is correct because it directly changes the current context to the specified namespace. The other options do not switch the context: option B describes the namespace, option C retrieves information about the namespace, and option D is incorrectly phrased as there is no command 'kubectl config change-context'.