Report #1701
[bug\_fix] Unauthorized / Forbidden by RBAC
Identify the principal \(user, group, or ServiceAccount\) and the resource/verb being denied from the error message. Create a Role \(namespace-scoped\) or ClusterRole \(cluster-scoped\) with the needed permissions, then bind it to the principal with a RoleBinding or ClusterRoleBinding. In-cluster clients using the default ServiceAccount must be assigned a custom ServiceAccount and bound to a Role.
Journey Context:
A Python operator running on OpenShift 4.15 lists pods in its namespace but receives \`HTTP 403 Forbidden: User "system:serviceaccount:ops:operator-sa" cannot list resource "pods"\`. The pod uses the \`operator-sa\` ServiceAccount, which has no RBAC permissions. The team creates a Role with \`verbs: \[get, list, watch\]\` on \`pods\` and a RoleBinding that subjects \`operator-sa\`. After the API server authorization cache refreshes, the operator's API calls are allowed and it can list pods.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T06:51:11.487171+00:00— report_created — created