Lab & Completion
What You Will Produce
On your own kind cluster, one chaos experiment done properly and one Chaos Monkey run with a full stop. You check that the monkey is off, which image it runs, and that the cluster - not its script - keeps it away from the database. You measure the steady state with a probe through the backend’s Service, write a hypothesis, delete the only backend pod in develop, and measure the outage in seconds with the same probe; then you compare it with what you predicted and fill in the scorecard. Last, you run the monkey once by hand - it deletes a pod or tells you why it skipped - and stop it completely.
Before You Start
The baseline from Chapter 00 must be clean:
flux --context kind-sre-control-plane get kustomizations -A # every row READY=True and SUSPENDED=False
kubectl --context kind-sre-control-plane get pods -A --no-headers | grep -vE 'Running|Completed' # prints nothing
make smoke-test # Fail: 0
You need two terminals: one for the probe, one for the fault. If flux/infrastructure/chaos/develop/target-guard.yaml does not exist in your clone, your fork is older than the chapter: on GitHub, open your fork and click Sync fork → Update branch, then git switch main && git pull, and let Flux catch up.
The Lab in Three Parts
- A. Verify - the monkey is off, its image, what it can and cannot delete, the steady state through the Service.
- B. Break & Fix - a hypothesis, one pod deleted, the outage measured and compared; one monkey run, and a full stop.
- C. Rollback & Cleanup - no monkey Job left, the scorecard filled, the baseline proven.
Done When
- the CronJob showed
suspendtrueand an image pinned by digest (A2) - as the monkey, deleting
app-postgres-1was refused bychaos-monkey-targets, a backend pod allowed, andstagingforbidden (A3) - the steady-state probe ended with
fail=0(A4) - your hypothesis and stop condition were written before the fault (B1)
- the probe measured the outage after the deletion, and you compared it with the hypothesis (B2-B3)
- the monkey’s run logged either
chaos_monkey_delete_podorchaos_monkey_skipwith its reason (B4) - after the full stop no monkey Job or pod was left, and the probe showed
fail=0again (B5) - the scorecard has the numbers and one hardening action, and the baseline is clean (C1-C2)
Knowledge Check
Before finishing this chapter, complete the Quiz.