Investigation & Containment
Investigation
Four questions, in this order: who is in charge, what do users get, what changed, and what is the lowest-risk way back. Every command names the cluster with --context (Chapter 01).
Who is in charge? The first person on the incident is its commander until they hand command over - out loud, and the other person confirms. Without that, every responder is a commander, and actions race each other.
What do users get? The impact decides the severity, not the alert’s label. A probe through the Service, the error ratio on user requests, a login that works or fails:
curl -sG localhost:9090/api/v1/query --data-urlencode 'query=backend:user_error_ratio:rate5m' \ | jq -r '.data.result[] | "\(.metric.namespace) \(.value[1])"'The error ratio per environment, from Chapter 11’s recording rules - it moves within a minute of the failures, minutes before the burn-rate alert fires.
What changed? Most incidents follow a change. Git and Flux say which, and when:
git log --oneline -5 -- flux/apps/backend/ flux --context kind-sre-control-plane get kustomizations backend-develop kubectl --context kind-sre-control-plane -n develop rollout history deployment/backendA release a few minutes before the first failure is the first suspect - not proof, but enough to try the reversible thing first.
What is the lowest-risk way back? A revert of the change in Git goes through the same path as the change itself: a pull request, its checks, Flux. A restart brings back the same pods with the same configuration; scaling adds more of them.
The root cause of the story is not a slow engineer. It is an incident nobody ran: no commander, a fix chosen by habit, recovery read from an alert, and a postmortem that stopped at a name.
Containment
Take command - one person decides; say it in the channel. Alone, you are all the roles; when help arrives, hand over a role explicitly.
Freeze parallel changes - every action goes through the commander, and the scribe writes it down with its time.
Revert the suspect change - once the revert is safe. Read what the merge brought into
main- the diff against its first parent (git showon a merge commit can print nothing at all).<sha>is a placeholder: put in the suspect merge’s SHA fromgit log --merges --oneline:MERGE=<sha> git diff "$MERGE^1" "$MERGE"Then check three things:
- data and schema: did the change - or anything since - migrate the database or write data the old version cannot read? Then the old version may not run against today’s data (Chapter 18);
- removed resources: would the revert delete something that holds data - a volume, a database, a bucket - when Flux prunes what Git no longer has?
- image automation: on the cloud cluster, would the automation write the bad tag back (Chapter 10)?
All three clear: revert through Git, the way it came in, and prove recovery on the users’ path. Any of them unclear: do not revert on a guess - escalate to the service owner, and contain meanwhile (fewer users on the broken path, a feature switched off).
Keep the record - the timeline, what was tried and what it did, while it is fresh.
One person decides, the evidence is enough for the decision, recovery is a user operation that succeeds, and the postmortem changes the system - not a person.
Pause and Predict: You revert the release and the error ratio drops to zero within a minute. When will BackendErrorBudgetBurnFast resolve - and is that the moment you close the incident?