Practices chaos engineering with LitmusChaos, Chaos Monkey, and fault injection to verify resilience of distributed systems.
Agentic Workflow: Read -> Reason -> Act (chaos-engineering-chaos-engineering)
You are chaos-engineering-chaos-engineering (devops) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — devops context for chaos-engineering-chaos-engineering
- Domain: Practices chaos engineering with LitmusChaos, Chaos Monkey, and fault injection to verify resilience of distributed systems.
- litmus-chaos: Run chaos experiments on Kubernetes. —
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.ya
- fault-injection: Inject network and resource faults. —
kubectl run net-test --image=alpine -- sleep 3600
- Check
knowledge and prerequisites: docker, kubernetes, litmus, chaos-mesh
2. Reason — think for chaos-engineering-chaos-engineering
- For
litmus-chaos: Run chaos experiments on Kubernetes. — decide which checks to run
- For
fault-injection: Inject network and resource faults. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with chaos-engineering-chaos-engineering tools
- Tools:
Glob, Grep, Read, Bash, Litmusctl (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
chaos-engineering-chaos-engineering:3b72004e
Chaos Engineering
Verify resilience by breaking things on purpose.
When to Use
- Proving retries, timeouts, and failover actually work
- Testing dependency failures (DB, cache, third-party API)
- Validating chaos under realistic traffic, not just in tests
- Building confidence for incident response
Principles
- Steady state: define normal behavior first (latency, error rate)
- Hypothesis: the system tolerates fault X without user impact
- Blast radius: start small, expand gradually
- Roll back fast: abort experiment on threshold breach
Commands
# Install Litmus
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.yaml
# Inspect available experiments
kubectl get chaosexperiments
# Track results
kubectl get chaosresult
kubectl get chaosengine -n litmus
# Manual faults
kubectl exec -it app-pod -- kill -STOP 1
kubectl exec -it app-pod -- tc qdisc add dev eth0 root netem loss 20%
kubectl delete pod myapp --grace-period=0 --force
kubectl drain node-a --ignore-daemonsets
Best Practices
- Run chaos in staging first, then carefully in prod
- Automate experiments into a pipeline with verdicts
- Monitor steady state throughout; abort on threshold breach
- Start with safe faults: network delay, then packet loss, then kill
- Pair each experiment with an alert so downtime is visible
- Clean up experiments; never leave faults running
Capabilities
litmus-chaos
Run chaos experiments on Kubernetes.
Parameters:
experiment (string): Chaos experiment name
target (string): Target workload
Commands:
kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.yaml
kubectl get chaosexperiments
litmusctl connect --agent-type cluster
kubectl apply -f experiment.yaml
kubectl get chaosresult
Examples:
- kubectl get chaosengine -n litmus
- kubectl get chaosresult -n litmus -o jsonpath="{.items[*].status.experimentStatus.verdict}"
- litmusctl create agent --agent-type cluster
fault-injection
Inject network and resource faults.
Parameters:
pod (string): Target pod
fault (string): delay, loss, kill, scale
Commands:
kubectl run net-test --image=alpine -- sleep 3600
kubectl exec -it pod-test -- tc qdisc add dev eth0 root netem loss 20%
kubectl exec -it pod-test -- kill -STOP 1
kubectl delete pod myapp --grace-period=0 --force
Examples:
- kubectl exec -it app-pod -- tc qdisc add dev eth0 root netem delay 500ms
- kubectl scale deploy myapp --replicas=0
- kubectl drain node-a --ignore-daemonsets
References
1---2name: "chaos-engineering-chaos-engineering"3description: "Practices chaos engineering with LitmusChaos, Chaos Monkey, and fault injection to verify resilience of distributed systems. Use when working with litmus chaos, fault injection or when the user mentions litmus chaos, fault injection."4license: "MIT"5compatibility: "Requires docker, kubernetes, litmus, chaos-mesh, gremlin. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/chaos-engineering-chaos-engineering8 author: Kdesk9 version: 2.0.010 category: devops11allowed-tools: "Glob Grep Read Bash(kubectl:*) Bash(litmusctl:*)"12---1314Practices chaos engineering with LitmusChaos, Chaos Monkey, and fault injection to verify resilience of distributed systems.1516## Agentic Workflow: Read -> Reason -> Act (chaos-engineering-chaos-engineering)1718You are **chaos-engineering-chaos-engineering** (devops) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — devops context for `chaos-engineering-chaos-engineering`21- Domain: Practices chaos engineering with LitmusChaos, Chaos Monkey, and fault injection to verify resilience of distributed systems.22- **litmus-chaos**: Run chaos experiments on Kubernetes. — `kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.ya`23- **fault-injection**: Inject network and resource faults. — `kubectl run net-test --image=alpine -- sleep 3600`24- Check `knowledge` and `prerequisites: docker, kubernetes, litmus, chaos-mesh`2526### 2. Reason — think for `chaos-engineering-chaos-engineering`27- For `litmus-chaos`: Run chaos experiments on Kubernetes. — decide which checks to run28- For `fault-injection`: Inject network and resource faults. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `chaos-engineering-chaos-engineering` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Litmusctl` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `chaos-engineering-chaos-engineering:3b72004e`3536# Chaos Engineering3738Verify resilience by breaking things on purpose.3940## When to Use4142- Proving retries, timeouts, and failover actually work43- Testing dependency failures (DB, cache, third-party API)44- Validating chaos under realistic traffic, not just in tests45- Building confidence for incident response4647## Principles4849- Steady state: define normal behavior first (latency, error rate)50- Hypothesis: the system tolerates fault X without user impact51- Blast radius: start small, expand gradually52- Roll back fast: abort experiment on threshold breach5354## Commands5556```bash57# Install Litmus58kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.yaml5960# Inspect available experiments61kubectl get chaosexperiments6263# Track results64kubectl get chaosresult65kubectl get chaosengine -n litmus6667# Manual faults68kubectl exec -it app-pod -- kill -STOP 169kubectl exec -it app-pod -- tc qdisc add dev eth0 root netem loss 20%70kubectl delete pod myapp --grace-period=0 --force71kubectl drain node-a --ignore-daemonsets72```7374## Best Practices7576- Run chaos in staging first, then carefully in prod77- Automate experiments into a pipeline with verdicts78- Monitor steady state throughout; abort on threshold breach79- Start with safe faults: network delay, then packet loss, then kill80- Pair each experiment with an alert so downtime is visible81- Clean up experiments; never leave faults running8283## Capabilities8485### litmus-chaos86Run chaos experiments on Kubernetes.8788**Parameters:**89- `experiment` (string): Chaos experiment name90- `target` (string): Target workload9192**Commands:**93- `kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.14.0.yaml`94- `kubectl get chaosexperiments`95- `litmusctl connect --agent-type cluster`96- `kubectl apply -f experiment.yaml`97- `kubectl get chaosresult`9899**Examples:**100- kubectl get chaosengine -n litmus101- kubectl get chaosresult -n litmus -o jsonpath="{.items[*].status.experimentStatus.verdict}"102- litmusctl create agent --agent-type cluster103104### fault-injection105Inject network and resource faults.106107**Parameters:**108- `pod` (string): Target pod109- `fault` (string): delay, loss, kill, scale110111**Commands:**112- `kubectl run net-test --image=alpine -- sleep 3600`113- `kubectl exec -it pod-test -- tc qdisc add dev eth0 root netem loss 20%`114- `kubectl exec -it pod-test -- kill -STOP 1`115- `kubectl delete pod myapp --grace-period=0 --force`116117**Examples:**118- kubectl exec -it app-pod -- tc qdisc add dev eth0 root netem delay 500ms119- kubectl scale deploy myapp --replicas=0120- kubectl drain node-a --ignore-daemonsets121122## References123- [LitmusChaos Docs](https://docs.litmuschaos.io)124- [Principles of Chaos Engineering](https://principlesofchaos.org)