Helm 'Error: error installing: namespaces "{username}" not found'
Helm 'Error: error installing: namespaces "{username}" not found'
我正在使用 Minikube 来修补 Helm。
我明白了Helm installs tiller in the kube-system
namespace by default:
The easiest way to install tiller
into the cluster is simply to run
helm init
...
Once it connects, it will install tiller
into the kube-system
namespace.
但它试图在以我命名的命名空间中安装 tiller:
$ ~/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
$
我可以指定 tiller 命名空间,但我必须在以后每次使用 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.
我假设 在每个命令中指定命名空间是可以的。但是感觉不对。我做了什么破坏了我的 Helm 配置吗?
更新:
根据 Eduardo 的要求,这是我的 helm 版本:
$ 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"}
设置 Tiller 默认命名空间有两种方式:
- 使用
--tiller-namespace
标志(因为您已经在使用)。
- 通过设置
$TILLER_NAMESPACE
环境变量。
标志配置优先于环境配置。您可能设置了此环境变量(您可以使用 printenv TILLER_NAMESPACE
检查)。如果是这样,unset
它和进一步的 helm
命令应该正确指向 kube-system
命名空间。
我正在使用 Minikube 来修补 Helm。
我明白了Helm installs tiller in the kube-system
namespace by default:
The easiest way to install
tiller
into the cluster is simply to runhelm init
... Once it connects, it will installtiller
into thekube-system
namespace.
但它试图在以我命名的命名空间中安装 tiller:
$ ~/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 $
我可以指定 tiller 命名空间,但我必须在以后每次使用 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.
我假设 在每个命令中指定命名空间是可以的。但是感觉不对。我做了什么破坏了我的 Helm 配置吗?
更新:
根据 Eduardo 的要求,这是我的 helm 版本:
$ 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"}
设置 Tiller 默认命名空间有两种方式:
- 使用
--tiller-namespace
标志(因为您已经在使用)。 - 通过设置
$TILLER_NAMESPACE
环境变量。
标志配置优先于环境配置。您可能设置了此环境变量(您可以使用 printenv TILLER_NAMESPACE
检查)。如果是这样,unset
它和进一步的 helm
命令应该正确指向 kube-system
命名空间。