<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shubham Chaudhary</title>
    <description>The latest articles on DEV Community by Shubham Chaudhary (@ispeakc0de).</description>
    <link>https://dev.to/ispeakc0de</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F404364%2Fcd90f544-64b6-4ed3-87f0-ae3075ad4560.jpeg</url>
      <title>DEV Community: Shubham Chaudhary</title>
      <link>https://dev.to/ispeakc0de</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ispeakc0de"/>
    <language>en</language>
    <item>
      <title>Declarative Approach to Chaos Hypothesis using Litmus Probes</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Tue, 15 Sep 2020 15:47:00 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/declarative-approach-to-chaos-hypothesis-using-litmus-probes-5157</link>
      <guid>https://dev.to/litmus-chaos/declarative-approach-to-chaos-hypothesis-using-litmus-probes-5157</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;One of the foremost &lt;a href="https://principlesofchaos.org/" rel="noopener noreferrer"&gt;principles&lt;/a&gt; of chaos engineering is the need to build a hypothesis around steady-state or desired system behavior and be able to automate the process of gauging, analyzing &amp;amp; reporting it over the course of an experiment. This is indispensable to the persona executing these experiments in order to gain valuable insights on the resilience of their applications &amp;amp; deployment infrastructure. In other words, it is imperative for chaos engineering frameworks/toolsets to provide the ability to define their hypotheses &amp;amp; validate them against the same.&lt;/p&gt;

&lt;p&gt;Further, in the world of cloud-native chaos engineering, the hypothesis definition is expected to be declarative in nature, much in the same way the chaos intent is. Another very interesting factor here is the diversity in the way the steady-state is defined. Most of the time, they are systemic behavior patterns: metrics around error rates, latency percentiles, etc., and at other times liveness of a crucial downstream service, state (values within) of a database, or even Kubernetes resources. Typically, they can be mapped to operational SLOs (Service Level Objectives) that have been agreed upon. These are the parameters &amp;amp; conditions that verify that the system “works” (as a discerning reader you might have understood the subtle difference here b/w chaos experimentation over standard failure testing: verification that the system works over validating how it works. Anyway, I digress..). &lt;/p&gt;

&lt;p&gt;So, to summarize our understanding (courtesy: standard chaos principles &amp;amp; learnings from the awesome chaos community): &lt;/p&gt;


&lt;ol&gt; &lt;li&gt;Hypotheses are crucial to chaos experiments&lt;/li&gt; 
&lt;li&gt;Chaos frameworks need to burn this into experiments (remember automated chaos!)&lt;/li&gt;

&lt;li&gt;Hypothesis definitions should be declarative in nature &amp;amp; thereby easily tuned &amp;amp; scaled&lt;/li&gt;

&lt;li&gt; Accommodate the diverse nature of hypotheses definitions, with the right schema &amp;amp; architecture. 
&lt;/li&gt;
&lt;h2&gt;
  
  
  Hypothesis in LitmusChaos Experiments
&lt;/h2&gt;

&lt;p&gt;As a community, we identified the need for “steady-state” validations pretty early &amp;amp; introduced the pre-chaos &amp;amp; post-chaos checks in the experiments, with appropriate Kubernetes events generated in the respective stages. In the “generic” category of experiments, this corresponds to a vanilla check that verifies if all pods bearing the specified application label in a given namespace are in the “Running” state (the same check also verifies that all the containers within this pod have the right status). &lt;/p&gt;

&lt;p&gt;In application-specific chaos experiments (such as the Kafka-broker-failure or Cassandra-node-failure) health checks native to the applications have been included in the experiment business logic. There are also examples and documentation resources available for users to add custom checks to implement a hypothesis within a newly bootstrapped/scaffolded chaos experiment using the Litmus SDK. In some ways, this ticks the points (a) &amp;amp; (b) in our summarization. &lt;/p&gt;

&lt;p&gt;However, the aforementioned approach also places the onus on the chaos developers/users to create and maintain new experiments or modify existing ones with additional logic every time the hypothesis changes (for example, new criteria might be added to indicate steady-state).&lt;/p&gt;

&lt;p&gt;This ties in directly to ( c), i.e., we needed a declarative way to specify checks to be carried out, while reusing the standard (generic) chaos experiments from the ChaosHub, and also accommodating standard interfaces to describe these checks (d). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgr4z63w8wp3jwxuptq70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgr4z63w8wp3jwxuptq70.png" alt="Alt Text" width="616" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The aforementioned reasons prompted us to come up with the “Litmus Probes” feature in the 1.7.0 release! &lt;/p&gt;

&lt;p&gt;In this blog, I will talk about how you can use Litmus Probes to build custom checks against your application/infra in a reasonably declarative fashion, i.e., by providing additional inputs in the ChaosEngine YAML manifest. &lt;/p&gt;
&lt;h2&gt;
  
  
  Litmus Probes: Types &amp;amp; Characteristics
&lt;/h2&gt;

&lt;p&gt;Litmus probes can be defined as “pluggable” checks you can define within the ChaosEngine for any chaos experiment. The experiment pods execute these checks based on the mode they are defined in &amp;amp; factor their success as necessary conditions in determining the verdict of the experiment (along with the standard “in-built” checks). &lt;/p&gt;

&lt;p&gt;Litmus currently supports four types of probes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;httpProbe:&lt;/b&gt; To query health/downstream URIs&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;cmdProbe:&lt;/b&gt; To execute any user-desired health-check function implemented as a shell command&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;k8sProbe:&lt;/b&gt; To perform CRUD operations against native &amp;amp; custom Kubernetes resources&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;promProbe:&lt;/b&gt; To validate the SLO by prometheus endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These probes can be used in isolation or in several combinations to achieve the desired checks. As we will see in subsequent sections, while the httpProbe, promProbe &amp;amp; k8sProbe are fully declarative in the way they are conceived, the cmdProbe expects the user to provide a shell command to implement checks that are highly specific to the application use case. Does it sound similar to the  “command” or “shell” module in the ansible world? The intent is similar too!&lt;/p&gt;

&lt;p&gt;The probes can be set up to run in different modes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;SoT:&lt;/b&gt; Executed at the Start of Test as a pre-chaos check&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;EoT:&lt;/b&gt; Executed at the End of Test as a post-chaos check&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Edge:&lt;/b&gt; Executed both, before and after the chaos &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Continuous:&lt;/b&gt; The probe is executed continuously, with a specified polling interval during the chaos injection.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;OnChaos:&lt;/b&gt; The probe is executed continuously, with a specified polling interval strictly for chaos duration of chaos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All probes share some common attributes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;probeTimeout:&lt;/b&gt; Represents the time limit for the probe to execute the check specified and return the expected data. &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;retry:&lt;/b&gt; The number of times a check is re-run upon failure in the first attempt, before declaring the probe status as failed. &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;interval:&lt;/b&gt; The period between subsequent retries &lt;/li&gt;
&lt;li&gt;
&lt;b&gt;probePollingInterval:&lt;/b&gt; The time interval for which continuous probe should be sleep after each iteration.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;initialDelaySeconds:&lt;/b&gt; Represents the initial waiting time interval for the probes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let us take a look at the different probe categories in some more detail. &lt;/p&gt;
&lt;h3&gt;
  
  
  httpProbe
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;httpProbe&lt;/code&gt; allows developers to specify a URL which the experiment uses to gauge health/service availability (or other custom conditions) as part of the entry/exit criteria. The received status code is mapped against an expected status. It supports http &lt;code&gt;Get&lt;/code&gt; and &lt;code&gt;Post&lt;/code&gt; methods.&lt;/p&gt;

&lt;p&gt;In HTTP Get method, it sends an HTTP Get request to the provided URL and matches the response code based on the given criteria(==, !=, oneOf).&lt;/p&gt;

&lt;p&gt;In the HTTP Post method, it sends an HTTP Post request to the provided URL. The HTTP body can be provided in the body field. In the case of a complex Post request in which the body spans multiple lines, the &lt;code&gt;bodyPath&lt;/code&gt; attribute can be used to provide the path to a file consisting of the same. This file can be made available to the experiment pod via a ConfigMap resource, with the ConfigMap name being defined in the ChaosEngine OR the ChaosExperiment CR.&lt;br&gt;
It can be defined at &lt;code&gt;.spec.experiments[].spec.probe&lt;/code&gt; inside ChaosEngine.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;code&gt;body&lt;/code&gt; and &lt;code&gt;bodyPath&lt;/code&gt; are mutually exclusive.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;probe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;check-frontend-access-url"&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;httpProbe"&lt;/span&gt;
  &lt;span class="na"&gt;httpProbe/inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;url&amp;gt;"&lt;/span&gt;
    &lt;span class="na"&gt;insecureSkipVerify&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
        &lt;span class="na"&gt;criteria&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;==&lt;/span&gt; &lt;span class="c1"&gt;# supports == &amp;amp; != and oneof operations&lt;/span&gt;
        &lt;span class="na"&gt;responseCode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;response&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;code&amp;gt;"&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Continuous"&lt;/span&gt;
  &lt;span class="na"&gt;runProperties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;probeTimeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;probePollingInterval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The httpProbe is better used in the Continuous mode of operation as a parallel liveness indicator of a target or downstream application. It uses the &lt;code&gt;probePollingInterval&lt;/code&gt; property to specify the polling interval for the access checks.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;code&gt;insecureSkipVerify&lt;/code&gt; can be set to true to skip the certificate checks.&lt;/p&gt;

&lt;h3&gt;
  
  
  cmdProbe
&lt;/h3&gt;

&lt;p&gt;The cmdProbe allows developers to run shell commands and match the resulting output as part of the entry/exit criteria. The intent behind this probe was to allow users to implement a non-standard &amp;amp; imperative way of expressing their hypothesis. For example, the cmdProbe enables you to check for specific data within a database, parse the value out of a JSON blob being dumped into a certain path, or check for the existence of a particular string in the service logs.&lt;/p&gt;

&lt;p&gt;In order to enable this behavior, the probe supports an inline mode in which the command is run from within the experiment image as well as a source mode, where the command execution is carried out from within a new pod whose image can be specified. While inline is preferred for simple shell commands, source mode can be used when application-specific binaries are required. The cmdProbe can be defined at &lt;code&gt;.spec.experiments[].spec.probe&lt;/code&gt; the path inside the ChaosEngine.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;probe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;check-database-integrity"&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cmdProbe"&lt;/span&gt;
  &lt;span class="na"&gt;cmdProbe/inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;command&amp;gt;"&lt;/span&gt;
    &lt;span class="na"&gt;comparator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;string"&lt;/span&gt; &lt;span class="c1"&gt;# supports: string, int, float&lt;/span&gt;
      &lt;span class="na"&gt;criteria&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;contains"&lt;/span&gt; &lt;span class="c1"&gt;#supports &amp;gt;=,&amp;lt;=,&amp;gt;,&amp;lt;,==,!= for int and contains,equal,notEqual,matches,notMatches for string values&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;value-for-criteria-match&amp;gt;"&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;repo&amp;gt;/&amp;lt;tag&amp;gt;"&lt;/span&gt; &lt;span class="c1"&gt;# it can be any image&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Edge"&lt;/span&gt;
  &lt;span class="na"&gt;runProperties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;probeTimeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;initialDelaySeconds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  k8sProbe
&lt;/h3&gt;

&lt;p&gt;With the proliferation of custom resources &amp;amp; operators, especially in the case of stateful applications, the steady-state is manifested as status parameters/flags within Kubernetes resources. k8sProbe addresses verification of the desired resource state by allowing users to define the Kubernetes &lt;a href="https://medium.com/@ddymko/understanding-kubernetes-gvr-e7fb94093e88" rel="noopener noreferrer"&gt;GVR&lt;/a&gt;(group-version-resource) with appropriate filters (field selectors/label selectors). The experiment makes use of the Kubernetes &lt;a href="https://ymmt2005.hatenablog.com/entry/2020/04/14/An_example_of_using_dynamic_client_of_k8s.io/client-go" rel="noopener noreferrer"&gt;Dynamic Client&lt;/a&gt; to achieve this. The k8sProbe can be defined at &lt;code&gt;.spec.experiments[].spec.probe&lt;/code&gt; the path inside the ChaosEngine.&lt;/p&gt;

&lt;p&gt;It supports the following CRUD operations which can be defined at &lt;code&gt;probe.operation&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;create:&lt;/b&gt; It creates kubernetes resource based on the data provided inside probe.data field.&lt;br&gt;
&lt;b&gt;delete:&lt;/b&gt; It deletes matching kubernetes resource via GVR and filters (field selectors/label selectors).&lt;br&gt;
&lt;b&gt;present:&lt;/b&gt; It checks for the presence of kubernetes resource based on GVR and filters (field selectors/labelselectors).&lt;br&gt;
&lt;b&gt;absent:&lt;/b&gt; It checks for the absence of kubernetes resource based on GVR and filters (field selectors/labelselectors).&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;probe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;check-app-cluster-cr-status"&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;k8sProbe"&lt;/span&gt;
  &lt;span class="na"&gt;k8sProbe/inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;appGroup&amp;gt;"&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;appVersion&amp;gt;"&lt;/span&gt;
      &lt;span class="na"&gt;resource&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;appResource&amp;gt;"&lt;/span&gt;
      &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;default"&lt;/span&gt;
      &lt;span class="na"&gt;fieldSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata.name=&amp;lt;appResourceName&amp;gt;,status.phase=Running"&lt;/span&gt;
      &lt;span class="na"&gt;labelSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;app-labels&amp;gt;"&lt;/span&gt;
  &lt;span class="na"&gt;operation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;present"&lt;/span&gt; &lt;span class="c1"&gt;# it can be present, absent, create, delete&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;EOT"&lt;/span&gt;
  &lt;span class="na"&gt;runProperties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;probeTimeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
    &lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  PromProbe
&lt;/h3&gt;

&lt;p&gt;PromProbe allows users to run Prometheus queries and match the resulting output against specific conditions. The intent behind this probe is to allow users to define metrics-based SLOs in a declarative way and determine the experiment verdict based on its success. The probe runs the query on a Prometheus server defined by the endpoint, and checks whether the output satisfies the specified criteria.&lt;/p&gt;

&lt;p&gt;The promql query can be provided in the query field. In the case of complex queries that span multiple lines, the queryPath attribute can be used to provide the link to a file consisting of the query. This file can be made available in the experiment pod via a ConfigMap resource, with the ConfigMap being passed in the ChaosEngine OR the ChaosExperiment CR.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; query and queryPath are mutually exclusive&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;probe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;check-probe-success'&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;promProbe'&lt;/span&gt;
    &lt;span class="na"&gt;promProbe/inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;prometheus-endpoint&amp;gt;'&lt;/span&gt;
      &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;promql-query&amp;gt;'&lt;/span&gt;
      &lt;span class="na"&gt;comparator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;criteria&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;=='&lt;/span&gt; &lt;span class="c1"&gt;#supports &amp;gt;=,&amp;lt;=,&amp;gt;,&amp;lt;,==,!= comparision&lt;/span&gt;
        &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;value-for-criteria-match&amp;gt;'&lt;/span&gt;
    &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Edge'&lt;/span&gt;
    &lt;span class="na"&gt;runProperties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;probeTimeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
      &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
      &lt;span class="na"&gt;retry&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  Probe Status &amp;amp; Deriving Inferences
&lt;/h2&gt;

&lt;p&gt;The Litmus chaos experiments run the probes defined in the ChaosEngine and update their stage-wise success in the ChaosResult custom resource, with details including the overall probeSuccessPercentage (a ratio of successful checks v/s total probes) and failure step, where applicable. The success of a probe is dependent on whether the expected status/results are met and also on whether it is successful in all the experiment phases defined by the probe’s execution mode. For example, probes that are executed in “Edge” mode, need the checks to be successful both during the pre-chaos &amp;amp; post-chaos phases to be declared as successful. &lt;/p&gt;

&lt;p&gt;The pass criteria for the experiment is a logical AND function of all the probes defined in the ChaosEngine as well as inbuilt entry/exit criteria. Failure of either indicates a failed hypothesis and is deemed experiment failure. And an opportunity to fix the underlying problem! &lt;/p&gt;

&lt;p&gt;Provided below is a chaosresult snippet containing the probe status for a mixed-probe chaosengine.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;         &lt;span class="s"&gt;app-pod-delete&lt;/span&gt;
&lt;span class="na"&gt;Namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;    &lt;span class="s"&gt;test&lt;/span&gt;
&lt;span class="na"&gt;Labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;       &lt;span class="s"&gt;name=app-pod-delete&lt;/span&gt;
&lt;span class="na"&gt;Annotations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;&amp;lt;none&amp;gt;&lt;/span&gt;
&lt;span class="na"&gt;API Version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;litmuschaos.io/v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;Kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;         &lt;span class="s"&gt;ChaosResult&lt;/span&gt;
&lt;span class="na"&gt;Metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;Creation Timestamp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;2020-08-29T08:28:26Z&lt;/span&gt;
  &lt;span class="na"&gt;Generation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="m"&gt;36&lt;/span&gt;
  &lt;span class="na"&gt;Resource Version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;    &lt;span class="m"&gt;50239&lt;/span&gt;
  &lt;span class="na"&gt;Self Link&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;           &lt;span class="s"&gt;/apis/litmuschaos.io/v1alpha1/namespaces/test/chaosresults/app-pod-delete&lt;/span&gt;
  &lt;span class="na"&gt;UID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;                 &lt;span class="s"&gt;b9e3638a-b7a4-4b93-bfea-bd143d91a5e8&lt;/span&gt;
&lt;span class="na"&gt;Spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;Engine&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;      &lt;span class="s"&gt;probe&lt;/span&gt;
  &lt;span class="na"&gt;Experiment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;pod-delete&lt;/span&gt;
&lt;span class="na"&gt;Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;Experimentstatus&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Fail Step&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;                 &lt;span class="s"&gt;N/A&lt;/span&gt;
    &lt;span class="na"&gt;Phase&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;                     &lt;span class="s"&gt;Completed&lt;/span&gt;
    &lt;span class="na"&gt;Probe Success Percentage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;100&lt;/span&gt;
    &lt;span class="na"&gt;Verdict&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;                   &lt;span class="s"&gt;Pass&lt;/span&gt;

  &lt;span class="na"&gt;Probe Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;check-frontend-access-url&lt;/span&gt;
    &lt;span class="na"&gt;Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;Continuous&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;Passed 👍&lt;/span&gt; 
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="s"&gt;HTTPProbe&lt;/span&gt;

    &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="s"&gt;check-app-cluster-cr-status&lt;/span&gt;
    &lt;span class="na"&gt;Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;Post Chaos&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;Passed 👍&lt;/span&gt; &lt;span class="c1"&gt;#EoT&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="s"&gt;K8sProbe&lt;/span&gt;

    &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="s"&gt;check-database-integrity&lt;/span&gt;
    &lt;span class="na"&gt;Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;Post Chaos&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;Passed 👍&lt;/span&gt; &lt;span class="c1"&gt;#Edge&lt;/span&gt;
      &lt;span class="na"&gt;Pre Chaos&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;   &lt;span class="s"&gt;Passed 👍&lt;/span&gt; 
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;          &lt;span class="s"&gt;CmdProbe&lt;/span&gt;
&lt;span class="na"&gt;Events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s"&gt;Type    Reason   Age   From                     Message&lt;/span&gt;
  &lt;span class="s"&gt;----    ------   ----  ----                     -------&lt;/span&gt;
  &lt;span class="s"&gt;Normal  Summary  7s    pod-delete-0s2jt6-s4rdx  pod-delete experiment has been Passed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The probes are an effective mechanism to burn-in hypotheses into chaos experiments and arm them with more meaning &amp;amp; context. In some ways, they address the “opacity” today with respect to what constitutes an experiment pass or failure. Probes are also useful analytics aids indicating resiliency over a period of time. For example, the probeSuccessPercentage for a given experiment (with a set of mandatory probes) against a specific application can be tracked over time to gauge the progress being made in the feature &amp;amp; deploy practices. &lt;/p&gt;

&lt;p&gt;One of the questions we got from the community as we set out to build this feature is whether the probes are a replacement for application-specific chaos experiments. The answer is “Not really”. While the probes do enable reuse of the generic experiments and give it an app context, they are not intended to perform deep application-level verification, much less inject app-specific faults. Take the example of the Kafka chaos experiments on the hub - for example. The focus here is on identifying a certain type of app replica to inject chaos on &amp;amp; use test downstream apps (to simulate the producer/consumer) for validation purposes. The probes can be useful in enhancing these experiments and therefore work more as aids than replacements. &lt;/p&gt;

&lt;p&gt;Hope this feature helps you practice Chaos Engineering in an even better way. Do try it &amp;amp; let us know what you think. &lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you? Join Our Community &lt;code&gt;#litmus&lt;/code&gt; channel in &lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;Kubernetes Slack&lt;/a&gt;&lt;br&gt;
Contribute to LitmusChaos and share your feedback on &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;br&gt;
If you like LitmusChaos, become one of the many stargazers &lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/litmuschaos" rel="noopener noreferrer"&gt;
        litmuschaos
      &lt;/a&gt; / &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;
        litmus
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Litmus helps  SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub  (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;&lt;a href="https://litmuschaos.io/" rel="nofollow noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://avatars.githubusercontent.com/u/49853472?s=200&amp;amp;v=4"&gt;&lt;img alt="LitmusChaos" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49853472%3Fs%3D200%26v%3D4" width="200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Open Source Chaos Engineering Platform&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://slack.litmuschaos.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48844a2a28b222b400e3fbeb358770903bdcb4db693ac67fae37db71869352f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d4a6f696e2d707572706c65" alt="Slack Channel"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master"&gt;&lt;img src="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master" alt="GitHub Workflow"&gt;&lt;/a&gt;
&lt;a href="https://hub.docker.com/r/litmuschaos/chaos-operator" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2a2ae2b0d21ae55811e5da33f40b76a4aa18cd37d027ab13c5f3a4b6230ef55b/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6c69746d75736368616f732f6368616f732d6f70657261746f722e737667" alt="Docker Pulls"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e87b930f5b0b40039776ad0d255d62735311c7d7228bb7615d7408161915c0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c69746d75736368616f732f6c69746d75733f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2f66885a8b6af96fe90f93b8aa9085f6065fb43e9c0a4a602219a01e7a142548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c69746d75736368616f732f6c69746d7573" alt="GitHub issues"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/LitmusChaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6425eb889e05cdadcf0db2a952db7e9dda44ca3df091c5ca9feea8515a2ac44f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c69746d75736368616f733f7374796c653d736f6369616c" alt="Twitter Follow"&gt;&lt;/a&gt;
&lt;a href="https://www.bestpractices.dev/projects/3202" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a8d5ed826be562a3339ce503c6ff3f4ab2cc63227b18ba5f65648fdb3ca04eec/68747470733a2f2f7777772e626573747072616374696365732e6465762f70726f6a656374732f333230322f6261646765" alt="OpenSSF Best Practices"&gt;&lt;/a&gt;
&lt;a href="https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/848851b5714a120bc84e06ebdb121f455a4a472a782a90d6f4efb681fa9be392/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466c69746d75736368616f732532466c69746d75732e7376673f747970653d736869656c64" alt="FOSSA Status"&gt;&lt;/a&gt;
&lt;a href="https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8420bd8ea7dfc02f130445cdcf5f3adec631ea57f9682afc56af5940cc5ca044/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d726564" alt="YouTube Channel"&gt;&lt;/a&gt;
&lt;a href="https://gurubase.io/g/litmuschaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d14b84f34d827a00ea3da041c025456fa77e2143b06396c17636f4531500eb23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757275626173652d41736b2532304c69746d75734368616f73253230477572752d303036424646" alt="Gurubase"&gt;&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;&lt;em&gt;Read this in &lt;a href="https://github.com/litmuschaos/litmus/translations/TRANSLATIONS.md" rel="noopener noreferrer"&gt;other languages&lt;/a&gt;.&lt;/em&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/litmuschaos/litmus/translations/README-ko.md" rel="noopener noreferrer"&gt;🇰🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-chn.md" rel="noopener noreferrer"&gt;🇨🇳&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-pt-br.md" rel="noopener noreferrer"&gt;🇧🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-hi.md" rel="noopener noreferrer"&gt;🇮🇳&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses &amp;amp; potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers &amp;amp; SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles &amp;amp; community collaborated. It is 100% open source &amp;amp; a CNCF project.&lt;/p&gt;
&lt;p&gt;LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.&lt;/p&gt;
&lt;p&gt;At a high-level, Litmus comprises of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Control Plane&lt;/strong&gt;: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Execution Plane Services&lt;/strong&gt;: Made up of a…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;/ol&gt;

</description>
      <category>kubernetes</category>
      <category>docker</category>
      <category>chaosengineering</category>
      <category>litmuschaos</category>
    </item>
    <item>
      <title>Cassandra Chaos Engineering With Litmus</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sun, 19 Jul 2020 09:22:00 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/cassandra-chaos-engineering-with-litmus-31fn</link>
      <guid>https://dev.to/litmus-chaos/cassandra-chaos-engineering-with-litmus-31fn</guid>
      <description>&lt;p&gt;In this blog, I will talk about chaos engineering on Cassandra with Litmus. Before jumping in, let's do a quick recap on Litmus. Litmus is a framework for practicing Chaos Engineering in &lt;a href="https://dev.to/umamukkara/chaos-engineering-for-cloud-native-systems-2fjn"&gt;cloud-native environments&lt;/a&gt;. Litmus provides a chaos-operator, a large set of chaos experiments in its &lt;a href="https://hub.litmuschaos.io" rel="noopener noreferrer"&gt;hub&lt;/a&gt;, detailed &lt;a href="https://docs.litmuschaos.io/docs/getstarted/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;, quick &lt;a href="https://dev.to/uditgaurav/get-started-with-litmuschaos-in-minutes-4ke1"&gt;Demo&lt;/a&gt;, and a friendly &lt;a href="https://litmuschaos.io" rel="noopener noreferrer"&gt;community&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt; What Is Cassandra?&lt;/h1&gt;

&lt;p&gt;Apache Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters with asynchronous masterless replication allowing low latency operations for all clients. Cassandra's support for replicating across multiple datacenters is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.&lt;/p&gt;

&lt;p&gt;Cassandra is using Consistent Hashing, which is a distributed hashing scheme that operates independently of the number of servers or objects in a distributed hash table by assigning them a position on an abstract circle, or hash ring. This allows servers and objects to scale without affecting the overall system. Cassandra uniformly distributes the load over the Cassandra ring and re-distribute the load when the Cassandra Statefulset scales up/down.&lt;/p&gt;

&lt;p&gt;With Kubernetes popularity skyrocketing and the adoption of Apache Cassandra growing as a NoSQL database well-suited to matching the high availability and scalability needs of cloud-based applications, it should be no surprise that more developers are looking to run Cassandra databases on Kubernetes. However, many devs are finding that doing so is relatively simple to get going with, but considerably more challenging to execute at a high level. We will discuss the installation part later in this blog.&lt;/p&gt;

&lt;p&gt;On the positive side, Kubernetes helpfully offers StatefulSets — workload API objects that can be used to manage stateful applications. StatefulSets provide the requisite components to establish stable and unique network identifiers, stable persistent storage, smooth and ordering deployment and scaling (as well as deletion and termination), and automated rolling updates. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsna0ljiko6ksg57ct6ag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsna0ljiko6ksg57ct6ag.png" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt; Why do we need chaos engineering on Cassandra?
 &lt;/h2&gt;

&lt;p&gt;As Cassandra is using consistent hashing and maintaining the Cassandra ring to distribute the load uniformly. If the number of replicas will scale up/down, the load will be redistributed. But we always have a few questions in our mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt; Does load redistribution always happen with 0 probability of failure in scale-up/down? &lt;/b&gt; &lt;/li&gt;
&lt;li&gt;
&lt;b&gt; How will it behave if the one/multiple replicas of the Cassandra Statefulset are killed? &lt;/b&gt; &lt;/li&gt;
&lt;li&gt;
&lt;b&gt; Is it resilient even if the rate of replica deletion is very high? &lt;/b&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the age of data evolution, data is very important and everyone is looking for a setup where the probability of downtime is least as possible. Here the chaos engineering comes into play. It will help you to find out all the corner cases of failure before they actually happen and if you really believe in "Prevention is better than cure" then the best real-life example award goes to chaos engineering. It can be used to test the resiliency of the Cassandra stateful set. As of now, we have a Cassandra-pod-delete experiment to test the case where one of the replicas of Cassandra Statefulset is deleted. More use-cases/experiments will be added soon.&lt;/p&gt;

&lt;h1&gt; Chaos On Cassandra: Pod-Delete Experiment
 &lt;/h1&gt; 

&lt;p&gt;Now that we know the basics of a Cassandra statefulset on Kubernetes, let us execute a chaos experiment to kill one of the replicas of Cassandra while the load is distributed on all the replicas over the Cassandra ring &amp;amp; verify whether the load is redistributed. This example intends to introduce the user to the steps involved in carrying out a chaos experiment using Litmus.&lt;/p&gt;

&lt;h2&gt; Pre-Requisites &lt;/h2&gt; 

&lt;ul&gt;
&lt;li&gt;A (preferably) multi-node Kubernetes cluster. Ensure you are in the Kubernetes-admin context to setup RBAC for the various components involved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt; Chaos Experiment Approach &lt;/h2&gt;

&lt;p&gt;The following steps are performed automatically upon execution of the Chaos Experiment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An external liveness pod will be created, which will ensure the liveness of Cassandra statefulset during chaos execution. It is continuously running the liveness cycles of cqlsh commands. Liveness cycle stands for a set of cqlsh operations (create keyspace, create the table, insert data in the table, delete the tables, delete the keyspaces). It is running a webserver container as a side cart, which is exposing the status of the liveness cycle (cycleInProgress or cycleCompleted). The experiment looks for the status of the webserver service and cleans up the liveness deployment at the end of the cycle. In case of a timeout, the liveness container terminates ungracefully with an exception. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will ensure that the load is distributed across all the replicas on the Cassandra ring before and after the chaos injection. It ensures that the load is re-distributed across all available replicas after every kill. In case if the load is not distributed on any of the available replicas, this check will be failed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In its default mode, the experiment derives the random single/multiple replicas of Cassandra statefulset, performs a pod kill (delete), and checks the liveness and load distribution on the Cassandra ring across all replicas, which implies that the Cassandra statefulset remains alive and load redistribution takes place after every kill. If this is true, the experiment verdict is set to “pass,” indicating the current statefulset is tolerant to pod-failures. A terminated statefulset sets the verdict to “fail” and implies that the statefulset is not resilient enough, demanding a closer inspection.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt; Hypothesis &lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Upon killing the replica of Cassandra statefulset, the load will be re-distributed over the Cassandra ring.&lt;/li&gt;
&lt;li&gt;After the deletion of the replica, the new replica will be created by the replica controller to maintain the desired count of the available replicas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt; Preparing the Testbed &lt;/h2&gt;

&lt;h3&gt; Setup the Cassandra Cluster &lt;/h3&gt;

&lt;p&gt;We are going to discuss two approaches to set up the Cassandra cluster quickly.&lt;/p&gt;

&lt;ol&gt; &lt;li&gt;  This approach will guide you to set up a Cassandra cluster in AWS EKS with OpenEBS as a storage orchestration tool.
Follow the following tutorial to setup the cluster &lt;a href="https://mayadata.io/workloads/cassandra" rel="noopener noreferrer"&gt; Setup Cassandra Cluster on EKS&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  This approach will guide you to set up the Cassandra cluster in Minikube. We can follow the underlying steps to set up the Cassandra cluster. &lt;/li&gt; &lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt; Step-1: Creating a headless Service for Cassandra &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating the headless service for Cassandra which is used for DNS lookups between Cassandra Pods and clients within your cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# cat &amp;lt;&amp;lt;EOF &amp;gt; cassandra-service.yaml&lt;/span&gt;

&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Service&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;clusterIP&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;None&lt;/span&gt;
  &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9042&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl create -f cassandra-service.yaml -n cassandra&lt;/span&gt;
 &lt;span class="s"&gt;service/cassandra created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Validation of Cassandra service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 

&lt;span class="s"&gt;root@demo:~# kubectl get svc cassandra -n cassandra&lt;/span&gt; 
&lt;span class="na"&gt;The response is&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="s"&gt;NAME        TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)    AGE&lt;/span&gt;
     &lt;span class="s"&gt;cassandra   ClusterIP   None         &amp;lt;none&amp;gt;        9042/TCP   45s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you don't see a Service named Cassandra, that means creation failed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt; Step-2: Using a StatefulSet to create a Cassandra ring &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The StatefulSet manifest included below, creates a Cassandra ring that consists of three Pods.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Note:&lt;/code&gt; This example uses the default provisioner for Minikube. Please update the following StatefulSet for the cloud you are working with.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# cat &amp;lt;&amp;lt;EOF &amp;gt; cassandra-sts.yaml&lt;/span&gt; 

&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apps/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;StatefulSet&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;serviceName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;terminationGracePeriodSeconds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1800&lt;/span&gt;
      &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra&lt;/span&gt;
        &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gcr.io/google-samples/cassandra:v13&lt;/span&gt;
        &lt;span class="na"&gt;imagePullPolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Always&lt;/span&gt;
        &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7000&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;intra-node&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7001&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;tls-intra-node&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7199&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jmx&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9042&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cql&lt;/span&gt;
        &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;500m"&lt;/span&gt;
            &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1Gi&lt;/span&gt;
          &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;500m"&lt;/span&gt;
            &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1Gi&lt;/span&gt;
        &lt;span class="na"&gt;securityContext&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;IPC_LOCK&lt;/span&gt;
        &lt;span class="na"&gt;lifecycle&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;preStop&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;exec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
              &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/bin/sh&lt;/span&gt;
              &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;-c&lt;/span&gt;
              &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;nodetool drain&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MAX_HEAP_SIZE&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;512M&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HEAP_NEWSIZE&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;100M&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_SEEDS&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cassandra-0.cassandra.cassandra.svc.cluster.local"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_CLUSTER_NAME&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;K8Demo"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_DC&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DC1-K8Demo"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_RACK&lt;/span&gt;
            &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Rack1-K8Demo"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;POD_IP&lt;/span&gt;
            &lt;span class="na"&gt;valueFrom&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;fieldRef&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;fieldPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;status.podIP&lt;/span&gt;
        &lt;span class="na"&gt;readinessProbe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;exec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/bin/bash&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;-c&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/ready-probe.sh&lt;/span&gt;
          &lt;span class="na"&gt;initialDelaySeconds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;
          &lt;span class="na"&gt;timeoutSeconds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
        &lt;span class="c1"&gt;# These volume mounts are persistent. They are like inline claims,&lt;/span&gt;
        &lt;span class="c1"&gt;# but not exactly because the names need to match exactly one of&lt;/span&gt;
        &lt;span class="c1"&gt;# the stateful pod volumes.&lt;/span&gt;
        &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra-data&lt;/span&gt;
          &lt;span class="na"&gt;mountPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/cassandra_data&lt;/span&gt;
  &lt;span class="c1"&gt;# These are converted to volume claims by the controller&lt;/span&gt;
  &lt;span class="c1"&gt;# and mounted at the paths mentioned above.&lt;/span&gt;
  &lt;span class="c1"&gt;# do not use these in production until ssd GCEPersistentDisk or other ssd pd&lt;/span&gt;
  &lt;span class="na"&gt;volumeClaimTemplates&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra-data&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;accessModes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ReadWriteOnce"&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;storageClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fast&lt;/span&gt;
      &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;storage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1Gi&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;StorageClass&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;storage.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fast&lt;/span&gt;
&lt;span class="na"&gt;provisioner&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;k8s.io/minikube-hostpath&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pd-ssd&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl create -f cassandra-sts.yaml -n cassandra&lt;/span&gt;
&lt;span class="s"&gt;statefulset.apps/cassandra created&lt;/span&gt;
&lt;span class="s"&gt;storageclass.storage.k8s.io/fast created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;Validating the Cassandra StatefulSet&lt;/span&gt;
&lt;span class="s"&gt;root@demo:~# kubectl get statefulset cassandra -n cassandra&lt;/span&gt;

&lt;span class="na"&gt;The response should be similar to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="s"&gt;NAME        DESIRED   CURRENT   AGE&lt;/span&gt;
&lt;span class="s"&gt;cassandra   3         0         13s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl get pods -l="app=cassandra" -n cassandra&lt;/span&gt;

&lt;span class="s"&gt;It can take several minutes for all three Pods to deploy. Once they are deployed, the same command returns output similar to&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;

&lt;span class="s"&gt;NAME          READY     STATUS    RESTARTS   AGE&lt;/span&gt;
&lt;span class="s"&gt;cassandra-0   1/1       Running   0          10m&lt;/span&gt;
&lt;span class="s"&gt;cassandra-1   1/1       Running   0          9m&lt;/span&gt;
&lt;span class="s"&gt;cassandra-2   1/1       Running   0          8m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt; Step-3: Run the Cassandra nodetool inside the first Pod, to display the status of the ring. &lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;kubectl exec -it cassandra-0 -- nodetool status&lt;/span&gt;

&lt;span class="na"&gt;The response should look something like&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;span class="na"&gt;Datacenter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;DC1-K8Demo&lt;/span&gt;
&lt;span class="s"&gt;======================&lt;/span&gt;
&lt;span class="s"&gt;Status=Up/Down&lt;/span&gt;
&lt;span class="pi"&gt;|&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt; &lt;span class="err"&gt;State=Normal/Leaving/Joining/Moving&lt;/span&gt;
&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="s"&gt;-  Address     Load       Tokens       Owns (effective)  Host ID                               Rack&lt;/span&gt;
&lt;span class="err"&gt;U&lt;/span&gt;&lt;span class="s"&gt;N  172.17.0.5  83.57 KiB  32           74.0%             e2dd09e6-d9d3-477e-96c5-45094c08db0f  Rack1-K8Demo&lt;/span&gt;
&lt;span class="err"&gt;U&lt;/span&gt;&lt;span class="s"&gt;N  172.17.0.4  101.04 KiB  32           58.8%             f89d6835-3a42-4419-92b3-0e62cae1479c  Rack1-K8Demo&lt;/span&gt;
&lt;span class="err"&gt;U&lt;/span&gt;&lt;span class="s"&gt;N  172.17.0.6  84.74 KiB  32           67.1%             a6a1e8c2-3dc5-4417-b1a0-26507af2aaad  Rack1-K8Demo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;h3&gt; Setup the Litmus Infrastructure &lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;  Step-1: Install Litmus Chaos CRDs, Operator &amp;amp; RBAC &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl apply -f https://litmuschaos.github.io/litmus/litmus-operator-v2.11.0.yaml&lt;/span&gt;
&lt;span class="s"&gt;namespace/litmus created&lt;/span&gt;
&lt;span class="s"&gt;serviceaccount/litmus created&lt;/span&gt;
&lt;span class="s"&gt;clusterrole.rbac.authorization.k8s.io/litmus created&lt;/span&gt;
&lt;span class="s"&gt;clusterrolebinding.rbac.authorization.k8s.io/litmus created&lt;/span&gt;
&lt;span class="s"&gt;deployment.apps/chaos-operator-ce created customresourcedefinition.apiextensions.k8s.io/chaosengines.litmuschaos.io created&lt;/span&gt;
&lt;span class="s"&gt;customresourcedefinition.apiextensions.k8s.io/chaosexperiments.litmuschaos.io created&lt;/span&gt;
&lt;span class="s"&gt;customresourcedefinition.apiextensions.k8s.io/chaosresults.litmuschaos.io created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;kubectl apply -f https://litmuschaos.github.io/litmus/litmus-admin-rbac.yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;  Step-2: Create the Cassandra-Pod-Delete ChaosExperiment CR &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl apply -f https://hub.litmuschaos.io/api/chaos/2.11.0?file=charts/cassandra/cassandra-pod-delete/experiment.yaml -n litmus&lt;/span&gt;
&lt;span class="s"&gt;chaosexperiment.litmuschaos.io/cassandra-pod-delete created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt; Step-3: Annotate the Kafka statefulset for Chaos &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl annotate sts/cassandra litmuschaos.io/chaos="true" -n cassandra&lt;/span&gt; 
&lt;span class="s"&gt;statefulset.apps/cassandra annotated&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;h3&gt; Run the Chaos Experiment &lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt; Step-1: Construct the ChaosEngine for the Cassandra Pod Delete experiment: &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# cat &amp;lt;&amp;lt;EOF &amp;gt; cassandra-chaos.yaml&lt;/span&gt;

&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos.io/v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ChaosEngine&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra-chaos&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;default&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;appinfo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;appns&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;default'&lt;/span&gt;
    &lt;span class="na"&gt;applabel&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;app=cassandra'&lt;/span&gt;
    &lt;span class="na"&gt;appkind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;statefulset'&lt;/span&gt;
  &lt;span class="c1"&gt;# It can be active/stop&lt;/span&gt;
  &lt;span class="na"&gt;engineState&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;active'&lt;/span&gt;
  &lt;span class="c1"&gt;#ex. values: ns1:name=percona,ns2:run=nginx&lt;/span&gt;
  &lt;span class="na"&gt;auxiliaryAppInfo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;
  &lt;span class="na"&gt;chaosServiceAccount&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra-pod-delete-sa&lt;/span&gt;
  &lt;span class="na"&gt;experiments&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cassandra-pod-delete&lt;/span&gt;
      &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# set chaos duration (in sec) as desired&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TOTAL_CHAOS_DURATION&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;15'&lt;/span&gt;

            &lt;span class="c1"&gt;# set chaos interval (in sec) as desired&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CHAOS_INTERVAL&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;15'&lt;/span&gt;

            &lt;span class="c1"&gt;# pod failures without '--force' &amp;amp; default terminationGracePeriodSeconds&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;FORCE&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;false'&lt;/span&gt;

            &lt;span class="c1"&gt;# provide cassandra service name&lt;/span&gt;
            &lt;span class="c1"&gt;# default service: cassandra&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_SVC_NAME&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;cassandra'&lt;/span&gt;

            &lt;span class="c1"&gt;# provide the keyspace replication factor&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;KEYSPACE_REPLICATION_FACTOR&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3'&lt;/span&gt;

            &lt;span class="c1"&gt;# provide cassandra port &lt;/span&gt;
            &lt;span class="c1"&gt;# default port: 9042&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_PORT&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;9042'&lt;/span&gt;

            &lt;span class="c1"&gt;# SET THE CASSANDRA_LIVENESS_CHECK&lt;/span&gt;
            &lt;span class="c1"&gt;# IT CAN BE `enable` OR `disable`&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CASSANDRA_LIVENESS_CHECK&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;

             &lt;span class="c1"&gt;## percentage of total pods to target&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PODS_AFFECTED_PERC&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt; Step-2: Apply the ChaosEngine to launch the experiment &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl apply -f cassandra-chaos.yaml -n litmus&lt;/span&gt;
&lt;span class="s"&gt;chaosengine.litmuschaos.io/cassandra-chaos created&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt; Step-3: Observe experiment execution &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Watch the pods on the app namespace (cassandra) to view the chaos actions in progress.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;watch -n 1 kubectl get pods -n cassandra&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Look out for the following events.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The experiment job, as part of the experiment execution,
launches a liveness pod (cassandra-liveness) that runs few cqlsh queries (create keyspaces, create tables, data insertion, and cleanup of table &amp;amp; keyspaces) running
as separate containers of the same pod.&lt;/li&gt;
&lt;li&gt;The liveness pod is failed if it is unable to run cqlsh commands(Cassandra is unavailable). View
the cassandra-liveness pod logs during the pod-delete to verify the Uninterrupted availability of Cassandra statefulset.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;kubectl logs -f cassandra-liveness -n litmus&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt; Step-4: Verify Result Of the Chaos Experiment &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;View the verdict (spec.experimentStatus.verdict)of the cassandra-pod-delete chaos experiment to check whether the Cassandra cluster is resilient to the pod-delete.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;root@demo:~# kubectl describe chaosresult cassandra-chaos-cassandra-pod-delete -n litmus&lt;/span&gt;

