Skip to main content

๐Ÿงญ Four ways to alert on Kubernetes failures

A good failure alert answers four things: what broke, why, who changed it, and what to do. Each approach below answers some of them well. If a term is new, the glossary explains it.

๐Ÿ“จ 1. Raw event forwardersโ€‹

They send Kubernetes events to a channel as they happen.

  • Good for: raw visibility, and setup in minutes.
  • Question answered: "What did Kubernetes just say?"

๐Ÿ“ˆ 2. Metric alert rulesโ€‹

Thresholds on CPU, memory, restarts and error rates.

  • Good for: known failure modes and service level objectives.
  • Question answered: "Did a number cross a line?"

๐Ÿ’ฌ 3. AI assistantsโ€‹

You ask a model questions about your cluster, in your own words.

  • Good for: exploring and explaining on demand.
  • Question answered: "Help me understand this."

๐Ÿ” 4. Evidence-based root causeโ€‹

This approach follows events, changes and dependencies from the symptom to the cause, and shows the proof. kwatch works this way: it runs inside your cluster, traces a failure upstream and sends one message.

  • Good for: one clear message per failure, with the cause and the next step.
  • Question answered: "What started it, and what do I do?"

A kwatch alert for a container that keeps restarting reads like this:

checkout-api keeps restarting because it runs out of memory.
Its memory limit is lower than what it uses at startup.
Proof: the limit was changed by the deploy pipeline 4 minutes ago; every restart ends OOMKilled.
Next step: kubectl set resources deployment/checkout-api -n prod --limits=memory=512Mi

The evidence trail is the proof line: the change, the time and the repeated result. See how accuracy is measured.

๐Ÿ“Š Comparisonโ€‹

ApproachWhat you getSetup effortBest fit
Raw event forwardersEvery event, as it happensMinutesTeams that want full visibility
Metric alert rulesAlerts when a number crosses a lineRules per serviceKnown failure modes and SLOs
AI assistantsAnswers on demandConnect to your clusterExploring and learning
Evidence-based root causeOne message with the cause, the proof and the next stepOne installer runFinding what started a failure

๐Ÿค Combining themโ€‹

They work well together. Keep metric rules for your SLOs, and let kwatch explain the cause behind the page.

๐Ÿš€ How to try kwatchโ€‹

kwatch is source available under ELv2 and installs with the kwatch.sh installer:

bash <(curl -fsSL https://kwatch.dev/kwatch.sh)

Read what the installer does, see the accuracy figures, or follow the installation guide. Already use Helm? The installation guide covers the chart.