This document describes how to deploy Chaos Mesh in Kubernetes on your laptop (Linux or macOS) using minikube.

Prerequisites

Before deployment, make sure Minikubeis installed on your local machine.

Step 1: Set up the Kubernetes environment

Take the following steps to set up the local Kubernetes environment:

  • Start a minikube kubernetes cluster. Make sure you have installed minikube.
  1. minikube start --kubernetes-version v1.15.0 --cpus 4 --memory "8192mb" # we recommend that you allocate enough RAM (more than 8192 MiB) to the VM
  • Install Helm
  1. curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
  2. helm init
  • Check whether the Helm tiller pod is running.
  1. kubectl -n kube-system get pods -l app=helm

Step 2: Install Chaos Mesh

Run the following comments to install Chaos Mesh;

  1. git clone --depth=1 https://github.com/pingcap/chaos-mesh && \
  2. cd chaos-mesh
  3. ./install.sh

Note:

install.sh is a shell script to automate the installation process. To deploy manually, refer to Deploy Chaos Mesh.

After executing the above commands, you should be able to see the prompt that Chaos Mesh is installed successfully. Otherwise, please check the current environment according to the prompt message or send us an issue for help.

Limitations:

There are some known restrictions for Chaos Operator deployed on minikube clusters:

  • netem chaos is only supported for minikube clusters >= version 1.6.

    In minikube, the default virtual machine driver's image doesn't contain the sch_netem kernel module in smaller versions. You can use none driver (if your host is Linux with the sch_netem kernel module loaded) to try these chaos actions on minikube or build an image with sch_netem by yourself.

Next steps

Refer to Run Chaos Mesh.