Before an incident, check two assumptions in the rollback runbook: can the named responder change the target Deployment, and does the revision they plan to restore still exist? This is a proposed rehearsal.
Why the check matters
Kubernetes RBAC is additive. A RoleBinding grants namespaced permissions even if it references a ClusterRole, while a ClusterRoleBinding grants the referenced permissions cluster-wide. Inspect all applicable bindings before assuming access is restricted to one namespace. RBAC documentation
Deployment revisions add a second assumption. A new revision appears when the Pod template changes, while scaling the Deployment alone does not create one (Deployment docs). A rollback to an available revision restores the Pod template; it does not reverse unrelated database changes. So 'last good version' may not be the revision that captured the config you changed.
Steps
- Name the identity that will run the rollback — human, break-glass ServiceAccount, or CI role — and record it beside the alert.
- Before the incident, use that identity's context to ask the API server whether it can patch Deployments in the target namespace. Record the decision and the time.
- List the Deployment's revisions in the target namespace and confirm the intended target exists.
- Write down what the rollback does not cover — migrations, feature flags, secrets — beside the recovery note.
- Re-check whenever a binding, ClusterRoleBinding, or Pod template changes, and date the entry.
Test
Use the intended identity, target namespace, Deployment and one neighbouring namespace. Record the authorization decision for patching the target plus the available revisions. If access is meant to be namespaced only, expect the neighbour to deny the same request. An unexpected allow warrants investigation of all matching grants. An unexpected denial leaves the runbook unverified for that identity. If the target revision is missing, select another recovery path before relying on the runbook.
Limits
This check covers authorization and revision existence only. It does not prove database reversibility, secret rotation, or that the previous template was healthy.
This article was created with AI assistance.