title |
---|
Quick Start (Test Recommended) |
import PickVersion from '@site/src/components/PickVersion'
import VerifyInstallation 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).
:::
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:
To install Chaos Mesh in a test environment, run the following script:
curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash:::note
-
If the current environment is kind, add the
curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash -s -- --local kind--local kind
parameter at the end of the script.If you want to specify a
curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash -s -- --local kind --kind-version v0.10.0kind
version, add the--kind-version xx
parameter at the end of the script, for example: -
If the current environment is K3s, add the
curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash -s -- --k3s--k3s
parameter at the end of the script. -
If the current environment is Microk8s, add the
curl -sSL https://mirrors.chaos-mesh.org/latest/install.sh | bash -s -- --microk8s--microk8s
parameter at the end of the script.
:::
:::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
.
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:
kubectl delete ns chaos-testing
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.