Skip to main content

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.

Chaos Mesh provides a comprehensive set of APIs for creating and managing chaos experiments in Kubernetes. The APIs are divided into two main categories:

Kubernetes CRD APIs

Chaos Mesh extends Kubernetes with Custom Resource Definitions (CRDs) that allow you to define chaos experiments declaratively. Each CRD type represents a specific category of fault injection:

PodChaos

Kill pods, containers, or inject pod failures

NetworkChaos

Inject network delays, packet loss, corruption, and partitions

IOChaos

Inject I/O latency, faults, and file system errors

StressChaos

Stress CPU and memory resources

TimeChaos

Simulate time skew and clock offset

Common Types

Shared types used across all chaos experiments

gRPC API

The Chaos Daemon exposes a gRPC API that the controller uses to apply chaos actions directly on nodes:

gRPC Overview

Overview of the ChaosDaemon gRPC service

ChaosDaemon API

Complete gRPC service and message reference

API Version

All Chaos Mesh CRDs use the chaos-mesh.org/v1alpha1 API version:
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
  name: pod-kill-example
spec:
  action: pod-kill
  mode: one
  selector:
    namespaces:
      - default

Common Structure

All chaos CRDs share a common structure:
  • TypeMeta: Standard Kubernetes type metadata (apiVersion, kind)
  • ObjectMeta: Standard Kubernetes object metadata (name, namespace, labels, annotations)
  • Spec: Chaos-specific configuration including selectors and action parameters
  • Status: Current state of the chaos experiment

Selector Configuration

Most chaos types use selectors to target specific pods or containers. See Common Types for details on:
  • PodSelector - Select pods by namespace, labels, and other criteria
  • ContainerSelector - Select specific containers within pods
  • SelectorMode - Control how many targets are affected (one, all, fixed, percentage)

Next Steps

Common Types

Learn about shared types like PodSelector and Duration

Create Your First Experiment

Get started with a simple chaos experiment