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.
PodChaos allows you to simulate pod-level failures including killing pods, killing containers, or making pods fail temporarily.
API Version and Kind
Metadata
Standard Kubernetes object metadata.Name of the PodChaos resource.
Namespace of the PodChaos resource. Defaults to
default.Spec Fields
Defines the behavior of the pod chaos experiment.
PodChaosSpec
Specific pod chaos action to perform.Enum values:
pod-kill- Kill the entire podpod-failure- Make the pod unavailable for a durationcontainer-kill- Kill a specific container in the pod
pod-killSelector for targeting pods. See ContainerSelector in Common Types.Inherits all fields from
ContainerSelector (inline), including:- Pod selection criteria
- Mode (one/all/fixed/fixed-percent/random-max-percent)
- Value (for fixed modes)
- Container names (for container-kill action)
Duration of the chaos action. Required when action is
pod-failure.A duration string with format like "300ms", "1.5h", or "2h45m".Valid time units: ns, us (µs), ms, s, m, hGrace period in seconds before the pod is deleted (for
pod-kill action).Must be a non-negative integer. Default value of zero indicates delete immediately.Minimum: 0Name of the remote cluster where the chaos will be deployed. If not specified, chaos is applied to the local cluster.
Status Fields
Current status of the chaos experiment.
PodChaosStatus
Current global conditions. See ChaosStatus in Common Types.
Last known experiment state including desired phase and container records.
Action Details
pod-kill
Deletes the entire pod. Kubernetes will typically recreate it based on the controller (Deployment, StatefulSet, etc.).- One-shot: Yes (chaos completes after killing the pod)
- Requires duration: No
- Uses ContainerSelector: No (uses PodSelector)
pod-failure
Makes the pod fail for a specified duration. The pod will not be available during this time.- One-shot: No (chaos lasts for specified duration)
- Requires duration: Yes
- Uses ContainerSelector: No (uses PodSelector)
container-kill
Kills a specific container within the pod. The container runtime will typically restart it.- One-shot: Yes (chaos completes after killing the container)
- Requires duration: No
- Uses ContainerSelector: Yes
Complete Example
Pause Annotation
You can pause a PodChaos experiment by adding an annotation:"false" or remove the annotation to resume.
Next Steps
Common Types
Learn about selectors and shared types
NetworkChaos API
Network fault injection