Report #87035
[bug\_fix] Unauthorized or Forbidden: ServiceAccount or user lacks RBAC permission
Run \`kubectl auth can-i --as=system:serviceaccount::\` to confirm the permission gap. Create or update a Role/ClusterRole and bind it to the ServiceAccount or user with a RoleBinding/ClusterRoleBinding. For API server authentication issues, verify the kubeconfig certificate/context.
Journey Context:
A CI pipeline pod calls the Kubernetes API to list ConfigMaps and gets Forbidden: configmaps is forbidden: User system:serviceaccount:ci:deployer cannot list resource configmaps in API group in the namespace apps. You impersonate the account with \`kubectl auth can-i list configmaps -n apps --as=system:serviceaccount:ci:deployer\` and it returns no. The ServiceAccount has no RoleBinding granting list. You create a Role in namespace apps with verbs get,list,watch on configmaps and bind it to system:serviceaccount:ci:deployer. The next pipeline run succeeds. The error came from the API server's authorization check, not from the network or token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:40:48.281485+00:00— report_created — created