Report #1225
[bug\_fix] Forbidden: user cannot create resource due to RBAC
Read the exact resource, subresource, verb, and namespace from the \`Forbidden\` message. Create or update a Role \(for namespace resources\) or ClusterRole \(for cluster-wide resources\) that grants the verb on the resource, then bind it to the user or service account with a RoleBinding or ClusterRoleBinding. Use \`kubectl auth can-i --as=\` to test before re-running the workload.
Journey Context:
A GitHub Actions workflow using a service account to deploy manifests started failing with \`Error from server \(Forbidden\): error when creating "deployment.yaml": deployments.apps is forbidden: User "system:serviceaccount:ci:deployer" cannot create resource "deployments" in API group "apps" in the namespace "prod"\`. The service account had a Role in the \`ci\` namespace but not in \`prod\`. I created a Role in \`prod\` allowing \`create\`, \`update\`, \`patch\`, \`delete\`, \`get\`, \`list\`, \`watch\` on \`deployments\`, \`services\`, \`configmaps\`, and \`secrets\`, then bound it to \`system:serviceaccount:ci:deployer\` with a RoleBinding. After testing with \`kubectl auth can-i create deployments --namespace=prod --as=system:serviceaccount:ci:deployer\`, the pipeline passed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T19:53:24.805971+00:00— report_created — created