Which kubectl command displays all Pods in the current namespace?
- kubectl describe all pods
- kubectl get pods ✓
- kubectl list pods
- kubectl show pods
Correct answer: kubectl get pods
Option B is correct because 'kubectl get pods' is the standard, well-documented command for listing all Pods in the current namespace, returning their names, status, restart count, and age. Option A is incorrect because 'kubectl describe all pods' is not valid syntax; 'kubectl describe' requires a resource type and optionally a name (e.g., 'kubectl describe pod my-pod'), and 'all' is not a valid subresource modifier in that position. Option C is incorrect because 'kubectl list' is not a valid kubectl subcommand; the correct verb for retrieving resources is 'get'. Option D is incorrect for the same reason: 'kubectl show' does not exist as a kubectl command; 'get' and 'describe' are the appropriate commands for displaying resource information.
Topic: · kubectl, pods, kubernetes cli, ckad