k8s 配置kubecolor高亮显示

一、下载安装

$ wget https://github.com//dty1er/kubecolor/releases/download/v0.0.20/kubecolor_0.0.20_Linux_x86_64.tar.gz
$ tar xf kubecolor_0.0.20_Linux_x86_64.tar.gz -C /usr/local/bin/ kubecolor

二、修改kubecolor别名为k

$ echo 'command -v kubecolor >/dev/null 2>&1 && alias k="kubecolor"' >> ~/.bashrc

三、配置补全增强

$ echo 'complete -o default -F __start_kubectl k' >> ~/.bashrc
$ source ~/.bashrc

四、查看效果

2021-12-14_115752

*************** 当你发现自己的才华撑不起野心时,就请安静下来学习吧!***************
原文地址:https://www.cnblogs.com/lvzhenjiang/p/15687218.html