From f17ac2dad4381caca0e6c90f98c06400649c4850 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sat, 2 Apr 2022 11:14:52 +0200 Subject: [PATCH] kubectl tail with fzf to select label values --- bin/ktail | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 bin/ktail diff --git a/bin/ktail b/bin/ktail new file mode 100755 index 0000000..2969226 --- /dev/null +++ b/bin/ktail @@ -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