Chapter 13: Controlled Chaos
Learning Objectives
By the end of this chapter, you will be able to:
- Run a chaos experiment as an experiment: steady state, hypothesis, one fault, measurement, comparison
- Measure what users get during a fault with an independent probe through the Service - not with
kubectl get pods - Say what a pod deletion tests and what it does not (PodDisruptionBudgets and autoscaling are not among them)
- Bound a chaos tool with limits it cannot step over - RBAC, an admission policy, a time window - and stop it completely
Recall Check
Before continuing, quickly recall:
- What creates the replacement when a pod of a Deployment disappears - and what does a PodDisruptionBudget protect against? (Chapter 09)
- Why does a short burst of failures not fire
BackendErrorBudgetBurnFast? (Chapter 11) - What proves a restore -
Ready, or something else? (Chapter 12)
If you can’t answer these, revisit the corresponding chapter before proceeding.
Context
Chapters 09 to 12 built ways for the platform to survive failure: replicas and disruption budgets, alerts that reach a person, restores you can prove. None of them has been seen working under a real fault. The first time a failure mode appears should not be at 02:00 in production.
So this chapter breaks things on purpose - small, in develop, with a way to stop. But breaking things is not the experiment. The experiment is the prediction: write down what you expect users to see, cause one fault, measure what they actually saw, and compare. A fault without a hypothesis and a measurement is a spectacle; it proves nothing, and teaches nothing.
The same holds for the tool. A chaos tool is code with permission to destroy. Its limits must be ones it cannot step over - not lines in its own script.
Work through each lesson section; the chapter video, once it is published, gives the concept overview.