Skip to content

Instantly share code, notes, and snippets.

@janeczku
Created September 8, 2018 00:03
Show Gist options
  • Select an option

  • Save janeczku/bc20b731f95cb65f4d83ff87a631955b to your computer and use it in GitHub Desktop.

Select an option

Save janeczku/bc20b731f95cb65f4d83ff87a631955b to your computer and use it in GitHub Desktop.
How to fix Helm/tiller RBAC permission errors

You are running helm init or helm install foo commands and getting errors like this one?

Error: release foo failed: namespaces "bar" is forbidden: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "bar"

Now you have two options:

  1. Starting from scratch (and learn a thing or two) by following the documentation
$ helm reset --force
$ kubectl -n kube-system create serviceaccount tiller
$ kubectl create clusterrolebinding tiller \
  --clusterrole cluster-admin \
  --serviceaccount=kube-system:tiller
$ helm init --service-account tiller

Ref: https://rancher.com/docs/rancher/v2.x/en/installation/ha/helm-init/

  1. Or fix your current helm/tiller setup with two commands like so:
$ helm init --service-account tiller --upgrade
$ helm update repo

If that still didn't help, ensure that your tiller deployment has it's serviceAccountName set to tiller:

$ kubectl  -n kube-system edit deployment tiller-deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment