跳到主要内容
版本:Next

Install Chaos Mesh using KubeStellar Console

This document describes how to install Chaos Mesh using the KubeStellar Console — a standalone Kubernetes dashboard that provides a guided install mission for Chaos Mesh. The mission is an alternative to the manual Helm install flow: it walks through prerequisites, runs the Helm commands against your configured kubeconfig context, validates the install after each step, and surfaces logs and events when something goes wrong. Everything the console does maps back to the same upstream chaos-mesh/chaos-mesh Helm chart — there is no fork or shim.

This approach was added in response to a maintainer request in chaos-mesh/chaos-mesh#4858.

备注

KubeStellar Console is an independent project. It is unrelated to legacy kubestellar/kubestellar, kubeflex, or OCM and shares no code with them. Source: github.com/kubestellar/console.

Prerequisites

Before starting, make sure that:

  • You have a running Kubernetes cluster (v1.16+ recommended for current Chaos Mesh releases).
  • Your kubeconfig is configured to point at the cluster where you want to install Chaos Mesh.
  • You have Helm 3.8+ and kubectl installed locally — the console generates standard Helm commands and, depending on how you run it, can execute them on your behalf or let you copy-paste them.

To verify Helm is installed, run:

helm version

Install the KubeStellar Console

The console runs locally and connects to your current kubeconfig context. Start it with the one-line installer:

curl -sSL https://raw.githubusercontent.com/kubestellar/console/main/start.sh | bash

If you want GitHub OAuth (for multi-user setups), export credentials first:

export GITHUB_CLIENT_ID=<your-client-id>
export GITHUB_CLIENT_SECRET=<your-client-secret>
curl -sSL https://raw.githubusercontent.com/kubestellar/console/main/start.sh | bash

To deploy the console into a cluster instead of running it locally:

curl -sSL https://raw.githubusercontent.com/kubestellar/console/main/deploy.sh | bash

When the console is running, open its local URL in a browser and sign in.

提示

You can also browse the Chaos Mesh install mission as read-only documentation without installing the console: console.kubestellar.io/missions/install-chaos-mesh.

Run the Chaos Mesh install mission

In the console, open AI Mission Explorer and search for install-chaos-mesh, or navigate directly to the mission URL. The mission is structured as a sequence of steps:

Step 1: Pre-flight

The mission checks prerequisites against your connected cluster — Kubernetes version, Helm availability, kubeconfig context, namespace existence, and required RBAC permissions.

Step 2: Add the Chaos Mesh Helm repository

helm repo add chaos-mesh https://charts.chaos-mesh.org

Step 3: Create the chaos-mesh namespace

kubectl create ns chaos-mesh

Step 4: Install Chaos Mesh

The mission runs the install with runtime-specific flags. Pick the runtime that matches your cluster and the mission shows the exact command. For a Docker-runtime cluster, the default command is:

helm install chaos-mesh chaos-mesh/chaos-mesh -n=chaos-mesh --version latest

For containerd, K3s, MicroK8s, or CRI-O, the mission sets the appropriate chaosDaemon.runtime and chaosDaemon.socketPath values. See Install Chaos Mesh using Helm for the full list of per-runtime commands — the mission uses the same values.

Step 5: Validate

After install, the mission queries your cluster to confirm:

  • All Chaos Mesh pods in the chaos-mesh namespace are Ready.
  • The Chaos Mesh CRDs are registered.
  • The chaos-dashboard service is reachable.

If a check fails, the mission pulls pod logs and recent events from the namespace and points at likely causes (wrong runtime socket path, CRDs not applied on old Kubernetes, pod security rejection, etc.).

Step 6: Rollback

Each step has a corresponding rollback. The full uninstall is:

helm uninstall chaos-mesh -n chaos-mesh

Verify the installation

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

kubectl get pods -n chaos-mesh -l app.kubernetes.io/instance=chaos-mesh

The expected output is as follows:

NAME                                       READY   STATUS    RESTARTS   AGE
chaos-controller-manager-7b8c86cc9-44dzf 1/1 Running 0 17m
chaos-controller-manager-7b8c86cc9-mxw99 1/1 Running 0 17m
chaos-controller-manager-7b8c86cc9-xmc5v 1/1 Running 0 17m
chaos-daemon-sg2k2 1/1 Running 0 17m
chaos-dashboard-b9dbc6b68-hln25 1/1 Running 0 17m
chaos-dns-server-546675d89d-qkjqq 1/1 Running 0 17m

If your actual output is similar to the expected output, then Chaos Mesh has been successfully installed.

备注

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-7b8c86cc9-44dzf
备注

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

NAME                                        READY   STATUS    RESTARTS   AGE
chaos-controller-manager-676d8567c7-ndr5j 1/1 Running 0 24m
chaos-daemon-6l55b 1/1 Running 0 24m
chaos-dashboard-b9dbc6b68-hln25 1/1 Running 0 44m
chaos-dns-server-546675d89d-qkjqq 1/1 Running 0 44m

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.

Upgrade Chaos Mesh

The mission's upgrade flow wraps the same Helm command as the manual install:

helm upgrade chaos-mesh chaos-mesh/chaos-mesh -n=chaos-mesh

To pin a version, the mission adds --version x.y.z. For the CRD upgrade caveat and runtime-specific flags, see Upgrade Chaos Mesh in the Helm install doc.

Uninstall Chaos Mesh

helm uninstall chaos-mesh -n chaos-mesh

Followed by namespace cleanup if you no longer need it:

kubectl delete ns chaos-mesh

Feedback

The Chaos Mesh mission definition is open source. Issues and improvements are welcome at kubestellar/console-kb/blob/master/fixes/cncf-install/install-chaos-mesh.json.