配置 kubectl 子命令补全

[root@k8s-master test]# yum install -y bash-completion

[root@k8s-master test]# source /usr/share/bash-completion/bash_completion

[root@k8s-master test]# kubectl completion bash > ~/.kube/completion.bash.inc

[root@k8s-master test]# source '/root/.kube/completion.bash.inc'

[root@k8s-master test]# source $HOME/.bash_profile

posted @ 2024-11-15 16:05  augustine23  阅读(2)  评论(0编辑  收藏  举报