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

RBAC issue: User "system:serviceaccount:dev:redis-cluster-operator" cannot get resource "pods" in API group #72

Open
gautaz opened this issue Dec 17, 2020 · 0 comments · May be fixed by #78

Comments

@gautaz
Copy link

gautaz commented Dec 17, 2020

Hello,

I have deployed the helm chart with --version=0.1.0 --set operator.namespace=dev.

This is currently failing:

➤  kubectl get deployments.apps redis-cluster-operator
NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
redis-cluster-operator   0/1     1            0           46s

The operator logs shows the following:

➤  kubectl logs redis-cluster-operator-6b89b7c7c7-xxt4k
{"level":"info","ts":1608217532.1860723,"logger":"cmd","msg":"Go Version: go1.13.3"}
{"level":"info","ts":1608217532.1861515,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1608217532.18617,"logger":"cmd","msg":"Version of operator-sdk: v0.13.0"}
{"level":"info","ts":1608217532.1861897,"logger":"cmd","msg":"Version of operator: v0.2.0-62+12f703c"}
{"level":"info","ts":1608217532.186407,"logger":"leader","msg":"Trying to become the leader."}
{"level":"error","ts":1608217533.4404905,"logger":"k8sutil","msg":"Failed to get Pod","Pod.Namespace":"dev","Pod.Name":"redis-cluster-operator-6b89b7c7c7-xxt4k","error":"pods \"redis-cluster-operator-6b89b7c7c7-xxt4k\" is forbidden: User \"system:serviceaccount:dev:redis-cluster-operator\" cannot get resource \"pods\" in API group \"\" in the namespace \"dev\": RBAC: clusterrole.rbac.authorization.k8s.io \"redis-cluster-operator\" not found","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128\ngithub.com/operator-framework/operator-sdk/pkg/k8sutil.GetPod\n\t/go/pkg/mod/github.com/operator-framework/[email protected]/pkg/k8sutil/k8sutil.go:128\ngithub.com/operator-framework/operator-sdk/pkg/leader.myOwnerRef\n\t/go/pkg/mod/github.com/operator-framework/[email protected]/pkg/leader/leader.go:160\ngithub.com/operator-framework/operator-sdk/pkg/leader.Become\n\t/go/pkg/mod/github.com/operator-framework/[email protected]/pkg/leader/leader.go:67\nmain.main\n\t/src/cmd/manager/main.go:99\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}
{"level":"error","ts":1608217533.4405937,"logger":"cmd","msg":"","error":"pods \"redis-cluster-operator-6b89b7c7c7-xxt4k\" is forbidden: User \"system:serviceaccount:dev:redis-cluster-operator\" cannot get resource \"pods\" in API group \"\" in the namespace \"dev\": RBAC: clusterrole.rbac.authorization.k8s.io \"redis-cluster-operator\" not found","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128\nmain.main\n\t/src/cmd/manager/main.go:101\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}

Any ideas ?

zehweh added a commit to zehweh/redis-cluster-operator that referenced this issue Mar 2, 2021
@zehweh zehweh linked a pull request Mar 2, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant