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.
- 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
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
- helm init
- Check whether the Helm tiller pod is running.
- kubectl -n kube-system get pods -l app=helm
Step 2: Install Chaos Mesh
Run the following comments to install Chaos Mesh;
- git clone --depth=1 https://github.com/pingcap/chaos-mesh && \
- cd chaos-mesh
- ./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 forminikube
clusters >= version 1.6.In
minikube
, the default virtual machine driver's image doesn't contain thesch_netem
kernel module in smaller versions. You can usenone
driver (if your host is Linux with thesch_netem
kernel module loaded) to try these chaos actions onminikube
or build an image with sch_netem by yourself.
Next steps
Refer to Run Chaos Mesh.