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

Add watch support for new pods matching a criteria #33

Open
cmosgh opened this issue Jul 21, 2017 · 6 comments
Open

Add watch support for new pods matching a criteria #33

cmosgh opened this issue Jul 21, 2017 · 6 comments

Comments

@cmosgh
Copy link

cmosgh commented Jul 21, 2017

First of all I just want to thank you for this amazing tool!
I just found it today and it'll definitely stay on my toolbelt.

Any chance there is a way to make it watch for new pods matching the criteria.
In our CD workflow it would be very much in use such a feature

@johanhaleby
Copy link
Owner

This is something I've wanted to do for a while and I have a (previously local) branch (but I've now pushed it remotely as well to a branch name "pipes") where I'm experimenting with it using named pipes. The problem is that when I use these pipes I cannot get the background kubectl processes to terminate on ctrl+c. I've tried lots of different things to no avail. If you have any experience with this then please help out since I'm out of ideas.

@davinkevin
Copy link

A little up for this issue? Some news about it?
I really ❤️kubtail but I have to restart the command every time a new pod appears, which is frustrating when trying to find an error at startup of a pod

@johanhaleby
Copy link
Owner

@davinkevin Unfortunately things haven't improved. I'd love to get some help though.

@bastibense
Copy link

First off, thank you for making kubetail! It's awesome.

I kinda expected a "--watch" feature to be there as in my use case I use kubetail to have a terminal with all logs from a pod in our cluster (super useful for maintenance and monitoring tasks).

So due to CI/CD pushing new versions of my code to the cluster, it causes k8s to kill/spawn new pods and those are not included in the log output - so I have to ctrl-c out of kubetail, wait until the new pods are ready/running and then attach again. That can be a little bit cumbersome.

If I'm too fast, I even get errors that pods are initializing and while kubetail runs it sometimes "overwrites" the terminal UI with error messages in the top-left corner about missing containers.

@johanhaleby
Copy link
Owner

@bastibense There was actually an awesome pull request that implemented support for this. Unfortunately it broke some existing functionality so I haven't merged it in yet. Would be great if we could get this fixed.

@lknite
Copy link

lknite commented Aug 13, 2023

I think "echo hello > /proc/$$/fd/1 &" is a workable solution. See more detail on #67 .

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

5 participants