An incident is an unplanned service disruption or serious risk that needs coordinated response. The first objective is to reduce user impact; diagnosis and long-term repair can follow once the service is stable. A runbook connects symptoms to safe checks, escalation contacts, and the quickest validated mitigation.
Incident response: contain impact, then learn
Operational decision
If a deployment raises checkout failures, assign an incident lead and an operator, record the start and affected paths, then pause rollout or route back to the last known good digest. Keep a single incident timeline. A communications owner can provide a short status to stakeholders without interrupting the person executing the mitigation. The shell sketch reads a rollout and initiates a rollback, but run it only after confirming the prior revision is compatible with current data. If the problem came from a migration or external dependency, reversing a Deployment may not help. After recovery, write a review that distinguishes the trigger, conditions that amplified it, detection delay, and actions with owners and dates. Avoid reducing the review to who clicked a button.
kubectl -n checkout rollout status deployment/checkout-api --timeout=90s
kubectl -n checkout rollout history deployment/checkout-api
kubectl -n checkout rollout undo deployment/checkout-api
kubectl -n checkout rollout status deployment/checkout-api --timeout=180sCost and verification
Fast rollback can shorten impact but may create another failure if schema or event formats are incompatible. Keep rollback drills current and record which revisions remain safe. An incident bridge and logs cost attention; explicit roles prevent several people from issuing conflicting changes. Preserve evidence before cleanup where possible, but do not delay a known safe mitigation merely to capture perfect diagnostics. Use the incident review to change a concrete control, test, or signal, then verify that change later.
Common Mistakes
- Do not run rollout undo without checking data compatibility.
- Do not let several operators change the same service without coordination.
- Do not close an incident review with actions that have no owner.
Connected lessons
- DevOps Tutorial
- SLOs and error budgets: turn reliability into a decision
- Backups and disaster recovery: prove the restore path
- DevOps: map a change from commit to recovery
Operational follow-up
- Linux service diagnostics: process, socket, and journal
- Alert design: page on impact and include a first action
Advanced follow-up
Advanced follow-up
Recovery execution follow-up
- Disaster declaration: define authority, scope, and stop conditions
- Recovery-time budgets: measure every stage of service return
Delivery measurement follow-up
Related Prompt Engineering lesson: Project: evaluate an incident handoff prompt.
Continue with: Incident triage prompts: build a timestamped evidence ledger.
Continue with: Incident updates: audience, owner, and release gate.
