Skip to content

View crashed Pod logs (previous logs) #3225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
illume opened this issue May 12, 2025 · 3 comments
Open

View crashed Pod logs (previous logs) #3225

illume opened this issue May 12, 2025 · 3 comments
Assignees
Labels
dashboard good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. LogsButton LogsViewer needs design Some design work needs to be done on this. Not necessarily by a designer.

Comments

@illume
Copy link
Contributor

illume commented May 12, 2025

When I am troubleshooting a Pod that has crashed or restarted, I want to be able to view the logs from its previous container instance, so I can understand what caused the failure and take corrective action.

With kubectl you can see the logs for a crashed Pod like this:

kubectl logs <pod-name> --previous
kubectl logs <pod-name> -c <container-name> --previous

API:

GET /api/v1/namespaces/{namespace}/pods/{pod}/log?previous=true

previous=true: fetches logs from the previous container instance, which is useful when the container has crashed or restarted.

We need to design and agree a UI before implementation:

  • Maybe an option on the log viewer page?
  • Or a separate action "View previous logs" button?

Additional context

See:

This was one of the most requested features in dashboard: kubernetes/dashboard#1393 https://github.com/kubernetes/dashboard/pull/2392/files and is a commonly used feature of kubectl.

@illume illume added kind/feature Categorizes issue or PR as related to a new feature. needs design Some design work needs to be done on this. Not necessarily by a designer. LogsViewer LogsButton dashboard labels May 12, 2025
@karankoder
Copy link

Hello @illume
Can i work on this issue?

@illume illume added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label May 19, 2025
@illume
Copy link
Contributor Author

illume commented May 19, 2025

@karankoder sure!

Please type /assign in a comment to assign yourself if you want to do it.

@illume illume assigned karankoder and unassigned karankoder May 19, 2025
@eyeaadil
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. LogsButton LogsViewer needs design Some design work needs to be done on this. Not necessarily by a designer.
Projects
None yet
Development

No branches or pull requests

3 participants