Question 40
Domain 5: TroubleshootingWhich kubectl command provides detailed information about a pod, including events and reasons for issues such as a pod not starting?
Correct answer: A
Explanation
`kubectl describe pod <pod-name>` shows a pod’s full status, configuration, and recent events. It is the standard command for troubleshooting because it includes the event history and failure reasons, which can explain why a pod is not starting.
Why each option is right or wrong
A. kubectl describe pod <pod-name>
`kubectl describe pod <pod-name>` is the diagnostic command that queries the Pod object and its associated event stream from the Kubernetes API, so it returns the pod’s current state plus the recent Events section where scheduling, image-pull, and container-start failures are recorded. In practice, this is the command used when a pod is Pending or CrashLoopBackOff because it surfaces the specific failure reason and timestamps that `kubectl get pod` does not show.
B. kubectl get pod <pod-name> -o wide
C. kubectl logs <pod-name>
D. kubectl explain pod