kubernets kubectl自动补全

安装bash-completion

yum install -y bash-completion 
source /usr/share/bash-completion/bash_completion

 

应用kubectl的completion到系统环境

source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc

示例

 

posted @ 2022-03-24 18:21  文十七  阅读(25)  评论(0编辑  收藏  举报