作者:mobiledu2502899157 | 来源:互联网 | 2022-12-08 19:46
我收到此错误消息:
? ~ helm version
Error: could not find tiller
我创建了tiller
项目:
? ~ oc new-project tiller
Now using project "tiller" on server "https://192.168.99.100:8443".
然后,我创建tiller
了tiller
命名空间:
? ~ helm init --tiller-namespace tiller
$HELM_HOME has been configured at /home/jcabre/.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
Happy Helming!
所以,在那之后,我一直在等待tiller
pod准备好了.
? ~ oc get pod -w
NAME READY STATUS RESTARTS AGE
tiller-deploy-66cccbf9cd-84swm 0/1 Running 0 18s
NAME READY STATUS RESTARTS AGE
tiller-deploy-66cccbf9cd-84swm 1/1 Running 0 24s
^C%
有任何想法吗?
1> 小智..:
尝试删除群集分cluster
kubectl get all --all-namespaces | grep tiller
kubectl delete deployment tiller-deploy -n kube-system
kubectl delete service tiller-deploy -n kube-system
kubectl get all --all-namespaces | grep tiller
再次初始化:
helm init
现在添加服务帐户:
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
这解决了我的问题!
2> Vishrant..:
您尚未配置helm,请使用以下命令:
helm init
这将在您的主目录中.helm
使用repository
,plugins
等创建.
背景:
helm
客户端和服务器附带,如果你有不同的部署环境,你的helm服务器(称为tiller
)可能是不同的,在这种情况下,有两种方法可以指向tiller
设置环境变量 TILLER_NAMESPACE
--tiller-namespace
Tiller的字符串命名空间(默认为"kube-system")
有关更多详细信息,请查看helm
READ.md文件.
3> Marcin Romas..:
您将tiller安装到非默认命名空间中,因此您必须告诉helm在哪里查找.
helm --tiller-namespace tiller version
4> 小智..:
首先,您需要创建供柜员使用的服务帐户:
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
要验证Tiller是否正在运行:
kubectl get pods --namespace kube-system
DigitalOcean参考