Helm ls: Error: configmaps is forbidden: User “system:serviceaccount:kube-system:tiller”

限于喜欢 提交于 2020-06-28 05:50:08

问题


Is helm broken, I keep getting:

Error: configmaps is forbidden: User "system:serviceaccount:kube-system:tiller" cannot list resource "configmaps" in API group "" in the namespace "kube-system"

when helm ls


回答1:


helm is probably fine.

You need to have correct serveice-account and role binding. Refer https://github.com/helm/helm/blob/master/docs/rbac.md#tiller-and-role-based-access-control for common scenario examples.




回答2:


The link shared on above answer are No more valid and throws a 404 error. For completeness and users looking for solution sharing the fix steps below

If below ERROR is reported on helm :

$ helm list
Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system"

SOLUTION: Use below commands to create serviceaccount and clusterrolebinding and patch the tiller-deployment to user service account.

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


来源:https://stackoverflow.com/questions/55457589/helm-ls-error-configmaps-is-forbidden-user-systemserviceaccountkube-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!