lensapp / lens

Lens - The way the world runs Kubernetes

Home Page:https://k8slens.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

fleetwoodstack opened this issue · comments

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:

  • Kubernetes distribution: [EKS, AKS, GKE, Rancher, ...]: AKS and EKS
  • Desktop OS: Windows 11

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.