PART 7: INCIDENT MANAGEMENT
35. Workload Incident Post-Mortem Template
text
INCIDENT: Deployment Rollout Failed - All Pods CrashLooping
DATE: 2024-01-15
DURATION: 15 minutes
SEVERITY: SEV-1
IMPACT: 100% of web service down. All users unable to access.
TIMELINE:
14:00 - Deployment web:v2.0.0 rolled out
14:01 - Alert: Pods in CrashLoopBackOff
14:02 - On-call engineer acknowledged
14:03 - Identified missing ConfigMap "web-config-v2"
14:05 - Rolled back deployment
14:07 - Pods recovering
14:15 - Full service restored
ROOT CAUSE:
Deployment referenced a new ConfigMap "web-config-v2" that was
never created. All pods failed to start.
LESSONS LEARNED:
1. ConfigMaps should be in the same Helm chart as Deployment
2. Readiness gates should block bad rollouts
3. CI should validate references
ACTION ITEMS:
[ ] Add CI validation for resource references (Owner: Platform, Due: 2024-01-20)
[ ] Configure deployment gates (Owner: SRE, Due: 2024-01-22)
[ ] Test rollback procedure (Owner: Team, Due: 2024-01-25)
36. On-Call Runbook: Workload Failures
text
SYMPTOM: Workload not performing as expected.
STEP 1: Identify the workload
$ kubectl get deployments,statefulsets,daemonsets,jobs,cronjobs -A
STEP 2: Check Pod status
$ kubectl get pods -l app=<name>
$ kubectl describe deployment <name>
STEP 3: Check for failures
$ kubectl describe pod <pod>
# Look at Events
STEP 4: Categorize
CrashLoopBackOff → check logs, env vars, ConfigMaps
Pending → check nodes, resources, taints
OOMKilled → check limits, memory usage
NotReady → check readiness probe
Terminating forever → check preStop, SIGTERM handling
STEP 5: Apply fix
# Rollback if bad deploy
$ kubectl rollout undo deployment/<name>
# Fix config
$ kubectl edit configmap <name>
# Scale up if overwhelmed
$ kubectl scale deployment/<name> --replicas=N
STEP 6: Verify
$ kubectl rollout status deployment/<name>
$ kubectl get pods -l app=<name>
STEP 7: Document
37. Escalation Matrix
| Severity | Impact | Response Time | Escalation |
| SEV-1 | All replicas down / service unavailable | 5 min | On-call + Platform + Management |
| SEV-2 | Degraded / partial outage | 15 min | On-call + Platform |
| SEV-3 | Single Pod issue | 1 hour | On-call |
| SEV-4 | Configuration warning | 4 hours | Ticket |
1:1 copy of the class Google Doc, code in code blocks.