Hacker News new | past | comments | ask | show | jobs | submit login

Thanks for the tip! Usually since I've just run a `kubectl get pods` or whatever I use the keyboard navigation to go up a few lines, ctrl+a and use the emacs bindings to yank...

I just downloaded and installed tmux-fingers with tpm, but it's doing a pretty terrible job of picking up on the right things... I'm assuming i need to put in the predefined regexes that would match pod names/ lines of the get output?




It works for the output of kubectl get all, not kubectl get po unfortunately. [This is because without the resource name as a prefix, there’s no general regexes that will work for everyone’s situation] As a hack I sometimes end up doing kubectl get all | grep ‘pod/‘, which is a little inelegant. You can add your own regexes (see the readme of tmux-fingers, you do @fingers-pattern-0 your_regex) and then reload the config

Realistically I suppose it’s only marginally faster than kubectl get po -o name and then manually copying.

For any project I work on frequently I set up aliases that wrap it anyway. As you already know kubectl doesn’t allow regex matching so I just do something like: kubectl delete pod “$(kubectl get po -l app=MY_APP_SELECTOR)”, etc. naturally your deploy needs granular selectors otherwise you need to further pipe to grep or awk




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: