lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.49k stars 1.46k forks source link

Allow for container logs to continue to stay on screen after pod is terminated #8040

Open fleetwoodstack opened 5 months ago

fleetwoodstack commented 5 months ago

What would you like to be added: When you're viewing logs currently for a container, when the pod terminates the logs suddenly disappear and the error displays

Failed to load logs: Pod xxxx missing
Reason: undefined (undefined)

It would be VERY useful when attempting to debug these pods to allow us to continue viewing these existing logs as they are on screen after the pod has terminated.

Why is this needed:

Because if you want to debug a terminating pod and you know it contains logs within that will help you understand the cause, you can view them. Yes, these logs should ideally be sent to logging tool (e.g. elastic) however it would be far more elegant for Lens to not fail viewing these existing logs when a pod is terminated.

Environment you are Lens application on:

MajaScherman commented 5 months ago

I want to upvote this issue. It would be very useful for me as well if the logs were retained for a little while longer.