Interview Prep/CI/CD/Deployment, Kubernetes and GitOps Failures

`Error from server (Forbidden): deployments.apps "app" is forbidden: User "system:serviceaccount:ci:deployer" cannot patch resource`.

AdvancedTroubleshootingDeployment, Kubernetes and GitOps Failures
Answer

Likely causes → RBAC Role lacks verbs for the resource, or bound in the wrong namespace.

Diagnose → kubectl auth can-i patch deployments -n prod --as=system:serviceaccount:ci:deployer.

Fix → Add the needed verbs to the Role and RoleBinding in the target namespace.

Prevent → Define CI RBAC in Git and test with can-i.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment, Kubernetes and GitOps Failures