A "kubectl get" replacement with customizable column presets.
Master you kubectl output like a JSONpath pro :-)
kubectl custom-cols -o <template name> <arguments>
ex:
kubectl custom-cols -o qos-class pods -l app=nginx
will output:
NAME QoS-Class STATUS
web-front-0 BestEffort Running
web-front-1 BestEffort Running
web-back-0 Burstable Running
If you're on Mac OS X, you may need to first run brew install coreutils
to get the realpath
function.
- download the latest release
- copy
kubectl-custom-cols
script and thetemplates
folder together, somewhere in your PATH
If you already have the krew kubectl plugin manager installed, you can just issue the following command:
kubectl krew install custom-cols
You can add you own templates in the templates
folder.
Please feel free to send a PR or open issues ta the original repo : https://github.com/webofmars/kubectl-custom-cols
You can send your own templates to be included in the default package