Deploy Chaos Mesh on KubeSphere

    1. You need to create a workspace, a project, and a user account (project-regular) for this tutorial. The account needs to be a platform regular user and to be invited as the project operator with the operator role. For more information, see Create Workspaces, Projects, Users and Roles.

    Chaos experiments with Chaos Mesh

    1. Login KubeSphere as , search for chaos-mesh in the App Store, and click on the search result to enter the app.

      Chaos Mesh app

    2. In the App Information page, click Install on the upper right corner.

    3. In the App Settings page, set the application Name, Location (as your Namespace), and App Version, and then click Next on the upper right corner.

      Chaos Mesh basic information

    1. In the Resource Status page, copy the **NodePort **of .

      Chaos Mesh NodePort

    2. Access the Chaos Dashboard by entering ${NodeIP}:${NODEPORT} in your browser. Refer to Manage User Permissions to generate a Token and log into Chaos Dashboard.

    Before creating a chaos experiment, you should identify and deploy your experiment target, for example, to test how an application works under network latency. Here, we use a demo application as the target application to be tested, and the test goal is to observe the system network latency. You can deploy a demo application web-show with the following command: .

    1. Chaos Mesh web show app

    2. Log in to Chaos Dashboard to create a chaos experiment. To observe the effect of network latency on the application, we set the **Target **as “Network Attack” to simulate a network delay scenario.

      The Scope of the experiment is set to app: web-show.

      Chaos Experiment scope

    3. Start the chaos experiment by submitting it.

    Now, you should be able to visit Web Show to observe experiment results:

    Chaos Experiment result