Chaos Engineering of stateful applications

In Kubecon Copenhagen 2018; we formally launched Litmus as a framework to introduce chaos engineering into stateful applications on Kubernetes. Since then, we have added more features to Litmus to make it usable natively on Kubernetes, we added more chaos tests, added Litmus books using KOPS to setup K8S clusters on AWS and GCP, and some more features.

Untitled design (3)

Litmus integration with MayaOnline for chaos engineering

For example, DevOps operators managing a Gitlab CI pipeline on Kubernetes can now build the chaos stage easily and quickly using these approaches:

kubectl apply -f induce-replica-chaos-mongodb.yaml

Making Litmus easy to use for developers in Kubernetes

Today MayaData announces support for Litmus integration into MayaOnline. Now cloud-native application developers requiring persistent storage can use MayaOnline not only to get great visibility of their application and simplified management of OpenEBS deployments but also to introduce chaos tests quickly to validate and harden the application for usage with either OpenEBS or Kubernetes local PV.

Quick recap — what is Litmus?

Before discussing on how Litmus books are invoked on MayaOnline or on a CI pipeline, let us quickly recap what Litmus is.

Litmus is a framework or set of tools put together to help manage the lifecycle of chaos engineering of applications on Kubernetes. Currently, the focus of Litmus is on adding chaos tests to OpenEBS software itself and to well-known stateful applications such as MongoDB or Percona.

Litmus books are broadly categorized into four types.

  1. K8S infrastructure books (
  2. Stateful applications deployment books (
  3. Stateful applications chaos books (
  4. Deployers for providers such as OpenEBS. Other storage providers helper functionality will go here

Developers and operators clone the litmus repository and change the configuration in the litmus books to suit their Kubernetes cluster and the particular application. Finally, litmus books are invoked by the usual kubectl command.

Each Litmus runs as a Kubernetes job and returns the result as a Kubernetes custom resource object. If you know how to use and operate and manage Kubernetes jobs and resources, using litmus is no different. It’s easy.

Using Litmus books, operators can easily add new chaos stage and developers can use MayaOnline to run Litmus books to harden their stateful applications.


Reference users of Litmus

The fact that Litmus was started from the chaos principles followed in the OpenEBS project and its development pipelines, We expect Litmus books to be liberally used by developers in their CI pipelines written to run on Kubernetes. OpenEBS CI and E2E systems are now restructured to use Litmus books, and you can see them in action at This CI and E2E project is open sourced and is accessible on the GitHub at

Litmus is available as a hosted version on MayaOnline. Developers can make use of Litmus books if their DevOps operators have integrated Litmus into the CI pipelines. There is also a simpler way to run chaos tests during development.

⁃ Connect the Kubernetes cluster to MayaOnline

⁃ Login into MayaOnline and setup Litmus repository for the cluster with your github credentials

⁃ Choose your application, choose your chaos tests, and MayaOnline will run them on the cluster and report the results

Yes, now chaos engineering for stateful applications is that simple

Contributions to Litmus project, our e2e project are welcome and encouraged. Tell us a specific stateful application chaos scenario you would like see a Litmus book for. Or better yet, send a PR.

This article was first published on Aug 29, 2018 on MayaData's Medium Account



Abhishek Raj
Abhishek is a Customer Success Engineer at Mayadata. He is currently working with Kubernetes and Docker.
Paul Burt
Prior to working with MayaData, Paul has worked with NetApp & Red Hat in senior positions. He’s upvoting your /r/kubernetes threads. Paul has a knack for and demystifying infrastructure, and making gnarly, complex topics approachable. He enjoys home brewing beer, reading independent comics, and yelling at his computer when it doesn’t do what he wants.
Abhishek Raj
Abhishek is a Customer Success Engineer at Mayadata. He is currently working with Kubernetes and Docker.