import PickVersion from ‘@site/src/components/PickVersion’

import VerifyInstallationAndRun from ‘./common/verify-installation.md’ import QuickRun from ‘./common/quick-run.md’

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

:::note

In this document, the Chaos Mesh installation is a script installation 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 details, refer to Installation using Helm (recommended for production).

:::

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:

curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash

:::note

:::

:::tip

To speed up the image pulling process, users in the Chinese mainland can add the --docker-mirror parameter at the end of the script. After adding this parameter, the install.sh script pulls images from dockerhub.azk8s.cn and gcr.azk8s.cn.

:::

After running this script, Chaos Mesh automatically installs the CustomResourceDefining (CRD) that matches the version, all required components, and related Service Account configurations.

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

Verify the installation

Run Chaos experiments

Uninstall Chaos Mesh

To uninstall Chaos Mesh, execute the following command:

curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash -s — —template | kubectl delete -f -

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

  1. kubectl delete ns chaos-testing

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.