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:
- 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/
- 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