k8s kubectl Tab键不能补全

系统+安全 Liemer_Lius 307℃

参考:https://blog.51cto.com/u_14842009/5145858

$ yum install -y bash-completion
$ vim /root/.bash_profile
#添加以下两行到.bash_profile文件中
. /usr/share/bash-completion/bash_completion
. <(kubectl completion bash)

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

退出重新连接shell
exit

 

转载请注明:liutianfeng.com » k8s kubectl Tab键不能补全

喜欢 (1)

评论已关闭。