Skip to content

Instantly share code, notes, and snippets.

@svanellewee
Last active February 12, 2020 11:54
Show Gist options
  • Save svanellewee/96c561170a2cec97060330906dbc1ccc to your computer and use it in GitHub Desktop.
Save svanellewee/96c561170a2cec97060330906dbc1ccc to your computer and use it in GitHub Desktop.
WHen Tiller Complains about "kube-system:tiller" serviceaccount not being able to list "configmaps"
kubectl --namespace kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --upgrade
https://devops.stackexchange.com/questions/8047/helm-cannot-get-resource-namespaces-in-api-group
# From https://html.developreference.com/article/10604441/Authentication+problem+when+installing+something
#The problem here is the Tiller. I do not know how you deployed Helm and Tiller, but the mistake was there.
#I used this chart and all works correctly, then I deleted my service account and cluster role binding and I met the same error - deleting only cluster role binding gives error:
# Error: release nginx-ingress failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:tiller" cannot get namespaces in the namespace "default"
#So the error is due to missing Service Account or both.
#Solution for this:
rm -rf ~/.helm
kubectl create serviceaccount tiller --namespace kube-system
kubectl create clusterrolebinding tiller-cluster-rule \
--clusterrole=cluster-admin \
--serviceaccount=kube-system:tiller
helm init --service-account=tiller
kubectl get pods -n kube-system
check the full name of tiller pod:
kubectl delete pod -n kube-system tiller-deploy-xxx
#Wait till the tiller pod will be redeployed and install your helm chart:
helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment