CICD-346 · Chaos Mesh experiments
Encyclopedia · Distributed systems and reliability testing · All snippets
Previous · CICD-345 · Next · CICD-347
1. Where it fits
- Placement lab/pod-chaos.yaml.
- Prerequisites disposable integration environment, synthetic traffic and controlled test faults.
- Platforms local-lab.
2. Copy the snippet
yaml
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata: {name: kill-one-web-lab, namespace: chaos-lab}
spec:
action: pod-kill
mode: one
selector:
namespaces: [chaos-lab]
labelSelectors: {app: web}
duration: 15s3. How it works
Chaos Mesh selects one matching Pod in an isolated namespace. Observations during the disruption reveal whether the healthy replicas maintain service.
4. Verify the result
Use a dedicated lab cluster and installed Chaos Mesh. Observe steady-state probes and disable the experiment if the error budget breaches.
Watch for. Confine the test and all synthetic traffic to an authorized, disposable lab. Check cleanup even after a failing assertion.
Validation syntax-validated (YAML parse). Status definitions.