Stabilise before you diagnose
Production on-call
An incident is two jobs in sequence: stop the bleeding, then find out what cut it. Doing them the other way round is how a twenty-minute outage becomes a two-hour one, and an undo that the pipeline quietly reverses tomorrow is not a fix at all.
The same scenario with a scheduler, a saturating database and a bill. A runbook, not a graded lab - and it says what it has not been proven to do.
Mitigate first, diagnose second
At the point the pager fires, `why` is the wrong question. The right one is what stops it hurting and can be undone: scale the replica back up, roll the release back, fail over. Each buys the time to find the cause, and each is reversible if the guess was wrong.
Write down what you did and when you did it. The evidence for the review is the log line, the revision number and the timestamp, not your memory at nine in the morning. Capturing it is not paperwork; it is the only thing that makes the next incident shorter.
An undo is not a fix
`kubectl rollout undo` restores the previous revision inside the cluster. It does not touch the repository, so whatever writes the cluster — Argo CD, a deploy job, the next `apply` — will faithfully put the broken tag back. The undo stops the bleeding; the revert commit is the cure.
The same shape applies to a database that was scaled to zero: bring capacity back for the users, then remove the change that took it away, or the next maintenance window will do it again.
The review is the product
A post-mortem that says `fixed by scaling up` teaches nobody anything. The sections that carry weight are detection (which signal, how long it took), root cause (the change, not the symptom), resolution (the exact command) and prevention (the alert or the guard that makes it a minute next time).
An alert is a promise that a human will look, so alert on what users feel — a database with no replicas, a sustained error rate — and give it a `for:` duration, or a single bad scrape pages someone for nothing.
Commands in this lesson
Every one of these runs in the sandbox — no real account, no real bill.
| Command | Why |
|---|---|
kubectl get statefulsets -n bank-prod | What is actually running, before you trust a dashboard that may be describing a different layer. |
kubectl logs ledger-db-0 -n bank-prod > /home/student/incidents/evidence.txt | Capture the evidence while the pod still exists; a replaced pod takes its log with it. |
kubectl scale statefulset/ledger-db --replicas=1 -n bank-prod | Mitigation: restore capacity first, explain it afterwards. |
kubectl rollout undo deployment/transactionhistory -n bank-prod | Restores the previous revision in the cluster. It does not change the repository. |
cp releases/transactionhistory-v0.6.4.yaml kubernetes-manifests/transactionhistory.yaml | The cure: put the known-good manifest back, so the next sync cannot undo your undo. |
Now do it
Reading the model makes the first attempt faster. Only the lab makes you able to do it.
- Open the lab
On-call: bring the payments platform up
Intermediate · 30 min · free
- Open the lab
On-call: ship the image through a GitOps pipeline
Advanced · 30 min · free
- Open the lab
On-call: autoscale under a traffic surge
Intermediate · 25 min · free
- Open the lab
On-call: autoscaling did not fix the latency
Advanced · 30 min · free
- Open the lab
On-call: the ledger database is gone
Advanced · 35 min · free
- Open the lab
On-call: roll back a bad release
Advanced · 25 min · free
Production on-call · OphirCloud Academy · all lessons