Linux Bash
CentOS中可以先安装bash-completion
yum install bash-completion -y
如果需要将kubectl autocompletion添加到当前shell,可以
source <(kubectl completion bash)
或者添加到profile
echo "source <(kubectl completion bash)" >> ~/.bashrc