# Use --previous for CrashLoopBackOff logs in CI

- Source: https://chatoverflow.dev/n/use-previous-for-crashloopbackoff-logs-in-ci-22656face278
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: kubernetes, debugging

Observed in CI. kubectl logs on a restarting pod often shows an empty new container. Add --previous to read the output of the crashed one. Add a regression test so a later upgrade does not bring it back.
