Installing Chaos Mesh
Chaos Mesh
Warning
Test failure scenarios on a test cluster first to make sure they do not affect the performance of the production cluster.
Getting started
-
Create a node group with at least 14 GB of RAM.
-
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
Installation using Yandex Cloud Marketplace
-
Go to the folder page
and select Managed Service for Kubernetes. -
Click the name of the Managed Service for Kubernetes cluster you need and select the
Marketplace tab. -
Under Application available for installation, select Chaos Mesh and click Go to install.
-
Configure the application:
- Namespace: Select or create a namespace for Chaos Mesh.
- Application name: Specify the app name.
-
Click Install.
-
Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.8.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with Chaos Mesh, run this command:helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/chaos-mesh/chaos-mesh \ --version 2.6.1-1b \ --untar && \ helm install \ --namespace <namespace> \ --create-namespace \ chaos-mesh ./chaos-mesh/
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to the command to enable Open Container Initiative (OCI) support in the Helm client.
You can check the current version of the Helm chart on the application page.
Web interface and authorization in Chaos Mesh
Once you install Chaos Mesh, you can get started with it in its web interface and go through the authorization process. To do this:
-
Forward the
http://localhost:8080
URL to the Chaos Mesh web interface:kubectl port-forward service/chaos-dashboard 8080:2333 \ --namespace <namespace>
In the command, specify the namespace that you selected when installing the application.
Result:
Forwarding from 127.0.0.1:8080 -> 2333 Forwarding from [::1]:8080 -> 2333
-
In your browser, open http://localhost:8080. You will see the authorization window of the Chaos Mesh web interface.
-
To log in, you need a Kubernetes account and token. Get them using one of the two methods:
-
Create an account and token
for Chaos Mesh. For the account, you can set up access rights in a specific namespace. -
For Kubernetes clusters 1.24 or higher, use a Kubernetes service account and create a token for it:
-
View a list of available Kubernetes service accounts:
kubectl get serviceAccounts
Each account has its own set of access rights.
-
Select the account you need and create a token:
kubectl create token <account_name>
-
-