Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create resource "roles" in API group "rbac.authorization.k8s.io" #11

Open
icicimov opened this issue Oct 28, 2022 · 2 comments
Open

Comments

@icicimov
Copy link

Seems some rbac permissions are missing:

level=error msg="Key 'injector1' processing failed: roles.rbac.authorization.k8s.io is forbidden: User \"system:serviceaccount:nsinjector-controller:nsinjector-controller\" cannot create resource \"roles\" in API group \"rbac.authorization.k8s.io\" in the namespace \"my-test-ns\""
@rahul-chr
Copy link

Looks like i have the same..
nsinjector-controller service account dont have the right roles/clusterrole to create resources.

@dvpierce
Copy link

I had a similar problem - I'm guessing you're using the clusterInternal permission scheme instead of specifying a kube config file?

I had to add this to the clusterrole.yaml file in the helm chart template:

- apiGroups: ["rbac.authorization.k8s.io"]
  resources: ["rolebindings"]
  verbs: ["list", "get", "watch", "create", "update", "patch", "delete"]

Then it started working. (Although I guess you'd need to change the resources line to include "roles" as well.

The default [""] bit for the apiGroups also failed: I think you have to specify the rbac one explicitly.

AKS/K8S v1.25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants