docker与kubectl 命令自动补齐

2020-07-23 16:19发布

安装自动补齐需要依赖工具

yum install -y bash-completion

 

docker命令补齐:

执行下列命令

sh /usr/share/bash-completion/bash_completion
sh /usr/share/bash-completion/completions/docker

    

kubectl命令补齐:

sh   /usr/share/bash-completion/bash_completion

source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc
#或者
echo "source <(kubectl completion bash)" >> /etc/profile

  

 

 

 
原文: https://www.cnblogs.com/qianyuliang/p/13367016.html
标签: