我正在使用Minikube修补Helm。
我了解Helm installs tiller in the kube-system
namespace by default:
将
tiller
安装到群集中的最简单方法是简单地运行helm init
... 连接后,它将tiller
安装到kube-system
中 命名空间。
但是相反,它正在尝试将分er安装在以我命名的命名空间中:
$ ~/bin/minikube start * minikube v1.4.0 on Ubuntu 18.04 * Tip: Use 'minikube start -p ' to create a new cluster, or 'minikube delete' to delete this one. * Starting existing virtualbox VM for "minikube" ... * Waiting for the host to be provisioned ... * Preparing Kubernetes v1.16.0 on Docker 18.09.9 ... * Relaunching Kubernetes using kubeadm ... * Waiting for: apiserver proxy etcd scheduler controller dns * Done! kubectl is now configured to use "minikube" $ helm init $HELM_HOME has been configured at /home/mcrenshaw/.helm. Error: error installing: namespaces "mcrenshaw" not found $
我可以指定分till名称空间,但是随后在每次使用helm
时都必须指定它。
$ helm init --tiller-namespace=kube-system $HELM_HOME has been configured at /home/mcrenshaw/.helm. Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster. Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy. To prevent this, run `helm init` with the --tiller-tls-verify flag. For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation $ helm upgrade --install some-thing . Error: could not find tiller $ helm upgrade --install some-thing . --tiller-namespace=kube-system Release "some-thing" does not exist. Installing it now.
我假设在每个命令中指定名称空间是可以的。但这感觉不正确。我是否做了一些破坏我的头盔配置的事情?
更新:
根据Eduardo的要求,这是我的掌舵版本:
$ helm version --tiller-namespace=kube-system
Client: &version.Version{SemVer:"v2.15.0", GitCommit:"c2440264ca6c078a06e088a838b0476d2fc14750", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.15.0", GitCommit:"c2440264ca6c078a06e088a838b0476d2fc14750", GitTreeState:"clean"}
答案 0 :(得分:2)
有两种设置Tiller默认名称空间的方法:
--tiller-namespace
标志(已在使用)。$TILLER_NAMESPACE
环境变量。标志配置优先于环境配置。您可能已设置了此环境变量(可以使用printenv TILLER_NAMESPACE
进行检查)。如果是这样,请unset
和其他helm
命令应正确指向kube-system
命名空间。