&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;         &lt;span class="s"&gt;cassandra-chaos-cassandra-pod-delete&lt;/span&gt;
&lt;span class="na"&gt;Namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;    &lt;span class="s"&gt;litmus&lt;/span&gt;
&lt;span class="na"&gt;Labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;       &lt;span class="s"&gt;chaosUID=22d5ba06-1fe8-4b01-bdbb-6246e1cdb2c9&lt;/span&gt;
              &lt;span class="s"&gt;type=ChaosResult&lt;/span&gt;
&lt;span class="na"&gt;Annotations:  kubectl.kubernetes.io/last-applied-configuration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
                &lt;span class="pi"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apiVersion"&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;litmuschaos.io/v1alpha1"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kind"&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ChaosResult"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;metadata"&lt;/span&gt;&lt;span class="pi"&gt;:{&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;annotations"&lt;/span&gt;&lt;span class="pi"&gt;:{},&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;labels"&lt;/span&gt;&lt;span class="pi"&gt;:{&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chaosUID"&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;22d5ba06-1fe8-4b01-bdbb-62...&lt;/span&gt;
&lt;span class="s"&gt;API&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Version:&lt;/span&gt;&lt;span class="nv"&gt;  &lt;/span&gt;&lt;span class="s"&gt;litmuschaos.io/v1alpha1&lt;/span&gt;
&lt;span class="s"&gt;Kind:&lt;/span&gt;&lt;span class="nv"&gt;         &lt;/span&gt;&lt;span class="s"&gt;ChaosResult&lt;/span&gt;
&lt;span class="s"&gt;Metadata:&lt;/span&gt;
  &lt;span class="s"&gt;Creation&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Timestamp:&lt;/span&gt;&lt;span class="nv"&gt;  &lt;/span&gt;&lt;span class="s"&gt;2020-07-16T12:28:00Z&lt;/span&gt;
  &lt;span class="s"&gt;Generation:&lt;/span&gt;&lt;span class="nv"&gt;          &lt;/span&gt;&lt;span class="s"&gt;10&lt;/span&gt;
  &lt;span class="s"&gt;Resource&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Version:&lt;/span&gt;&lt;span class="nv"&gt;    &lt;/span&gt;&lt;span class="s"&gt;20451&lt;/span&gt;
  &lt;span class="s"&gt;Self&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Link:&lt;/span&gt;&lt;span class="nv"&gt;           &lt;/span&gt;&lt;span class="s"&gt;/apis/litmuschaos.io/v1alpha1/namespaces/litmus/chaosresults/cassandra-chaos-cassandra-pod-delete&lt;/span&gt;
  &lt;span class="s"&gt;UID:&lt;/span&gt;&lt;span class="nv"&gt;                 &lt;/span&gt;&lt;span class="s"&gt;32ea5093-47ee-41d8-bc34-e513edb46660&lt;/span&gt;
&lt;span class="s"&gt;Spec:&lt;/span&gt;
  &lt;span class="s"&gt;Engine:&lt;/span&gt;&lt;span class="nv"&gt;      &lt;/span&gt;&lt;span class="s"&gt;cassandra-chaos&lt;/span&gt;
  &lt;span class="s"&gt;Experiment:&lt;/span&gt;&lt;span class="nv"&gt;  &lt;/span&gt;&lt;span class="s"&gt;cassandra-pod-delete&lt;/span&gt;
&lt;span class="s"&gt;Status:&lt;/span&gt;
  &lt;span class="s"&gt;Experimentstatus:&lt;/span&gt;
    &lt;span class="s"&gt;Fail&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Step:&lt;/span&gt;&lt;span class="nv"&gt;  &lt;/span&gt;&lt;span class="s"&gt;N/A&lt;/span&gt;
    &lt;span class="s"&gt;Phase:&lt;/span&gt;&lt;span class="nv"&gt;      &lt;/span&gt;&lt;span class="s"&gt;Completed&lt;/span&gt;
    &lt;span class="s"&gt;Verdict:&lt;/span&gt;&lt;span class="nv"&gt;    &lt;/span&gt;&lt;span class="s"&gt;Pass&lt;/span&gt;
&lt;span class="s"&gt;Events:&lt;/span&gt;&lt;span class="nv"&gt;         &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;none&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;h2&gt; Conclusion &lt;/h2&gt;

