2017-04-19 36 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"}}}}' 
相關問題