Report #97760
[bug\_fix] RBAC Forbidden \(Unauthorized\)
Identify the ServiceAccount the pod or user is using with \`kubectl auth can-i --as=system:serviceaccount::\`, then create or update a Role or ClusterRole with the needed permissions and bind it with a RoleBinding or ClusterRoleBinding. Avoid using cluster-admin; scope permissions to the namespace and verbs required.
Journey Context:
An operator pod logs \`User system:serviceaccount:ops:backup-sa cannot create resource pods/exec in API group "" in the namespace app\` when trying to exec into a pod to take a backup. You impersonate the ServiceAccount with \`kubectl auth can-i create pods/exec --as=system:serviceaccount:ops:backup-sa -n app\` and get 'no'. You create a Role allowing \`pods/exec\` create in namespace app and a RoleBinding to backup-sa; the operator succeeds. Kubernetes uses RBAC to decide every API request; without a binding that grants the verb and resource to the subject, the API server returns 403.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T04:39:04.980386+00:00— report_created — created