不管是kubectl 还是helm 出现的问题
sou-bash: _get_comp_words_by_ref: 未找到命令
解决:
1、下载
[root@localhost ~]# yum install bash-completion -y
2、执行bash_completion
[root@localhost ~]# source /usr/share/bash-completion/bash_completion
3、
重新加载completion ( kubectl和helm)
[root@localhost ~]# source <(kubectl completion bash)
[root@localhost ~]# source <(helm completion bash)
4、测试
[root@localhost ~]# helm
completion (generate autocompletion scripts for the specified shell)
create (create a new chart with the given name)
dependency (manage a chart's dependencies)
env (helm client environment information)
get (download extended information of a named release)
help (Help about any command)
history (fetch release history)
[root@localhost ~]# kubectl get
apiservices.apiregistration.k8s.io ippools.crd.projectcalico.org
bgpconfigurations.crd.projectcalico.org ipreservations.crd.projectcalico.org
bgppeers.crd.projectcalico.org jobs.batch
blockaffinities.crd.projectcalico.org kubecontrollersconfigurations.crd.projectcalico.org