[root@ec-k8s-m1 ~]# yum install -y bash-completion

[root@ec-k8s-m1 ~]# find / -name bash_completion
/usr/share/bash-completion/bash_completion

[root@ec-k8s-m1 ~]# source /usr/share/bash-completion/bash_completion

[root@ec-k8s-m1 ~]# source <(kubectl completion bash)
## 永久生效
#  
[root@ec-k8s-m1 ~]# echo "source <(kubectl completion bash)" >> .bash_profile 

[root@ec-k8s-m1 ~]# source .bash_profile 

按“Tab”键,命令自动补全