Chapter 14: AI-Assisted SRE Guardian
Interactive Explainer
Video is being produced. Check back soon.
Learning Objectives
By the end of this chapter, you will be able to:
- Explain how the Guardian turns signals - Alertmanager alerts, Kubernetes events, Flux stalls, its own scanners - into incidents: one per signal, its repeats counted rather than re-posted
- Prove its limits from the cluster, not from its documentation: a read-only ClusterRole without Secrets, an API behind a token
- Say what goes to the LLM and what never does: production only, context redacted and budgeted - and why redaction is not a defence against instructions hidden in logs
- Read an AI analysis as a hypothesis: check its evidence, decide, act yourself
Recall Check
Before continuing, quickly recall:
- Which receiver gets a
productionalert, and why does a warning sometimes show assuppressed? (Chapter 11) - Why does a short outage not fire
BackendErrorBudgetBurnFast? (Chapter 11) - What kept the Chaos Monkey away from the database - its script, or something the cluster enforces? (Chapter 13)
If you can’t answer these, revisit the corresponding chapter before proceeding.
Context
Chapter 11 gave every alert an owner and a receiver; Chapter 13 caused faults on purpose. A real failure rarely fires one alert: a broken deployment brings a crash loop, failing requests, a stalled Flux Kustomization and a few warnings on the side - each true, each its own message. The person on call has to work out that it is one problem before working on it.
The Guardian (k8s-ai-monitor) is the layer between those signals and that person. It takes every alert from Alertmanager but Watchdog and InfoInhibitor, watches events and Flux, runs its own checks, and keeps one incident per signal: its repeats are counted, not posted again, and its context is collected. In production it asks an LLM for an analysis. It does not decide that four different alerts are one problem - that is still the person’s call, and the reason the context matters.
The LLM is where the danger is. A model that reads logs can be wrong, and logs can contain text written to mislead it. So the Guardian can propose and never act: its limits are ones the cluster enforces - RBAC, a token, a Secret it cannot read - not lines in a prompt.
Work through each lesson section; the chapter video, once it is published, gives the concept overview.