跳转到主要内容
Chinese, Simplified

Kubernetes 的混沌工程平台。

 

Chaos Mesh 是云原生计算基金会 (CNCF) 托管的项目。 它是一个云原生混沌工程平台,可在 Kubernetes 环境中编排混沌。 在当前阶段,它具有以下组件:

  • Chaos Operator:混沌编排的核心组件。 完全开源。
  • Chaos Dashboard:用于管理、设计、监控混沌实验的 Web UI。

请参阅以下演示视频,快速了解 Chaos Mesh:

Watch the video

Chaos Operator


Chaos Operator 以可管理的方式将混沌注入应用程序和 Kubernetes 基础设施,为混沌实验和自动编排提供简单的自定义定义。 有三个组件在起作用:

  • Controller-manager:用于调度和管理 CRD 对象的生命周期。
  • Chaos-daemon:作为守护进程运行,具有特定节点的网络、Cgroup 等特权系统权限。

Chaos Operator

Chaos Operator 使用 CustomResourceDefinition (CRD) 来定义混沌对象。目前的实现支持几种类型的CRD对象进行故障注入,分别是DNSChaos、PodChaos、PodIOChaos、PodNetworkChaos、NetworkChaos、IOChaos、TimeChaos、StressChaos和KernelChaos,分别对应以下主要动作(实验):

  • pod-kill:选定的 pod 被杀死(可能需要 ReplicaSet 或类似的东西来确保 pod 将重新启动)。
  • pod-failure:选定的 pod 在指定时间内不可用。
  • container-kill:选中的容器在选中的 pod 中被杀死。
  • netem chaos:延迟、重复等网络混乱。
  • network-partition:模拟网络分区。
  • IO chaos:模拟文件系统故障,如I/O延迟、读/写错误等。
  • time chaos:选定的 pod 将被注入时钟偏差。
  • cpu-burn:模拟所选pod的CPU压力。
  • memory-burn:模拟所选pod压力的内存。
  • memory-burn:选定的 pod 将被注入(slab、bio 等)错误。
  • dns chaos:选中的pod会被注入dns错误,如error、random。

快速开始


请参阅 Chaos Mesh 文档

采用者

End users

Organization  Use case   Details
Authzed  Uses TimeChaos to fake vDSO time calls to test SpiceDB.   How SpiceDB uses Chaos Mesh to verify protection 
ByteDance  字节跳动自主研发的混沌工程平台主要用于公司自有技术体系。 由于涉及到云原生部署服务,字节跳动集成了Chaos Mesh作为底层故障注入引擎,是对字节跳动混沌工程平台的重要补充。 To be added.
DataStax  DataStax 利用 Chaos Mesh 创建了一个工具,用于运行基于本地或大规模远程的分布式正确性、验证和性能测试:Fallout,他们用它来测试 AstraDB,这是一种基于 Apache Cassandra 构建的多云 DBaaS。 Leveraging Chaos Mesh in AstraDB Testing
DigitalChina  为了更好地服务于向云基础设施转型的战略,神州数码使用 Chaos Mesh 来测试应用程序维护业务功能的能力,以及发现极端条件下可能出现的错误和漏洞的能力。 Develop a Daily Reporting System for Chaos Mesh
KingNet  KingNet 使用 Chaos Mesh 测试多个数据中心和微服务链路的可用性。 Chaos Mesh 还帮助他们模拟服务不可用或异常的网络状况。 To be added.
NetEase Fuxi Lab  使用 Chaos Mesh 提高其内部混合云的稳定性。 此外,他们拥有云平台的用户也会访问 Chaos Mesh 来测试用户服务的稳定性。 How a Top Game Company Uses Chaos Engineering to Improve Testing
Percona  Percona uses Chaos Mesh to test their Percona Kubernetes Operators, which is used to deploy their own Database-as-Service.  Chaos Mesh to Create Chaos in Kubernetes
PingCAP  Built TiPocket ontop of Chaos Mesh, an automated testing framework to build a full Chaos Engineering testing loop for TiDB, a distributed database.  Building an Automated Testing Framework Based on Chaos Mesh and Argo
Prudential Chaos Mech is an essential part of the Pru SRE toolset that implements managed outages scenarios for comprehensive testing of distributed microservice product platforms, especially Java-powered runtimes.  To be added.
Qiniu Cloud  为保证云存储产品的可靠性,他们使用Chaos Mesh在服务单点故障、网络异常、资源消耗异常(CPU、内存、I/O)等条件下对元数据和底层存储系统进行混沌测试 ) To be added.
RabbitMQ  RabbitMQ applies NetworkChaos to learn how RabbitMQ handles network latency.  Testing RabbitMQ Resiliency with Chaos Mesh
Tencent  腾讯互娱将线上运营迁移到腾讯云 Kubernetes 引擎后,希望为用户提供更稳定可靠的体验,因此引入了 Chaos Mesh。 腾讯主要使用 Chaos Mesh 来模拟以下几种故障:故障隔离、服务降级、服务验证。 Securing Online Gaming: Combine Chaos Engineering with DevOps Practices
Xpeng  Xpeng Motors use Chaos Mesh in the following scenarios: rolling updates of microservices and lossless verification of traffic; microservices, multi-registries, multi-party synchronization, and traffic lossless verification; MQTT cluster two-way subscription verification; exactly-once consumer business verification for message queues;simulation of weak 4G network for in-vehicle systems, saving drive test costs; AIOPS anomaly detection dataset generation.  To be added.
Maycur Maycur built Chaos Mesh on K8S for JVM fault drill, mainly for JVM delay, method exception, method return value modification, and other scenarios. To be added.

Vendors

Organization   Use case   Details
Civo Chaos Mesh can be directly deployed from the Civo's Kubernetes marketplace. Automating chaos engineering with Chaos Mesh
KubeSphere Chaos Mesh can be directly deployed from the KubeSphere App Store starting from KubeSphere v2.3 onwards. To be added.
Microsoft  微软的 Azure Chaos Studio 集成了 Chaos Mesh,让用户可以将故障注入 AKS 集群。 Create a chaos experiment that uses a Chaos Mesh fault to kill AKS pods

博客


有关 Chaos Mesh 设计和实现、功能、混沌工程、社区更新等的博客。请参阅 Chaos Mesh 博客。以下是一些推荐的,供您开始使用:

本文:https://jiagoushi.pro/chaos-mesh-chaos-engineering-platform-kubernetes

原文地址
https://github.com/chaos-mesh/chaos-mesh
Article
知识星球
 
微信公众号
 
视频号