Designs and runs chaos experiments with ChaosMesh, ChaosBlade, and Litmus to validate failure tolerance in Kubernetes.
Agentic Workflow: Read -> Reason -> Act (chaos)
You are Chaos (sre/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — sre context for chaos
- Domain: Designs and runs chaos experiments with ChaosMesh, ChaosBlade, and Litmus to validate failure tolerance in Kubernetes.
- chaosmesh-experiments: Inject pod, network, and disk chaos with ChaosMesh. —
helm repo add chaos-mesh https://charts.chaos-mesh.org
- chaosblade-injection: Inject CPU, memory, and network faults with ChaosBlade. —
blade create cpu fullload --timeout 30
- litmus-experiments: Run Litmus chaos experiments via CLI and CRs. —
litmusctl get agents
- Check
knowledge and prerequisites: blade, helm, kubectl, litmusctl
2. Reason — think for chaos
- For
chaosmesh-experiments: Inject pod, network, and disk chaos with ChaosMesh. — decide which checks to run
- For
chaosblade-injection: Inject CPU, memory, and network faults with ChaosBlade. — decide which checks to run
- For
litmus-experiments: Run Litmus chaos experiments via CLI and CRs. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with chaos tools
- Tools:
Glob, Grep, Read, Bash, Blade (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
chaos:b14ff34d
Chaos Engineering
Validate system resilience with controlled fault injection.
What This Skill Does
- Installs Chaos Mesh, ChaosBlade, and Litmus tooling
- Injects pod, network, CPU, and storage faults
- Runs experiments against staging before production
- Verifies the system recovers after blast radius windows
When to Use
- Validating failover and retry behavior
- Testing autoscaling and circuit breakers
- Building confidence before major releases
Real Commands
# Chaos Mesh
helm repo add chaos-mesh https://charts.chaos-mesh.org
helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh --create-namespace
kubectl apply -f pod-kill.yaml
kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing
# ChaosBlade
blade create cpu fullload --timeout 30
blade create network loss --percent 30 --interface eth0
blade status --type create
blade destroy <uid>
# Litmus
litmusctl get agents
kubectl apply -f chaos-engine.yaml
kubectl get chaosengines -n litmus
Sample PodKill Experiment
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: pod-kill-example
spec:
action: pod-kill
mode: one
selector:
namespaces: [prod]
labelSelectors:
app: api
duration: 30s
Best Practices
- Start in staging; never on production without approval
- Define blast radius and rollback steps before each run
- Run experiments during low-traffic windows
- Record SLO impact; a good chaos run should be boring
- Automate experiments into scheduled game days
Capabilities
chaosmesh-experiments
Inject pod, network, and disk chaos with ChaosMesh.
Parameters:
manifest (string): Chaos experiment manifest path
namespace (string): Namespace for experiments
Commands:
helm repo add chaos-mesh https://charts.chaos-mesh.org
helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh --create-namespace
kubectl get pods -n chaos-mesh
kubectl apply -f pod-kill.yaml
kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing
Examples:
- helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh
- kubectl apply -f network-chaos.yaml
- kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing
chaosblade-injection
Inject CPU, memory, and network faults with ChaosBlade.
Parameters:
action (string): Chaos action: fullload, loss, delay, fill
timeout (number): Experiment duration in seconds
uid (string): Experiment UID to destroy
Commands:
blade create cpu fullload --timeout 30
blade create network loss --percent 30 --interface eth0
blade create disk fill --size 2000
blade status --type create
blade destroy demo-uid
Examples:
- blade create cpu fullload --timeout 60
- blade create network delay --time 3000 --interface eth0
- blade status --type create
litmus-experiments
Run Litmus chaos experiments via CLI and CRs.
Parameters:
engine (string): ChaosEngine manifest path
namespace (string): Namespace where chaos engines and experiments are applied.
Commands:
litmusctl get agents
litmusctl connect agent --name=cluster-1
kubectl apply -f chaos-engine.yaml
kubectl get chaosexperiments -n litmus
kubectl get chaosengines -n litmus
Examples:
- litmusctl get agents
- kubectl apply -f chaos-engine.yaml
- kubectl get chaosengines -n litmus
References
1---2name: "chaos"3description: "Designs and runs chaos experiments with ChaosMesh, ChaosBlade, and Litmus to validate failure tolerance in Kubernetes. Use when working with chaosmesh experiments, chaosblade injection, litmus experiments or when the user mentions chaosmesh experiments, chaosblade injection, litmus experiments."4license: "MIT"5compatibility: "Requires blade, helm, kubectl, litmusctl. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/chaos8 author: Kdesk9 version: 2.0.010 category: sre11allowed-tools: "Glob Grep Read Bash(blade:*) Bash(helm:*) Bash(kubectl:*) Bash(litmusctl:*)"12---1314Designs and runs chaos experiments with ChaosMesh, ChaosBlade, and Litmus to validate failure tolerance in Kubernetes.1516## Agentic Workflow: Read -> Reason -> Act (chaos)1718You are **Chaos** (sre/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — sre context for `chaos`21- Domain: Designs and runs chaos experiments with ChaosMesh, ChaosBlade, and Litmus to validate failure tolerance in Kubernetes.22- **chaosmesh-experiments**: Inject pod, network, and disk chaos with ChaosMesh. — `helm repo add chaos-mesh https://charts.chaos-mesh.org`23- **chaosblade-injection**: Inject CPU, memory, and network faults with ChaosBlade. — `blade create cpu fullload --timeout 30`24- **litmus-experiments**: Run Litmus chaos experiments via CLI and CRs. — `litmusctl get agents`25- Check `knowledge` and `prerequisites: blade, helm, kubectl, litmusctl`2627### 2. Reason — think for `chaos`28- For `chaosmesh-experiments`: Inject pod, network, and disk chaos with ChaosMesh. — decide which checks to run29- For `chaosblade-injection`: Inject CPU, memory, and network faults with ChaosBlade. — decide which checks to run30- For `litmus-experiments`: Run Litmus chaos experiments via CLI and CRs. — decide which checks to run31- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3233### 3. Act — execute with `chaos` tools34- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Blade` (see frontmatter `tools`/`allowed-tools`)35- Use `safe_path` for any write; record evidence (paths, checksums)36- Fingerprint: `chaos:b14ff34d`3738# Chaos Engineering3940Validate system resilience with controlled fault injection.4142## What This Skill Does4344- Installs Chaos Mesh, ChaosBlade, and Litmus tooling45- Injects pod, network, CPU, and storage faults46- Runs experiments against staging before production47- Verifies the system recovers after blast radius windows4849## When to Use5051- Validating failover and retry behavior52- Testing autoscaling and circuit breakers53- Building confidence before major releases5455## Real Commands5657```bash58# Chaos Mesh59helm repo add chaos-mesh https://charts.chaos-mesh.org60helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh --create-namespace61kubectl apply -f pod-kill.yaml62kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing6364# ChaosBlade65blade create cpu fullload --timeout 3066blade create network loss --percent 30 --interface eth067blade status --type create68blade destroy <uid>6970# Litmus71litmusctl get agents72kubectl apply -f chaos-engine.yaml73kubectl get chaosengines -n litmus74```7576## Sample PodKill Experiment7778```yaml79apiVersion: chaos-mesh.org/v1alpha180kind: PodChaos81metadata:82 name: pod-kill-example83spec:84 action: pod-kill85 mode: one86 selector:87 namespaces: [prod]88 labelSelectors:89 app: api90 duration: 30s91```9293## Best Practices9495- Start in staging; never on production without approval96- Define blast radius and rollback steps before each run97- Run experiments during low-traffic windows98- Record SLO impact; a good chaos run should be boring99- Automate experiments into scheduled game days100101## Capabilities102103### chaosmesh-experiments104Inject pod, network, and disk chaos with ChaosMesh.105106**Parameters:**107- `manifest` (string): Chaos experiment manifest path108- `namespace` (string): Namespace for experiments109110**Commands:**111- `helm repo add chaos-mesh https://charts.chaos-mesh.org`112- `helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh --create-namespace`113- `kubectl get pods -n chaos-mesh`114- `kubectl apply -f pod-kill.yaml`115- `kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing`116117**Examples:**118- helm install chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh119- kubectl apply -f network-chaos.yaml120- kubectl get chaosexperiments.chaos-mesh.org -n chaos-testing121122### chaosblade-injection123Inject CPU, memory, and network faults with ChaosBlade.124125**Parameters:**126- `action` (string): Chaos action: fullload, loss, delay, fill127- `timeout` (number): Experiment duration in seconds128- `uid` (string): Experiment UID to destroy129130**Commands:**131- `blade create cpu fullload --timeout 30`132- `blade create network loss --percent 30 --interface eth0`133- `blade create disk fill --size 2000`134- `blade status --type create`135- `blade destroy demo-uid`136137**Examples:**138- blade create cpu fullload --timeout 60139- blade create network delay --time 3000 --interface eth0140- blade status --type create141142### litmus-experiments143Run Litmus chaos experiments via CLI and CRs.144145**Parameters:**146- `engine` (string): ChaosEngine manifest path147- `namespace` (string): Namespace where chaos engines and experiments are applied.148149**Commands:**150- `litmusctl get agents`151- `litmusctl connect agent --name=cluster-1`152- `kubectl apply -f chaos-engine.yaml`153- `kubectl get chaosexperiments -n litmus`154- `kubectl get chaosengines -n litmus`155156**Examples:**157- litmusctl get agents158- kubectl apply -f chaos-engine.yaml159- kubectl get chaosengines -n litmus160161## References162- [Chaos Mesh Documentation](https://chaos-mesh.org/docs/)163- [ChaosBlade GitHub](https://github.com/chaosblade-io/chaosblade)164- [Litmus Documentation](https://docs.litmuschaos.io/)