Difficulty: Beginner
Estimated Time: 20 minutes

Litmus is a toolset to do cloud-native chaos engineering. Litmus provides tools to orchestrate chaos on Kubernetes to help SREs find weaknesses in their deployments. SREs use Litmus to run chaos experiments initially in the staging environment and eventually in production to find bugs, vulnerabilities. Fixing the weaknesses leads to increased resilience of the system.

Litmus offers you these compelling features:

  • Kubernetes native CRDs to manage chaos. Using chaos API, orchestration, scheduling, and complex workflow management can be orchestrated declaratively.
  • Most of the generic chaos experiments are readily available for you to get started with your initial chaos engineering needs.
  • An SDK is available in GO, Python, and Ansible. A basic experiment structure is created quickly using SDK and developers and SREs just need to add the chaos logic into to make a new experiment.
  • It's simple to complex chaos workflows are easy to construct. Use GitOps and the chaos workflows to scale your chaos engineering efforts and increase the resilience of your Kubernetes platform.

Litmus takes a cloud-native approach to create, manage, and monitor chaos. Chaos is orchestrated using the following Kubernetes Custom Resource Definitions (CRDs):

  • ChaosEngine: A resource to link a Kubernetes application or Kubernetes node to a ChaosExperiment. ChaosEngine is watched by Litmus' Chaos-Operator which then invokes Chaos-Experiments
  • ChaosExperiment: A resource to group the configuration parameters of a chaos experiment. ChaosExperiment CRs are created by the operator when experiments are invoked by ChaosEngine.
  • ChaosResult: A resource to hold the results of a chaos-experiment. The Chaos-exporter reads the results and exports the metrics into a configured Prometheus server.

You will learn how to:

  • Install and configure Litmus on Kubernetes.
  • Install Litmus experiments, RBAC, and prepare the Chaos Engine.
  • Deliver chaos experiments.
  • Observe the chaos engine exercise your experiments.

Thank You

Many thanks to Sayan Mondal for laying the foundation for this scenario and formulating these important teaching moments.

Aside from this scenario, here is an informative 20-minute video on your first chaos experiment with Litmus:

!

In this scenario, you learned the basics of Litmus installation and experiment running. To continue, dive into the 24+ different categories of experiments that are possible with Litmus.

With these steps you have learned:

  • ✔ Setup and install Litmus onto Kubernetes.

  • ✔ Install Litmus experiments, RBAC and prepare the Chaos Engine.

  • ✔ Deliver chaos experiments.

  • ✔ Observe the chaos engine exercise your experiments.

Litmus is a toolset to do cloud-native chaos engineering. The project provides tools to orchestrate chaos on Kubernetes to help developers and SREs find weaknesses in their application deployments. It's engine can be used to run chaos experiments initially in the staging environment and eventually in production to find bugs, vulnerabilities. Fixing the weaknesses leads to increased resilience of the system. Litmus adopts a “Kubernetes-native” approach to define chaos intent in a declarative manner via custom resources.

Litmus is under active development as a Sandbox project with CNCF. This Katacoda scenario will be updated as it evolves.

The Litmus project is seeking your experiences, viewpoints and suggestions. Anything you offer can help move the project further. Consider visiting this form to submit your ideas.

In the last year we've seen Chaos Engineering move from a much talked-about idea to an accepted, mainstream approach to improving and assuring distributed system resilience. As organizations large and small begin to implement Chaos Engineering as an operational process, we're learning how to apply these techniques safely at scale. The approach is definitely not for everyone, and to be effective and safe, it requires organizational support at scale. -- ThoughtWorks Radar

Thank You

Many thanks to Sayan Mondal for laying the foundation for this scenario and formulating these important teaching moments.

References


For a deeper understanding of these topics and more join
Jonathan Johnson
at various conferences, symposiums, workshops, and meetups.

Software Architectures ★ Speaker ★ Workshop Hosting ★ Kubernetes & Java Specialist

Litmus

Step 1 of 8

Your Kubernetes Cluster

For this scenario, Katacoda has just started a fresh Kubernetes cluster for you. Verify it's ready for your use.

kubectl version --short && \ kubectl get componentstatus && \ kubectl get nodes && \ kubectl cluster-info

The Helm package manager used for installing applications on Kubernetes is also available.

helm version --short

Kubernetes Dashboard

You can administer your cluster with the kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.

token.sh