Skip to main content
All of the catalog
Scenario

Chaos Engineering

Run the chaos engineering loop against go-api with Chaos Mesh: establish a steady state under load, form a hypothesis, inject a failure (pod kill, network delay, CPU and memory stress) and measure the blast radius on a Grafana dashboard. go-api ships as a single replica behind a PodDisruptionBudget, so it starts out with disruptionsAllowed=0: a node drain would block forever while a pod kill is still a full outage. Your job is to find that with an experiment and fix it, then prove the same experiment no longer hurts.

ReliabilityVerifiedk3dkind
Definition on GitHub

What you'll do

  • Establish a steady state: put continuous load on go-api with 'labctl traffic' and read baseline RPS, error rate and p99 off the chaos dashboard
  • Run a pod-kill experiment against the single-replica go-api and measure the blast radius - the requests that fail before Kubernetes restarts the pod
  • Read the control that is missing: 'kubectl -n go-api get pdb' reports disruptionsAllowed 0 / InsufficientPods, so the PDB blocks every drain instead of protecting anything
  • Harden the workload with 'kubectl -n go-api scale deploy/go-api --replicas=3' until the PDB reports disruptionsAllowed >= 1
  • Re-run the same pod-kill experiment against the hardened service and prove the outage is gone while the restart still shows on the dashboard
  • Explore the other failure modes (CPU stress, memory stress, network delay and partition) and find the signal that reveals each one, including the two the dashboard cannot show you

Prerequisites

--deploy-prereqs installs these into the lab for you. They are listed so you know what the scenario depends on.

ingressmonitoring/metricsmonitoring/grafanachaos/chaos-meshgo-api

Get updates

New scenarios and faults, release notes, and news about hosted labs if and when there is some. A few emails a month at most.

We'll email you about new releases, new lab content and paid offerings such as hosted labs, courses and workshops. Unsubscribe any time.