Report #2610
[bug\_fix] RBAC "Unauthorized" / "forbidden" from a pod calling the Kubernetes API
Create a Role \(or ClusterRole\) with the needed verbs and resources, then bind it to the pod's ServiceAccount with a RoleBinding \(or ClusterRoleBinding\).
Journey Context:
An in-cluster controller or operator pod calls the API server and receives errors like Unauthorized or User "system:serviceaccount:default:default" cannot list resource "pods" in API group "". The developer first tries mounting a kubeconfig or hard-coding a token, which is unsafe. The root cause is that the default service account has no API permissions beyond token mounting; Kubernetes uses RBAC to enforce least privilege. The fix is to define a Role with rules for the required resources/verbs, then create a RoleBinding that grants those permissions to the service account the pod runs as. After applying the binding, the API calls succeed with the in-cluster token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T13:27:48.883274+00:00— report_created — created