Created
May 19, 2018 00:59
-
-
Save mchurichi/08b0be8c610ed154732c1402a0804c31 to your computer and use it in GitHub Desktop.
Script to see k8s logs using kubectl and multitail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REGEX='s/('$1'*-[a-z0-9\-]*)(.*)/\1/g' | |
POD=`kubectl get pods | grep $1 | sed -E $REGEX` | |
multitail -f --config $HOME/multitail.conf -CS $1 -l 'kubectl logs '$POD' -f' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment