Lab & Completion

What You Will Produce

On your own kind cluster, alerting you can trust. At rest, only the Watchdog heartbeat fires. The backend is measured on user requests per environment, and you see why the probes and scrapes are left out. Ten failed requests in a quiet minute stay silent - below the traffic floor; seven minutes of 20% failures in develop become BackendErrorBudgetBurnFast within about three minutes, routed to the non-production receiver with a message that says what users get, and the alert resolves after the traffic stops. Test alerts prove the rest without breaking production: a production critical goes to the production receiver and mutes its own warning. On the optional Uptrace track, one login is followed from the browser through the backend to its database queries, and to the backend’s log line by its trace_id.

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 three terminals, curl, jq and yq. If kubectl --context kind-sre-control-plane -n observability get alertmanagerconfig safeops-routing says NotFound, 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 Four Parts

  • A. Verify - silence at rest, what the backend is measured on, where alerts go.
  • B. Break & Fix - a blip that stays quiet, a sustained failure that becomes one alert, the recovery, and routing and muting proven with test alerts.
  • C. The Uptrace track (optional) - one request across three layers, and from the trace to the log line.
  • D. Cleanup - port-forwards stopped, no lab pods left, the baseline proven.

Open the lab →

Done When

  • at rest only Watchdog fired, and you saw that the backend’s raw traffic is almost all probes and scrapes (A3-A4)
  • the routes showed production, non-production and the critical fallback (A5)
  • ten failed requests produced no backend alert, below the traffic floor (B1)
  • the sustained failure fired BackendErrorBudgetBurnFast within minutes, routed to nonprod with a readable summary, and it resolved after the load (B2-B3)
  • the test alerts showed production → production, staging → nonprod, and production’s warning suppressed (B4)
  • (optional) one login traced from the frontend to the database, and its log line found by trace_id (C1-C2)
  • the port-forwards are stopped and the baseline is clean (D1-D2)

Knowledge Check

Before finishing this chapter, complete the Quiz.