VMware Carbon Black Cloud Enterprise EDR (2020) — Question 28

Which kubectl command is used to list all pods in the current active namespace?

Answer options

Correct answer: B

Explanation

The correct answer is B, as 'kubectl get pods' specifically retrieves the list of pods within the active namespace. Option A is incorrect because it lists nodes, option C retrieves services, and option D is not a valid kubectl command for listing pods.