Colorize your kubectl output
- get pods
- describe pods
- something wrong
- You can change color theme for light-backgrounded environment
kubecolor colorizes your kubectl
command output and does nothing else.
kubecolor internally calls kubectl
command and try to colorizes the output so
you can use kubecolor as a complete alternative of kubectl. It means you can write this in your .bash_profile:
alias kubectl="kubecolor"
If you use your .bash_profile on more than one computer (e.g. synced via git) that might not all have kubecolor
installed, you can avoid breaking kubectl
like so:
command -v kubecolor >/dev/null 2>&1 && alias kubectl="kubecolor"
For now, not all subcommands are supported and some of them might be in the future. If you want something to be supported by kubecolor, you can open an issue in this GitHub repo.
Even if what you want to do is not supported by kubecolor right now, kubecolor still can just show kubectl
output without any decorations,
so you don't need to switch kubecolor and kubectl but you always can use kubecolor.
Additionally, if kubectl
resulted an error, kubecolor just shows the error message in red or yellow.
Please keep in mind that kubecolor has runtime overhead compared to kubectl because it runs kubectl internally and parses the output, then colorizes it.
Go to Release page then download the binary which fits your environment.