2017-04-19 69 views
8

我遇到了一些Helm的错误,我无法在别处找到解释。这两个错误在下面。头盔:错误:未找到可用的版本名称

Error: no available release name found 
Error: the server does not allow access to the requested resource (get configmaps) 

这两个错误的更多细节在下面的代码块中。

我在Ubuntu 16.04上安装了Kubernetes集群。我有一个Master(K8SMST01)和两个节点(K8SN01 & K8SN02)。

这是使用kubeadm使用Weave网络为1.6+创建的。

一切都显得非常清楚尽可能部署,服务,豆荚等运行... DNS看起来工作正常,这意味着荚可以访问使用DNS名称(myservicename.default)服务。

使用“helm create”和“helm search”工作,但与分蘖部署交互似乎不起作用。 Tiller根据Helm安装文档安装并运行。

[email protected]:/home/blah/charts# helm version 

Client: &version.Version{SemVer:"v2.3.0", 
GitCommit:"d83c245fc324117885ed83afc90ac74afed271b4", GitTreeState:"clean"} 
Server: &version.Version{SemVer:"v2.3.0", GitCommit:"d83c245fc324117885ed83afc90ac74afed271b4", GitTreeState:"clean"} 

[email protected]:/home/blah/charts# helm install ./mychart 

Error: no available release name found 

[email protected]:/home/blah/charts# helm ls 

Error: the server does not allow access to the requested resource (get configmaps) 

这里是正在运行的荚:

[email protected]:/home/blah/charts# kubectl get pods -n kube-system -o wide 
NAME          READY  STATUS RESTARTS AGE  IP    NODE 
etcd-k8smst01        1/1  Running 4   1d  10.139.75.19 k8smst01 
kube-apiserver-k8smst01     1/1  Running 3   19h  10.139.75.19 k8smst01 
kube-controller-manager-k8smst01   1/1  Running 2   1d  10.139.75.19 k8smst01 
kube-dns-3913472980-dm661     3/3  Running 6   1d  10.32.0.2  k8smst01 
kube-proxy-56nzd       1/1  Running 2   1d  10.139.75.19 k8smst01 
kube-proxy-7hflb       1/1  Running 1   1d  10.139.75.20 k8sn01 
kube-proxy-nbc4c       1/1  Running 1   1d  10.139.75.21 k8sn02 
kube-scheduler-k8smst01     1/1  Running 3   1d  10.139.75.19 k8smst01 
tiller-deploy-1172528075-x3d82   1/1  Running 0   22m  10.44.0.3  k8sn01 
weave-net-45335       2/2  Running 2   1d  10.139.75.21 k8sn02 
weave-net-7j45p       2/2  Running 2   1d  10.139.75.20 k8sn01 
weave-net-h279l       2/2  Running 5   1d  10.139.75.19 k8smst01 
+1

这个职位似乎是[题外话](HTTP://计算器。对于专业服务器,网络或相关基础设施管理的问题,除非他们直接涉及编程或编程工具,否则对于堆栈溢出是无关紧要的。*您的问题可能更适合[服务器故障] (http://serverfault.com/) –

+2

@PatrickHund我不这么认为。我认为Helm的问题在这里有效。 Kubernetes社区使用堆栈溢出。 –

回答

9

我认为这是一个RBAC问题。看起来,掌舵人尚未准备好1.6.1的RBAC。

在Helm's Github上有这个问题。

https://github.com/kubernetes/helm/issues/2224

"When installing a cluster for the first time using kubeadm v1.6.1, the initialization defaults to setting up RBAC controlled access, which messes with permissions needed by Tiller to do installations, scan for installed components, and so on. helm init works without issue, but helm list, helm install, and so on all do not work, citing some missing permission or another."

临时工作各地已经表明:

"We "disable" RBAC using the command kubectl create clusterrolebinding permissive-binding --clusterrole=cluster-admin --user=admin --user=kubelet --group=system:serviceaccounts;"

但我不能为它的有效性说话。好消息是,这是一个知道的问题,正在努力解决它。希望这可以帮助。

+0

谢谢!这似乎奏效了。由于这是一个实验性的“沙盒”K8S集群,我并不担心这种影响。只需要能够与Helm一起玩。我upvoted,但我太新,不能反映在得分:( – cjp

+0

我很高兴我可以帮助,快乐的Helming!我认为,虽然你太新不能upvote你可以标记这是正确的答案你的问题,如果你能做到这一点,我将不胜感激。 –

3

我对至CentOS 7

头盔不会使服务帐户与kubeadm设置了同样的问题,当你“掌舵初始化”,默认一个没有权限从读configmaps - 因此它将无法运行检查来查看它想要使用的部署名是否是唯一的。

这让我过去吧:

kubectl create clusterrolebinding add-on-cluster-admin \ 
    --clusterrole=cluster-admin \ 
    --serviceaccount=kube-system:default 

但是,这是给默认帐户吨的力量,我只是做这个,所以我可以得到我的工作。头盔需要将他们自己的服务帐户的创建添加到“helm init”代码。

17

kujenga从github问题给出的解决方案,它没有任何其他更改。

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"}}}}' 
0

https://github.com/kubernetes/helm/issues/2224#issuecomment-356344286,下面的命令解析错误对我来说:

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"}}}}'