Introduction to Chaos Mesh

Chaos Mesh is an open source cloud-native chaos engineering platform that provides a wealth of fault simulation types and has a powerful fault scenario orchestration capability, which is convenient for users to simulate various abnormalities that may occur in the real world in development and testing and in the production environment. Help users discover potential problems in the system.

Introduction to KubeSphere

KubeSphere is an application-centric multi-tenant container platform built on Kubernetes. It is fully open source, supports multi-cloud and multi-cluster management, provides full-stack IT automated operation and maintenance capabilities, and simplifies the DevOps workflow of enterprises.

KubeSphere 3.2.0 adds the "Dynamic Loading App Store" . Partners can integrate the Helm Chart of the application into the KubeSphere App Store to dynamically load the application without being restricted by the KubeSphere version. Chaos Mesh has integrated Helm Chart into KubeSphere 3.2.0 in this way, which is convenient for users to deploy applications to Kubernetes with one click. This tutorial demonstrates how to deploy Chaos Mesh on KubeSphere for chaos experiments.

Ready to work

  • Deploy KubeSphere App Store
  • You need to create a corporate space, a project, and two accounts (ws-admin and project-regular) for this tutorial. The account ws-admin must be assigned the workspace-admin role in the enterprise space, and the project-regular account must be invited to the project and assigned the operator role. If you haven't created it yet, please refer to create enterprise spaces, projects, users and roles .
    Start chaos experiment

    Step 1: Deploy Chaos Mesh

  1. Use project-regular identity landing, search application market chaos-mesh , click on the search results into the application.

  1. After entering the application information page, click the "Install" button in the upper right corner.

  1. Enter the application settings page, you can set the application name (a unique name will be randomly selected by default) and select the installation location (corresponding Namespace) and version, and then click "Next" in the upper right corner.

  1. values.yaml file according to actual needs, or you can directly click "Install" to use the default configuration.

  1. Wait for Chaos Mesh to start operating normally.

  1. Visit "Application Load", you can see the three deployments created by Chaos Mesh.

Step 2: Visit Chaos Mesh

  1. Go to the service page under application load and copy the NodePort of chaos-dashboard.

  1. You can access Chaos Dashboard ${NodeIP}:${NODEPORT} And refer to the management user authority document , generate Token, and log in to Chaos Dashboard.

Step 3: create a chaos experiment

  1. Before starting the chaos experiment, you need to determine and deploy your experiment goals, for example, to test the working status of an application under network delays. This article uses a demo application web-show as the target to be tested to observe the system network delay. You can use the following command to deploy a Demo application web-show :
curl -sSL https://mirrors.chaos-mesh.org/latest/web-show/deploy.sh | bash
Note: You can directly observe the network delay from itself to Pod under the kube-system namespace on the web-show application page.
  1. Access the web-show application. From your web browser, enter ${NodeIP}:8081.

  1. Log in to Chaos Dashboard to create a chaos experiment. In order to better observe the effect of the chaos experiment, only an independent chaos experiment is created here. The type of chaos experiment is "network attack" to simulate the network delay scenario:

The scope of the experiment is set to the web-show application:

  1. After submitting the chaos experiment, check the experiment status:

  1. Visit the web-show application to observe the experimental results:

For more details, please refer to Chaos Mesh User Document .

Summarize

The KubeSphere container platform is very friendly to the deployment of cloud native applications. The KubeSphere application mall provided by it provides a real one-click deployment. Users can easily deploy Chaos Mesh on KubeSphere with one click, helping users quickly start their own chaos experiments.

Chaos Mesh has grown a lot in 2021. In order to learn more about users’ experience in the practice of chaos engineering, in order to continue to improve and enhance the support for users, the community launched a Chaos Mesh user survey, click [Read the original text] participate in the survey, thank you!

Reference link:

Chaos Mesh GitHub: https://github.com/chaos-mesh/chaos-mesh

KubeSphere GitHub: https://github.com/kubesphere/kubesphere

KubeSphere App Store: https://kubesphere.io/zh/docs/pluggable-components/app-store/

Create enterprise spaces, projects, users and roles in : 161b6b73d75ed9 https://kubesphere.io/zh/docs/quick-start/create-workspace-and-project/

How to manage user permissions in Chaos Mesh: https://chaos-mesh.org/zh/docs/manage-user-permissions/

Chaos Mesh use document: https://chaos-mesh.org/zh/docs/


PingCAP
1.9k 声望4.9k 粉丝

PingCAP 是国内开源的新型分布式数据库公司,秉承开源是基础软件的未来这一理念,PingCAP 持续扩大社区影响力,致力于前沿技术领域的创新实现。其研发的分布式关系型数据库 TiDB 项目,具备「分布式强一致性事务...