Kube-monkey is an open-source implementation of Chaos Monkey for use on Kubernetes clusters and written in Go. Like the original Chaos Monkey, Kube-monkey performs just one task: it randomly deletes Kubernetes pods within the cluster, as a means of injecting failure in the system and testing the stability of the remaining pods. It is based on pseudo-random rules, running at a pre-defined hour on weekdays to then build a schedule. Based on the generated schedule random pod targets that will be attacked and killed at a random time during that same day, although the time-range is configurable.
Kube-monkey will only terminate pods that have explicitly opted in by specifying certain Kube-monkey <span class="code-class-custom">metadata labels</span>. The following illustrates the basic labels that can be specified to allow Kube-monkey to kill pods within the application.
Check out the GitHub repository for more information on installing and using Kube-monkey.
Engineering Chaos In Kubernetes with Gremlin
Gremlin simplifies your Chaos Engineering workflow for Kubernetes by making it safe and effortless to execute Chaos Experiments across all nodes. As a distributed architecture Kubernetes is particularly sensitive to instability and unexpected failures. Gremlin can overload resources, impact network traffic, shutdown nodes, and more on your Kubernetes clusters.
Kubernetes Pod Chaos Monkey
Kubernetes Pod Chaos Monkey is a Chaos Monkey-style tool for Kubernetes. The code itself is a local shell script that issues kubectl commands to occasionally locate and then delete Kubernetes pods. It targets a cluster based on the configurable <span class="code-class-custom">NAMESPACE</span> and attempts to destroy a node every <span class="code-class-custom">DELAY</span> seconds (defaulting to 30).
Since Kubernetes Pod Chaos Monkey is essentially a simple shell script it can be modified quite easily.
The Chaos Toolkit
The Chaos Toolkit is an open-source and extensible tool that is written in Python. It uses platform-specific drivers to connect to your Kubernetes cluster and execute Chaos Experiments. Every experiment performed by Chaos Toolkit is written in JSON using a robust API. Experiments are made up of a few key elements that are executed sequentially and allow the experiment to bail out if any step in the process fails.