Chaos Engineer
When to Use This Skill
- Designing and executing chaos experiments
- Implementing failure injection frameworks (Chaos Monkey, Litmus, etc.)
- Planning and conducting game day exercises
- Building blast radius controls and safety mechanisms
- Setting up continuous chaos testing in CI/CD
- Improving system resilience based on experiment findings
Core Workflow
- System Analysis - Map architecture, dependencies, critical paths, and failure modes
- Experiment Design - Define hypothesis, steady state, blast radius, and safety controls
- Execute Chaos - Run controlled experiments with monitoring and quick rollback
- Learn & Improve - Document findings, implement fixes, enhance monitoring
- Automate - Integrate chaos testing into CI/CD for continuous resilience
Reference Guide
Load detailed guidance based on context:
| Topic |
Reference |
Load When |
| Experiments |
references/experiment-design.md |
Designing hypothesis, blast radius, rollback |
| Infrastructure |
references/infrastructure-chaos.md |
Server, network, zone, region failures |
| Kubernetes |
references/kubernetes-chaos.md |
Pod, node, Litmus, chaos mesh experiments |
| Tools & Automation |
references/chaos-tools.md |
Chaos Monkey, Gremlin, Pumba, CI/CD integration |
| Game Days |
references/game-days.md |
Planning, executing, learning from game days |
Safety Checklist
Non-obvious constraints that must be enforced on every experiment:
- Steady state first — define and verify baseline metrics before injecting any failure
- Blast radius cap — start with the smallest possible impact scope; expand only after validation
- Automated rollback ≤ 30 seconds — abort path must be scripted and tested before the experiment begins
- Single variable — change only one failure condition at a time until behaviour is well understood
- No production without safety nets — customer-facing environments require circuit breakers, feature flags, or canary isolation
- Close the loop — every experiment must produce a written learning summary and at least one tracked improvement
Output Templates
When implementing chaos engineering, provide:
- Experiment design document (hypothesis, metrics, blast radius)
- Implementation code (failure injection scripts/manifests)
- Monitoring setup and alert configuration
- Rollback procedures and safety controls
- Learning summary and improvement recommendations
Concrete Example: Pod Failure Experiment (Litmus Chaos)
The following shows a complete experiment — from hypothesis to rollback — using Litmus Chaos on Kubernetes.
Step 1 — Define steady state and apply the experiment
# Verify baseline: p99 latency < 200ms, error rate < 0.1%
kubectl get deploy my-service -n production
kubectl top pods -n production -l app=my-service
Step 2 — Create and apply a Litmus ChaosEngine manifest
# chaos-pod-delete.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: my-service-pod-delete
namespace: production
spec:
appinfo:
appns: production
applabel: "app=my-service"
appkind: deployment
# Limit blast radius: only 1 replica at a time
engineState: active
chaosServiceAccount: litmus-admin
experiments:
- name: pod-delete
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60" # seconds
- name: CHAOS_INTERVAL
value: "20" # delete one pod every 20s
- name: FORCE
value: "false"
- name: PODS_AFFECTED_PERC
value: "33" # max 33% of replicas affected
# Apply the experiment
kubectl apply -f chaos-pod-delete.yaml
# Watch experiment status
kubectl describe chaosengine my-service-pod-delete -n production
kubectl get chaosresult my-service-pod-delete-pod-delete -n production -w
Step 3 — Monitor during the experiment
# Tail application logs for errors
kubectl logs -l app=my-service -n production --since=2m -f
# Check ChaosResult verdict when complete
kubectl get chaosresult my-service-pod-delete-pod-delete \
-n production -o jsonpath='{.status.experimentStatus.verdict}'
Step 4 — Rollback / abort if steady state is violated
# Immediately stop the experiment
kubectl patch chaosengine my-service-pod-delete \
-n production --type merge -p '{"spec":{"engineState":"stop"}}'
# Confirm all pods are healthy
kubectl rollout status deployment/my-service -n production
Concrete Example: Network Latency with toxiproxy
# Install toxiproxy CLI
brew install toxiproxy # macOS; use the binary release on Linux
# Start toxiproxy server (runs alongside your service)
toxiproxy-server &
# Create a proxy for your downstream dependency
toxiproxy-cli create -l 0.0.0.0:22222 -u downstream-db:5432 db-proxy
# Inject 300ms latency with 10% jitter — blast radius: this proxy only
toxiproxy-cli toxic add db-proxy -t latency -a latency=300 -a jitter=30
# Run your load test / observe metrics here ...
# Remove the toxic to restore normal behaviour
toxiproxy-cli toxic remove db-proxy -n latency_downstream
Concrete Example: Chaos Monkey (Spinnaker / standalone)
# chaos-monkey-config.yml — restrict to a single ASG
deployment:
enabled: true
regionIndependence: false
chaos:
enabled: true
meanTimeBetweenKillsInWorkDays: 2
minTimeBetweenKillsInWorkDays: 1
grouping: APP # kill one instance per app, not per cluster
exceptions:
- account: production
region: us-east-1
detail: "*-canary" # never kill canary instances
# Apply and trigger a manual kill for testing
chaos-monkey --app my-service --account staging --dry-run false
1---
2name: chaos-engineer
3description: Designs chaos experiments, creates failure injection frameworks, and facilitates game day exercises for distributed systems — producing runbooks, experiment manifests, rollback procedures, and post-mortem templates. Use when designing chaos experiments, implementing failure injection frameworks, or conducting game day exercises. Invoke for chaos experiments, resilience testing, blast radius control, game days, antifragile systems, fault injection, Chaos Monkey, Litmus Chaos.
4license: MIT
5metadata:
6 source: https://skillmd.com/skills/aibot88/chaos-engineer
7 author: https://github.com/Jeffallan
8 version: "1.1.0"
9 domain: devops
10 triggers: chaos engineering, resilience testing, failure injection, game day, blast radius, chaos experiment, fault injection, Chaos Monkey, Litmus Chaos, antifragile
11 role: specialist
12 scope: implementation
13 output-format: code
14 related-skills: sre-engineer, devops-engineer, kubernetes-specialist
15---
16
17# Chaos Engineer
18
19## When to Use This Skill
20
21- Designing and executing chaos experiments
22- Implementing failure injection frameworks (Chaos Monkey, Litmus, etc.)
23- Planning and conducting game day exercises
24- Building blast radius controls and safety mechanisms
25- Setting up continuous chaos testing in CI/CD
26- Improving system resilience based on experiment findings
27
28## Core Workflow
29
301. **System Analysis** - Map architecture, dependencies, critical paths, and failure modes
312. **Experiment Design** - Define hypothesis, steady state, blast radius, and safety controls
323. **Execute Chaos** - Run controlled experiments with monitoring and quick rollback
334. **Learn & Improve** - Document findings, implement fixes, enhance monitoring
345. **Automate** - Integrate chaos testing into CI/CD for continuous resilience
35
36## Reference Guide
37
38Load detailed guidance based on context:
39
40| Topic | Reference | Load When |
41|-------|-----------|-----------|
42| Experiments | `references/experiment-design.md` | Designing hypothesis, blast radius, rollback |
43| Infrastructure | `references/infrastructure-chaos.md` | Server, network, zone, region failures |
44| Kubernetes | `references/kubernetes-chaos.md` | Pod, node, Litmus, chaos mesh experiments |
45| Tools & Automation | `references/chaos-tools.md` | Chaos Monkey, Gremlin, Pumba, CI/CD integration |
46| Game Days | `references/game-days.md` | Planning, executing, learning from game days |
47
48## Safety Checklist
49
50Non-obvious constraints that must be enforced on every experiment:
51
52- **Steady state first** — define and verify baseline metrics before injecting any failure
53- **Blast radius cap** — start with the smallest possible impact scope; expand only after validation
54- **Automated rollback ≤ 30 seconds** — abort path must be scripted and tested before the experiment begins
55- **Single variable** — change only one failure condition at a time until behaviour is well understood
56- **No production without safety nets** — customer-facing environments require circuit breakers, feature flags, or canary isolation
57- **Close the loop** — every experiment must produce a written learning summary and at least one tracked improvement
58
59## Output Templates
60
61When implementing chaos engineering, provide:
621. Experiment design document (hypothesis, metrics, blast radius)
632. Implementation code (failure injection scripts/manifests)
643. Monitoring setup and alert configuration
654. Rollback procedures and safety controls
665. Learning summary and improvement recommendations
67
68## Concrete Example: Pod Failure Experiment (Litmus Chaos)
69
70The following shows a complete experiment — from hypothesis to rollback — using Litmus Chaos on Kubernetes.
71
72### Step 1 — Define steady state and apply the experiment
73
74```bash
75# Verify baseline: p99 latency < 200ms, error rate < 0.1%
76kubectl get deploy my-service -n production
77kubectl top pods -n production -l app=my-service
78```
79
80### Step 2 — Create and apply a Litmus ChaosEngine manifest
81
82```yaml
83# chaos-pod-delete.yaml
84apiVersion: litmuschaos.io/v1alpha1
85kind: ChaosEngine
86metadata:
87 name: my-service-pod-delete
88 namespace: production
89spec:
90 appinfo:
91 appns: production
92 applabel: "app=my-service"
93 appkind: deployment
94 # Limit blast radius: only 1 replica at a time
95 engineState: active
96 chaosServiceAccount: litmus-admin
97 experiments:
98 - name: pod-delete
99 spec:
100 components:
101 env:
102 - name: TOTAL_CHAOS_DURATION
103 value: "60" # seconds
104 - name: CHAOS_INTERVAL
105 value: "20" # delete one pod every 20s
106 - name: FORCE
107 value: "false"
108 - name: PODS_AFFECTED_PERC
109 value: "33" # max 33% of replicas affected
110```
111
112```bash
113# Apply the experiment
114kubectl apply -f chaos-pod-delete.yaml
115
116# Watch experiment status
117kubectl describe chaosengine my-service-pod-delete -n production
118kubectl get chaosresult my-service-pod-delete-pod-delete -n production -w
119```
120
121### Step 3 — Monitor during the experiment
122
123```bash
124# Tail application logs for errors
125kubectl logs -l app=my-service -n production --since=2m -f
126
127# Check ChaosResult verdict when complete
128kubectl get chaosresult my-service-pod-delete-pod-delete \
129 -n production -o jsonpath='{.status.experimentStatus.verdict}'
130```
131
132### Step 4 — Rollback / abort if steady state is violated
133
134```bash
135# Immediately stop the experiment
136kubectl patch chaosengine my-service-pod-delete \
137 -n production --type merge -p '{"spec":{"engineState":"stop"}}'
138
139# Confirm all pods are healthy
140kubectl rollout status deployment/my-service -n production
141```
142
143## Concrete Example: Network Latency with toxiproxy
144
145```bash
146# Install toxiproxy CLI
147brew install toxiproxy # macOS; use the binary release on Linux
148
149# Start toxiproxy server (runs alongside your service)
150toxiproxy-server &
151
152# Create a proxy for your downstream dependency
153toxiproxy-cli create -l 0.0.0.0:22222 -u downstream-db:5432 db-proxy
154
155# Inject 300ms latency with 10% jitter — blast radius: this proxy only
156toxiproxy-cli toxic add db-proxy -t latency -a latency=300 -a jitter=30
157
158# Run your load test / observe metrics here ...
159
160# Remove the toxic to restore normal behaviour
161toxiproxy-cli toxic remove db-proxy -n latency_downstream
162```
163
164## Concrete Example: Chaos Monkey (Spinnaker / standalone)
165
166```bash
167# chaos-monkey-config.yml — restrict to a single ASG
168deployment:
169 enabled: true
170 regionIndependence: false
171chaos:
172 enabled: true
173 meanTimeBetweenKillsInWorkDays: 2
174 minTimeBetweenKillsInWorkDays: 1
175 grouping: APP # kill one instance per app, not per cluster
176 exceptions:
177 - account: production
178 region: us-east-1
179 detail: "*-canary" # never kill canary instances
180
181# Apply and trigger a manual kill for testing
182chaos-monkey --app my-service --account staging --dry-run false
183```