scope icon indicating copy to clipboard operation
scope copied to clipboard

Ability to see previous logs for pods

Open ld-singh opened this issue 6 years ago • 2 comments

This is a new feature request

What you expected to happen?

what: I am requesting a feature to allow to see previous logs for a pod in case it has crashed and restarted. why: This is extremely helpful to find the cause of failure.

What happened?

Can only see current pod logs.

ld-singh avatar Jul 25 '19 05:07 ld-singh

Hi @fbarl I want to work on it.

shovanmaity avatar Oct 14 '19 11:10 shovanmaity

Hi @fbarl I want to work on it.

Glad you'd like to take this one!

I'm not sure how much work it'd involve to get it done, but the least thing we should consider is how we want to present it in the UI - do you have some thoughts / ideas about that?

  1. From the top of my head, the simplest thing might be having a cumulative log so that each pod's logs would contain the logs of all its dead predecessors, but that be counter-intuitive to what Kubernetes does
  2. Alternatively, we could have some sort of a separate action to see the logs of each predecessor, but that doesn't seem very scalable

Another thing we'd need to figure out is how we'd define a pod's predecessor (I'm not sure if there's already such a notion / term in Kubernetes) - basic cases seem simple, but e.g. how much should a deployment be allowed to change so that we still associate between the pods it creates?

Maybe it would pay off trying to answer some of this questions before starting with the PR to make sure everyone's on the same page.

@bboreham any thoughts to add?

fbarl avatar Oct 14 '19 12:10 fbarl