Skip to content
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

Support merged logs for multiple pods #210

Open
florensie opened this issue Jan 9, 2023 · 2 comments
Open

Support merged logs for multiple pods #210

florensie opened this issue Jan 9, 2023 · 2 comments

Comments

@florensie
Copy link

florensie commented Jan 9, 2023

When you have multiple replicas in your deployment you often want to see the logs of all pods at once. With kubectl I would use something like this:

kubectl logs -n my-namespace --prefix=true -l app=myapp --tail 200 -f

However, when I select multiple pods with Click and use the logs command, it executes multiple logs commands sequentially instead of giving a merged output.

It would also be nice to be able to select a deployment to request logs for instead of having to select multiple pods (based on a regex or label).

And lastly, if such a merging logs command existed, it would be good if it had the --prefix option of kubectl with some color coding added to differentiate the different pods.

@nicklan
Copy link
Collaborator

nicklan commented Jan 9, 2023

This is a cool idea. Does kubectl actually merge the logs though? In my testing it just gives you sequential logs from each matching pod, but does allow prefixing them.

So just to clarify, this is more about merging when doing -f so that you can follow logs from more than one pod?

@florensie
Copy link
Author

In my experience kubectl does seem to merge logs fine, but previous (non-followed) logs appear to be inaccurately ordered. When following logs the kubectl logs do make more sense though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants