Skip to main content
Version: 2.7.0

Quick Start

This document describes how to start Chaos Mesh quickly in a test or local environment.

caution

In this document, Chaos Mesh is installed via a script for quick trial only.

If you need to install Chaos Mesh in the production environment or other strict non-test scenarios, it is recommended to use Helm. For more details, refer to Installation using Helm.

Environment preparation

Please ensure that the Kubernetes cluster is deployed in the environment before the trial. If the Kubernetes cluster has not been deployed, you can refer to the links below to complete the deployment:

Quick installation

To install Chaos Mesh in a test environment, run the following script:

After running, Chaos Mesh will automatically install the appropriate version of CustomResourceDefinitions and the required components.

For more installation details, refer to the source code of the install.sh.

Verify the installation

To check the running status of Chaos Mesh, execute the following command:

kubectl get po -n chaos-mesh

The expected output is as follows:

NAME                                        READY   STATUS    RESTARTS   AGE
chaos-controller-manager-69fd5c46c8-xlqpc 3/3 Running 0 2d5h
chaos-daemon-jb8xh 1/1 Running 0 2d5h
chaos-dashboard-98c4c5f97-tx5ds 1/1 Running 0 2d5h

If your actual output is similar to the expected output with NAME, READY, STATUS, RESTARTS, and AGE, it means that Helm is installed successfully.

note

If the STATUS of your actual output is not Running, then execute the following command to check the Pod details, and troubleshoot issues according to the error information.

# Take the chaos-controller as an example
kubectl describe po -n chaos-mesh chaos-controller-manager-69fd5c46c8-xlqpc
note

If leader-election feature is turned off manually, chaos-controller-manager should only have 1 replication.

NAME                                        READY   STATUS    RESTARTS   AGE
chaos-controller-manager-69fd5c46c8-xlqpc 1/1 Running 0 2d5h
chaos-daemon-jb8xh 1/1 Running 0 2d5h
chaos-dashboard-98c4c5f97-tx5ds 1/1 Running 0 2d5h

Run Chaos experiments

After verifying that the installation is complete, you can run a Chaos experiment to experience the features of Chaos Mesh.

For the method to run the experiment, it is recommended to refer to Run a Chaos experiment. After successfully creating the experiment, you can observe the running status of the experiment on the Chaos Dashboard.

Uninstall Chaos Mesh

To uninstall Chaos Mesh, execute the following command:

You can also delete the chaos-mesh namespace to directly uninstall Chaos Mesh:

kubectl delete ns chaos-mesh

FAQ

Why the local directory appears in the root directory after installation?

If you don't install kind in the existing environment, and you use the --local kind parameter when executing the installation command, the install.sh script will automatically install the kind in the local directory under the root directory.