&lt;p&gt;The Cassandra chaos experiments are a good way to determine a potential breach of SLAs in terms of data consistency, performance &amp;amp; timeouts due to unexpected replica-kill. It will boost the confidence of the developers for those use-cases for which their setup returns a positive/passed result. In the future even if that chaos happens naturally(finger crossed) then the developers don’t have to worry. They are already trained with chaos management skills as they are chaos engineers/warriors after the adoption of chaos engineering practices.&lt;br&gt;
Do try this experiment &amp;amp; let me know your findings!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you? Join Our Community #litmus channel in &lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;Kubernetes Slack&lt;/a&gt;&lt;br&gt;
Contribute to LitmusChaos and share your feedback on &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;br&gt;
If you like LitmusChaos, become one of the many stargazers &lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/litmuschaos" rel="noopener noreferrer"&gt;
        litmuschaos
      &lt;/a&gt; / &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;
        litmus
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Litmus helps  SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub  (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;&lt;a href="https://litmuschaos.io/" rel="nofollow noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://avatars.githubusercontent.com/u/49853472?s=200&amp;amp;v=4"&gt;&lt;img alt="LitmusChaos" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49853472%3Fs%3D200%26v%3D4" width="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Open Source Chaos Engineering Platform&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://slack.litmuschaos.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48844a2a28b222b400e3fbeb358770903bdcb4db693ac67fae37db71869352f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d4a6f696e2d707572706c65" alt="Slack Channel"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master"&gt;&lt;img src="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master" alt="GitHub Workflow"&gt;&lt;/a&gt;
&lt;a href="https://hub.docker.com/r/litmuschaos/chaos-operator" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2a2ae2b0d21ae55811e5da33f40b76a4aa18cd37d027ab13c5f3a4b6230ef55b/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6c69746d75736368616f732f6368616f732d6f70657261746f722e737667" alt="Docker Pulls"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e87b930f5b0b40039776ad0d255d62735311c7d7228bb7615d7408161915c0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c69746d75736368616f732f6c69746d75733f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2f66885a8b6af96fe90f93b8aa9085f6065fb43e9c0a4a602219a01e7a142548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c69746d75736368616f732f6c69746d7573" alt="GitHub issues"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/LitmusChaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6425eb889e05cdadcf0db2a952db7e9dda44ca3df091c5ca9feea8515a2ac44f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c69746d75736368616f733f7374796c653d736f6369616c" alt="Twitter Follow"&gt;&lt;/a&gt;
&lt;a href="https://www.bestpractices.dev/projects/3202" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a8d5ed826be562a3339ce503c6ff3f4ab2cc63227b18ba5f65648fdb3ca04eec/68747470733a2f2f7777772e626573747072616374696365732e6465762f70726f6a656374732f333230322f6261646765" alt="OpenSSF Best Practices"&gt;&lt;/a&gt;
&lt;a href="https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/848851b5714a120bc84e06ebdb121f455a4a472a782a90d6f4efb681fa9be392/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466c69746d75736368616f732532466c69746d75732e7376673f747970653d736869656c64" alt="FOSSA Status"&gt;&lt;/a&gt;
&lt;a href="https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8420bd8ea7dfc02f130445cdcf5f3adec631ea57f9682afc56af5940cc5ca044/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d726564" alt="YouTube Channel"&gt;&lt;/a&gt;
&lt;a href="https://gurubase.io/g/litmuschaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d14b84f34d827a00ea3da041c025456fa77e2143b06396c17636f4531500eb23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757275626173652d41736b2532304c69746d75734368616f73253230477572752d303036424646" alt="Gurubase"&gt;&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;&lt;em&gt;Read this in &lt;a href="https://github.com/litmuschaos/litmus/translations/TRANSLATIONS.md" rel="noopener noreferrer"&gt;other languages&lt;/a&gt;.&lt;/em&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/litmuschaos/litmus/translations/README-ko.md" rel="noopener noreferrer"&gt;🇰🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-chn.md" rel="noopener noreferrer"&gt;🇨🇳&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-pt-br.md" rel="noopener noreferrer"&gt;🇧🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-hi.md" rel="noopener noreferrer"&gt;🇮🇳&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses &amp;amp; potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers &amp;amp; SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles &amp;amp; community collaborated. It is 100% open source &amp;amp; a CNCF project.&lt;/p&gt;
&lt;p&gt;LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.&lt;/p&gt;
&lt;p&gt;At a high-level, Litmus comprises of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Control Plane&lt;/strong&gt;: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Execution Plane Services&lt;/strong&gt;: Made up of a…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>kubernetes</category>
      <category>docker</category>
      <category>litmuschaos</category>
      <category>chaosengineering</category>
    </item>
    <item>
      <title>Getting Started with Litmus SDK</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Tue, 16 Jun 2020 10:38:00 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/getting-started-with-litmus-sdk-358l</link>
      <guid>https://dev.to/litmus-chaos/getting-started-with-litmus-sdk-358l</guid>
      <description>&lt;p&gt;In this blog, I will talk about the generation of custom/new chaos experiment with the help of &lt;a href="https://github.com/litmuschaos/litmus-go" rel="noopener noreferrer"&gt; Litmus SDK &lt;/a&gt;. Before jumping in, let's do a quick recap on Litmus. Litmus is a framework for practicing Chaos Engineering in &lt;a href="https://dev.to/umamukkara/chaos-engineering-for-cloud-native-systems-2fjn"&gt; cloud-native environments&lt;/a&gt;. Litmus provides a chaos-operator, a large set of chaos experiments in its &lt;a href="https://hub.litmuschaos.io" rel="noopener noreferrer"&gt; HUB&lt;/a&gt;, detailed &lt;a href="https://docs.litmuschaos.io/docs/getstarted/" rel="noopener noreferrer"&gt; documentaion&lt;/a&gt;, quick &lt;a href="https://dev.to/uditgaurav/get-started-with-litmuschaos-in-minutes-4ke1"&gt; demo&lt;/a&gt;, and a friendly &lt;a href="https://litmuschaos.io" rel="noopener noreferrer"&gt;community&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcdmbnz9g0200z0geqp8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcdmbnz9g0200z0geqp8f.png" alt="Litmus Flow Diagram" width="800" height="1027"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt; What is Litmus SDK? &lt;/h1&gt;

&lt;p&gt;The Litmus SDK provides a simple way to bootstrap your experiment and helps create the aforementioned artifacts in the appropriate directory (i.e., as per the chaos-category) based on an attributes file provided as input by the chart-developer. The scaffolded files consist of placeholders which can then be filled as desired.&lt;/p&gt;

&lt;p&gt;It generates the custom chaos experiments with some default Pre &amp;amp; Post Chaos Checks (AUT &amp;amp; Auxiliary Applications status checks). It can use the existing chaoslib (present inside &lt;code&gt;/chaoslib&lt;/code&gt; directory), if available else It will create a new chaoslib inside the corresponding directory.&lt;/p&gt;

&lt;h2&gt; Life Cycle of a Chaos Experiment&lt;/h2&gt;

&lt;p&gt;Each Chaos Experiment is divided into six main sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Prepare:&lt;/b&gt; Prepare section contains the initialization steps (get ENVs), Updation of chaos result to marked the beginning of the chaos experiment.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;PreChaosCheck:&lt;/b&gt; PreChaosCheck contains some default checks (AUT &amp;amp; Auxiliary Application status check) and custom checks, which may vary on the basis of experiment i.e, liveness check, data persistence check, etc.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt; ChaosInject:&lt;/b&gt; ChaosInject invoke the actual chaos, It contain the main business logic.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt; CleanUp:&lt;/b&gt; CleanUp contains the steps to remove the helper/external pod, if any&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;PostChaosCheck:&lt;/b&gt; PostChaosCheck contains the similar steps as the PreCheckCheck section have. It used to ensure the resiliency after chaos injection.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt; Summary &lt;/b&gt; Summary updates the verdict(Pass/Fail) inside the chaos result and FailStep if the experiment fails.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft89sd1fyaabm2jqeqju7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft89sd1fyaabm2jqeqju7.png" alt="Alt Text" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Pre-requisites&lt;/h2&gt;

&lt;h3&gt;Go Experiments&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;go should be is available &amp;amp; the GOPATH env is configured appropriately&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Ansible Experiments&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;python3 is available (sudo apt-get install python3.6)&lt;/li&gt;
&lt;li&gt;jinja2 &amp;amp; pyYaml python packages are available (sudo apt-get install python3-pip, pip install jinja2, pip install pyYaml)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Steps to Generate Experiment via Litmus SDK&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clone the &lt;a href="https://github.com/litmuschaos/litmus-go" rel="noopener noreferrer"&gt;litmus-go&lt;/a&gt; repository for go experiments and &lt;a href="https://github.com/litmuschaos/litmus-ansible" rel="noopener noreferrer"&gt;litmus-ansible&lt;/a&gt; for the ansible experiments and navigate to the contribute/developer-guide folder.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;## for litmus-go&lt;/span&gt;
&lt;span class="s"&gt;$ git clone https://github.com/litmuschaos/litmus-go.git&lt;/span&gt;
&lt;span class="s"&gt;$ cd litmus-go/contribute/developer-guide&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;## for litmus-ansible&lt;/span&gt;
&lt;span class="s"&gt;$ git clone https://github.com/litmuschaos/litmus-ansible.git&lt;/span&gt;
&lt;span class="s"&gt;$ cd litmus-ansible/contribute/developer_guide&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Populate the attributes.yaml with details of the chaos experiment (or chart). Use the &lt;a href="https://github.com/litmuschaos/litmus-go/blob/master/contribute/developer-guide/attributes.yaml.sample" rel="noopener noreferrer"&gt;attributes.yaml.sample&lt;/a&gt; as reference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As an example, let us consider an experiment to kill one of the replicas of an Nginx deployment. The &lt;code&gt;attributes.yaml&lt;/code&gt; can be constructed like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$ cat attributes.yaml&lt;/span&gt; 

&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sample-pod-delete"&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.1.0"&lt;/span&gt;
&lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sample-category"&lt;/span&gt;
&lt;span class="na"&gt;repository&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://github.com/litmuschaos/litmus-go/tree/master/sample-category/pod-delete"&lt;/span&gt;
&lt;span class="na"&gt;community&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN"&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kills&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;nginx&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pods&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;in&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;random&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;manner"&lt;/span&gt;
&lt;span class="na"&gt;keywords&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pods"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kubernetes"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sample-category"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;nginx"&lt;/span&gt;
&lt;span class="na"&gt;scope&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Namespaced"&lt;/span&gt;
&lt;span class="na"&gt;auxiliaryappcheck&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;apigroups&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;batch"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;litmuschaos.io"&lt;/span&gt;
    &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jobs"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pods"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chaosengines"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chaosexperiments"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chaosresults"&lt;/span&gt;
    &lt;span class="na"&gt;verbs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;create"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;list"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;get"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;update"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;patch"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;delete"&lt;/span&gt;
&lt;span class="na"&gt;maturity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;alpha"&lt;/span&gt;
&lt;span class="na"&gt;maintainers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ispeakc0de"&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;shubham.chaudhary@harness.io"&lt;/span&gt;
&lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Harness"&lt;/span&gt;
&lt;span class="na"&gt;minkubernetesversion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1.12.0"&lt;/span&gt;
&lt;span class="na"&gt;references&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Documentation&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://docs.litmuschaos.io/docs/getstarted/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Run the following command to generate the necessary artifacts for submitting the sample-category chaos chart with pod-delete experiment.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;## litmus-go&lt;/span&gt;
&lt;span class="s"&gt;$ ./litmus-sdk generate &amp;lt;generate-type&amp;gt; -f=attributes.yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Note:&lt;/b&gt; Replace the &lt;code&gt;&amp;lt;generate-type&amp;gt;&lt;/code&gt;placeholder with the appropriate value based on the usecase:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;experiment:&lt;/code&gt; Chaos experiment artifacts belonging to a an existing OR new chart.

&lt;ul&gt;
&lt;li&gt;Provide the type of chaoslib in the &lt;code&gt;-t&lt;/code&gt; flag. It supports the following values

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;exec&lt;/code&gt;: It creates the exec based chaoslib(default type)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;helper&lt;/code&gt;: It creates the helper based chaoslib&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chart:&lt;/code&gt; Just the chaos-chart metadata, i.e., chartserviceversion yaml

&lt;ul&gt;
&lt;li&gt;Provide the type of chart in the &lt;code&gt;-t&lt;/code&gt; flag. It supports the following values

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;category&lt;/code&gt;: It creates the chart metadata for the category i.e chartserviceversion, package manifests&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;experiment&lt;/code&gt;: It creates the chart for the experiment i.e chartserviceversion, engine, rbac, experiment manifests&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;all&lt;/code&gt;: it creates both category and experiment charts (default type)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;provide the path of the &lt;code&gt;attribute.yaml&lt;/code&gt; manifest in the &lt;code&gt;-f&lt;/code&gt; flag.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;## litmus-ansible&lt;/span&gt;
&lt;span class="s"&gt;$ python3 generate_chart.py --attributes_file=attributes.yaml --generate_type=experiment&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Note:&lt;/b&gt; In the &lt;code&gt;--generate_type&lt;/code&gt; flag, select the appropriate type of manifests to be generated, where,

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;chart:&lt;/code&gt; Just the chaos-chart metadata, i.e, chartserviceversion yaml&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;experiment:&lt;/code&gt; Chaos experiment artifacts belonging to an existing or new chart.&lt;/li&gt;
&lt;li&gt;provide the path of the &lt;code&gt;attribute.yaml&lt;/code&gt; manifest in the &lt;code&gt;--attributes_file&lt;/code&gt; flag.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Verify the Generated Files&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$ cd /experiments&lt;/span&gt;

&lt;span class="s"&gt;$ ls -ltr&lt;/span&gt;

&lt;span class="s"&gt;total &lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;
&lt;span class="s"&gt;drwxr-xr-x 3 shubham shubham 4096 May 15 12:02 generic/&lt;/span&gt;
&lt;span class="s"&gt;drwxr-xr-x 3 shubham shubham 4096 May 15 13:26 sample-category/&lt;/span&gt;


&lt;span class="s"&gt;$ ls -ltr sample-category/&lt;/span&gt;

&lt;span class="s"&gt;total &lt;/span&gt;&lt;span class="m"&gt;12&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham   41 May 15 13:26 sample-category.package.yaml&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  734 May 15 13:26 sample-category.chartserviceversion.yaml&lt;/span&gt;
&lt;span class="s"&gt;drwxr-xr-x 2 shubham shubham 4096 May 15 13:26 sample-pod-delete/&lt;/span&gt;

&lt;span class="s"&gt;$ ls -ltr sample-category/sample-pod-delete&lt;/span&gt;

&lt;span class="s"&gt;total &lt;/span&gt;&lt;span class="m"&gt;28&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  791 May 15 13:26 rbac.yaml&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  734 May 15 13:26 sample-pod-delete.chartserviceversion.yaml&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  792 May 15 13:26 experiment.yaml&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  813 May 15 13:26 engine.yaml&lt;/span&gt;
&lt;span class="c1"&gt;## this file will be created in case of litmus-go&lt;/span&gt;
&lt;span class="s"&gt;--rw-r--r-- 1 shubham shubham 4096 May 15 13:26 test&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham 4533 May 15 13:26 sample-pod-delete.go&lt;/span&gt;
&lt;span class="c1"&gt;## this file will be created in case of litmus-ansible&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham 1777 May 15 13:26 pod-delete-k8s-job.yml&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham 4533 May 15 13:26 pod-delete-ansible-logic.yml&lt;/span&gt;

&lt;span class="s"&gt;$ ls -ltr sample-category/sample-pod-delete/test&lt;/span&gt;

&lt;span class="s"&gt;total &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="s"&gt;-rw-r--r-- 1 shubham shubham  1039 May 15 13:26 test.yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Proceed with construction of business logic inside the &lt;code&gt;pod-delete.go&lt;/code&gt; file in litmus-go or pod-delete-ansible-logic.yml in litmus-ansible, by making the appropriate modifications listed below to achieve the desired effect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;variables&lt;/li&gt;
&lt;li&gt;entry &amp;amp; exit criteria checks for the experiment&lt;/li&gt;
&lt;li&gt;helper utils in either pkg or new base chaos libraries&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the &lt;code&gt;experiment.yaml&lt;/code&gt; with the right chaos params in the &lt;code&gt;spec.definition.env&lt;/code&gt; with their default values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the &lt;code&gt;chaoslib/litmus/sample-pod-delete/lib/pod-delete.go&lt;/code&gt; chaoslib to achieve the desired effect or reuse the existing chaoslib.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create an experiment README explaining, briefly, the what, why &amp;amp; how of the experiment to aid users of this experiment.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Steps to Test Experiment&lt;/h2&gt;

&lt;p&gt;Follow the &lt;a href="https://dev.to/ksatchit/litmus-sdk-devtest-your-chaos-experiments-with-okteto-4dkj"&gt;Litmus SDK: DevTest your chaos experiments with Okteto&lt;/a&gt; blog to test the generated experiment.&lt;/p&gt;

&lt;h3&gt;Steps to Include the Chaos Charts/Experiments into the ChartHub&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Send a PR to the &lt;code&gt;litmus-go/litmus-go&lt;/code&gt; repo with the modified experiment files i.e, &lt;a href="https://github.com/litmuschaos/litmus-go/pull/25" rel="noopener noreferrer"&gt;pod-memory-hog&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Send a PR to the chaos-charts repo with the modified experiment CR, experiment chartserviceversion, chaos chart (category-level) chartserviceversion &amp;amp; package (if applicable) YAMLs i.e, &lt;a href="https://github.com/litmuschaos/chaos-charts/pull/239" rel="noopener noreferrer"&gt;kubelet service kill&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Litmus SDK will help developers &amp;amp; SREs to create their custom chaos experiment on demand. It will generate the templates, pre/post chaos checks, chaoslib (which can be modified according to use-case).&lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you? Join Our Community #litmus channel in &lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;Kubernetes Slack&lt;/a&gt;&lt;br&gt;
Contribute to LitmusChaos and share your feedback on &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;br&gt;
If you like LitmusChaos, become one of the many stargazers &lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/litmuschaos" rel="noopener noreferrer"&gt;
        litmuschaos
      &lt;/a&gt; / &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;
        litmus
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Litmus helps  SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub  (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;&lt;a href="https://litmuschaos.io/" rel="nofollow noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://avatars.githubusercontent.com/u/49853472?s=200&amp;amp;v=4"&gt;&lt;img alt="LitmusChaos" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49853472%3Fs%3D200%26v%3D4" width="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Open Source Chaos Engineering Platform&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://slack.litmuschaos.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48844a2a28b222b400e3fbeb358770903bdcb4db693ac67fae37db71869352f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d4a6f696e2d707572706c65" alt="Slack Channel"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master"&gt;&lt;img src="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master" alt="GitHub Workflow"&gt;&lt;/a&gt;
&lt;a href="https://hub.docker.com/r/litmuschaos/chaos-operator" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2a2ae2b0d21ae55811e5da33f40b76a4aa18cd37d027ab13c5f3a4b6230ef55b/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6c69746d75736368616f732f6368616f732d6f70657261746f722e737667" alt="Docker Pulls"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e87b930f5b0b40039776ad0d255d62735311c7d7228bb7615d7408161915c0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c69746d75736368616f732f6c69746d75733f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2f66885a8b6af96fe90f93b8aa9085f6065fb43e9c0a4a602219a01e7a142548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c69746d75736368616f732f6c69746d7573" alt="GitHub issues"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/LitmusChaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6425eb889e05cdadcf0db2a952db7e9dda44ca3df091c5ca9feea8515a2ac44f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c69746d75736368616f733f7374796c653d736f6369616c" alt="Twitter Follow"&gt;&lt;/a&gt;
&lt;a href="https://www.bestpractices.dev/projects/3202" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a8d5ed826be562a3339ce503c6ff3f4ab2cc63227b18ba5f65648fdb3ca04eec/68747470733a2f2f7777772e626573747072616374696365732e6465762f70726f6a656374732f333230322f6261646765" alt="OpenSSF Best Practices"&gt;&lt;/a&gt;
&lt;a href="https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/848851b5714a120bc84e06ebdb121f455a4a472a782a90d6f4efb681fa9be392/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466c69746d75736368616f732532466c69746d75732e7376673f747970653d736869656c64" alt="FOSSA Status"&gt;&lt;/a&gt;
&lt;a href="https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8420bd8ea7dfc02f130445cdcf5f3adec631ea57f9682afc56af5940cc5ca044/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d726564" alt="YouTube Channel"&gt;&lt;/a&gt;
&lt;a href="https://gurubase.io/g/litmuschaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d14b84f34d827a00ea3da041c025456fa77e2143b06396c17636f4531500eb23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757275626173652d41736b2532304c69746d75734368616f73253230477572752d303036424646" alt="Gurubase"&gt;&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;&lt;em&gt;Read this in &lt;a href="https://github.com/litmuschaos/litmus/translations/TRANSLATIONS.md" rel="noopener noreferrer"&gt;other languages&lt;/a&gt;.&lt;/em&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/litmuschaos/litmus/translations/README-ko.md" rel="noopener noreferrer"&gt;🇰🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-chn.md" rel="noopener noreferrer"&gt;🇨🇳&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-pt-br.md" rel="noopener noreferrer"&gt;🇧🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-hi.md" rel="noopener noreferrer"&gt;🇮🇳&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses &amp;amp; potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers &amp;amp; SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles &amp;amp; community collaborated. It is 100% open source &amp;amp; a CNCF project.&lt;/p&gt;
&lt;p&gt;LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.&lt;/p&gt;
&lt;p&gt;At a high-level, Litmus comprises of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Control Plane&lt;/strong&gt;: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Execution Plane Services&lt;/strong&gt;: Made up of a…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>kubernetes</category>
      <category>docker</category>
      <category>litmuschaos</category>
      <category>chaosengineering</category>
    </item>
  </channel>
</rss>
