VMware Carbon Black Cloud Enterprise EDR (2020) — Question 21
A user needs to identify the namespaces that may be accessed.
Which command will provide the desired output?
Answer options
- A. kubectl get storageclasses
- B. kubectl config use-context
- C. kubectl config get-contexts
- D. kubectl get contexts
Correct answer: C
Explanation
The command 'kubectl config get-contexts' (option C) lists all available contexts, which include the namespaces that can be accessed. The other options do not provide this information; 'kubectl get storageclasses' (A) retrieves storage classes, 'kubectl config use-context' (B) switches to a specified context, and 'kubectl get contexts' (D) is not a valid command.