Cloud Native Technology Community
Jun 13, 2023 · Cloud Native
Retrieving Previous Container Logs in Kubernetes with kubectl --previous
When a pod crashes and continuously restarts, using the standard kubelet logs may fail to capture output, but the kubectl --previous flag can retrieve logs from the prior container instance by accessing the kubelet‑managed log files under /var/log/pods.
kubectlkubeletlog troubleshooting
0 likes · 6 min read