Tagged articles
1 articles
Page 1 of 1
Open Source Linux
Open Source Linux
Jul 20, 2023 · Cloud Native

How to Retrieve Crash Logs of a Restarted Pod Using kubectl --previous

When a pod crashes and continuously restarts, standard kubelet logs may miss the previous container's output, but using kubectl logs with the --previous flag lets you access the logs of the last terminated instance, as explained with commands, file locations, and practical verification steps.

Kuberneteskubectlkubelet
0 likes · 7 min read
How to Retrieve Crash Logs of a Restarted Pod Using kubectl --previous