All faults / Compute & platform
CPU stress: chaos experiment
Saturates the CPU on the nodes hosting the target pods. Without limits the noisy neighbour takes everything; with an HPA, watch how long it takes to react.
What it tests
CPU limits, HPA reaction time, request latency under contention
CPU limits, HPA reaction time, request latency under contention
The hypothesis holds when
CPU limits contain the noisy neighbour and the autoscaler adds capacity before latency crosses the threshold.
CPU limits contain the noisy neighbour and the autoscaler adds capacity before latency crosses the threshold.
It breaks when
No limits and no autoscaler: latency climbs for everything on the node and liveness probes start restarting healthy pods.
No limits and no autoscaler: latency climbs for everything on the node and liveness probes start restarting healthy pods.
Reference
The same fault in other tools
- Chaos Mesh: StressChaos
- LitmusChaos: pod-cpu-hog
- ChaosBlade: blade create k8s pod-cpu fullload
- Chaos Monkey: no equivalent
Generated manifests and commands are on the Export tab. Confirm flags for your version before running them.
Run this experiment in your browser
Runs in the simulator and against a live cluster.