kubectl tail with fzf to select label values

This commit is contained in:
Daniel Lundin 2022-04-02 11:14:52 +02:00
parent 5b7533850f
commit f17ac2dad4

5
bin/ktail Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
kubectl get pod --output json \
| jq -r '[.items[].metadata.labels]|map(to_entries[]|(.key) + "=" + .value)|unique|.[]' \
| fzf \
| xargs kubectl tail "$@" -l