- Kubernetes for Developers
- Joseph Heck
- 86字
- 2025-02-25 15:31:25
Previous logs
The logs are generally specific to an active container. However, there is a common need to see what might have been in the logs if a container fails, or perhaps if you rolled out an update and something didn't work as expected. Kubernetes maintains a reference to the previous container for any Pod (if it exists), so that you can get this information when you need it. You can do this with the -p option, as long as the logs are available to Kubernetes.