Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chaos-mesh/chaos-mesh/llms.txt
Use this file to discover all available pages before exploring further.
StressChaos
StressChaos is the Schema for generating CPU and memory stress over a collection of pods.Metadata
chaos-mesh.org/v1alpha1StressChaosStandard Kubernetes metadata. Refer to the Kubernetes API documentation for fields like
name, namespace, labels, and annotations.Spec
Defines the behavior of a stress chaos experiment.
StressChaosSpec
Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified.
StressngStressors defines stressors in
stress-ng dialect (see man stress-ng). This is an experimental feature and more powerful than Stressors.Note: Not all stressors are well tested. This may be retired in later releases. You should always use Stressors to define the stressors and use this only when you want stressors unsupported by Stressors.When both StressngStressors and Stressors are defined, StressngStressors wins.Duration represents the duration of the chaos action. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as
"300ms", "-1.5h" or "2h45m".Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".RemoteCluster represents the remote cluster where the chaos will be deployed.
Container Selector Fields
StressChaosSpec embedsContainerSelector which includes:
Selector is used to select pods that are used to inject chaos action.
Mode defines the mode to run chaos action.Supported values:
one- Select one random podall- Select all podsfixed- Select a fixed number of podsfixed-percent- Select a fixed percentage of podsrandom-max-percent- Select a random percentage up to max
Value is required when mode is
fixed, fixed-percent, or random-max-percent.ContainerNames indicates list of the name of affected container. If not set, the first container will be injected.
Stressors
Stressors defines the stressors to apply.MemoryStressor stresses virtual memory out.
CPUStressor stresses CPU out.
MemoryStressor
Workers specifies N workers to apply the stressor.Maximum: 8192 (stress-ng limitation)
Size specifies N bytes consumed per vm worker, default is the total available memory.One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB.Examples:
"256MB", "1GB", "50%"OOMScoreAdj sets the oom_score_adj of the stress process. See
man 5 proc to know more about this option.Range: -1000 to 1000Options to extend stress-ng with additional flags.
CPUStressor
Workers specifies N workers to apply the stressor.Maximum: 8192 (stress-ng limitation)
Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.Range: 0 to 100
Options to extend stress-ng with additional flags.
StressChaosStatus
Conditions represents the current global condition of the chaos.
Experiment records the last experiment state.
Instances always specifies stressing instances.
StressInstance
UID is the stress-ng identifier.
MemoryUID is the memStress identifier.
StartTime specifies when the stress-ng starts.
MemoryStartTime specifies when the memStress starts.