Kubecolor is a bash
function that colorizes the output of kubectl get events -w
.
If you're using Bash or Fish:
mkdir ~/.kubecolor
cd $_
git clone https://github.com/droctothorpe/kubecolor.git
echo "source ~/.kubecolor/kubecolor/kubecolor.bash" >> ~/.bash_profile # (or ~/.bashrc)
source ~/.bash_profile # (or ~/.bashrc)
If you're using Antigen:
- Add
antigen bundle droctothorpe/kubecolor.git
to your.zshrc
where you've listed your other plugins. - Close and reopen your Terminal/iTerm window to refresh context and use the plugin. Alternatively, you can run
antigen bundle droctothorpe/kubecolor.git
in a running shell to haveantigen
load the new plugin.
If you're using zgen:
- Add
zgen load droctothorpe/kubecolor.git
to your.zshrc
along with your otherzgen load
commands. zgen reset && zgen save
Now you can invoke kubecolor with the events
command.
Enjoy the simpler, much more readable kubectl get events
output.
Kudos to Francois-Guillaume Ribreau for the go-template code.