Question 620
A Kubernetes administrator recommends: Run kubectl logs <pod> -c <container> --previous and inspect the preceding terminated instance. Which situation most directly calls for that operation?
Explanation
Correct Answer
This is the original issue addressed by Previous crash log capture: The failure message from the prior crashed container is available for root-cause analysis.
Incorrect Answers
That separate problem requires another operation: Inspect CoreDNS Pod readiness and kube-dns Service endpoints and restore the DNS deployment configuration. Cluster service discovery resumes without unnecessary application restarts or Service changes.
That separate problem requires another operation: Use kubectl logs <pod> -c app in the right namespace and inspect the target container's stream. Investigation uses the failing application's output rather than an unrelated sidecar stream.
That separate problem requires another operation: Inspect kube-controller-manager health, leader election and process logs for the failing controller manager. Kubernetes controllers resume reconciling desired resources once the active manager is healthy.