K8S kubectl 命令自动补全
k8s集群的kubectl命令默认是不带自动补全功能的,下面方法可以实现kubectl的自动补全:
yum install -y bash-completion source /usr/share/bash-completion/bash_completion source <(kubectl completion bash) echo "source <(kubectl completion bash)" >> ~/.bashrc
k8s集群的kubectl命令默认是不带自动补全功能的,下面方法可以实现kubectl的自动补全:
yum install -y bash-completion source /usr/share/bash-completion/bash_completion source <(kubectl completion bash) echo "source <(kubectl completion bash)" >> ~/.bashrc