<?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: Udit Gaurav</title>
    <description>The latest articles on DEV Community by Udit Gaurav (@uditgaurav).</description>
    <link>https://dev.to/uditgaurav</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%2F404232%2F5e566198-83b5-4947-82cd-34927000f347.jpeg</url>
      <title>DEV Community: Udit Gaurav</title>
      <link>https://dev.to/uditgaurav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uditgaurav"/>
    <language>en</language>
    <item>
      <title>LitmusChaos: Node Memory Hog Experiment</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Fri, 09 Apr 2021 12:18:54 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/litmuschaos-node-memory-hog-experiment-2nj6</link>
      <guid>https://dev.to/litmus-chaos/litmuschaos-node-memory-hog-experiment-2nj6</guid>
      <description>&lt;p&gt;In this blog, I will be discussing the LitmusChaos experiment that is used to exhaust the available memory resource on a Kubernetes node called &lt;a href="https://docs.litmuschaos.io/docs/node-memory-hog/" rel="noopener noreferrer"&gt;Node Memory Hog&lt;/a&gt;. The main focus will be on the memory consumption and monitoring techniques used for the experiment. Before moving forward for those who are new to litmus and wanted to explore more about litmus features or chaos engineering in general, I would recommend checking out the &lt;a href="https://dev.to/umamukkara/litmuschaos-in-cncf-sandbox-3j57"&gt;litmus&lt;/a&gt; blog first also Litmus provides a chaos operator, a large set of chaos experiments on 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;, and a friendly &lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;community&lt;/a&gt; do checkout them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you’ll need
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;For running this experiment you should have:&lt;/em&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes 1.11 or later&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.litmuschaos.io/docs/getstarted/#install-litmus" rel="noopener noreferrer"&gt;Litmus Installed&lt;/a&gt; 1.12.2 or later in the Cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it’ll break
&lt;/h2&gt;

&lt;p&gt;The Node Memory Hog experiment causes Memory resource exhaustion on the Kubernetes node which may lead to the eviction or unusual behavior of the application running on the cluster depending upon the extent up to which we exhaust the memory resource of the application node. The experiment uses a stress-ng tool to inject memory chaos.&lt;/p&gt;

&lt;p&gt;The extent up to which we want to consume the node memory resource can be provided in two modes (from litmus 1.12.2):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the percentage of the total memory capacity of the Node. &lt;/li&gt;
&lt;li&gt;In the Mebibytes unit to consume available memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll demonstrate the experiment in both modes in upcoming sections. In both cases,  the experiment consumes a set amount of memory, or as much as is available (whichever is lower), and holds onto it for the duration of the chaos.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Ready To Induce Memory Chaos On Kubernetes Node
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Infrastructure
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I'll be using a three-node GKE cluster of type &lt;code&gt;e2-standard-2&lt;/code&gt; (having 2 vCPU and 8 GB Memory).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@cloudshell:&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get nodes
NAME                                       STATUS   ROLES    AGE    VERSION
gke-cluster-1-default-pool-3020340d-3vns   Ready    &amp;lt;none&amp;gt;   111s   v1.17.14-gke.400
gke-cluster-1-default-pool-3020340d-jfg6   Ready    &amp;lt;none&amp;gt;   111s   v1.17.14-gke.400
gke-cluster-1-default-pool-3020340d-k0lv   Ready    &amp;lt;none&amp;gt;   111s   v1.17.14-gke.400
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Monitor the Node Memory resource
&lt;/h4&gt;

&lt;p&gt;We can monitor the node memory resource consumption:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;By &lt;code&gt;ssh&lt;/code&gt; into the target node and run &lt;code&gt;htop&lt;/code&gt;(if not available then install and run) OR&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By Creating a pod on the target node having &lt;code&gt;htop&lt;/code&gt; container for monitoring.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;htop is an interactive system-monitor and process viewer tool for Unix:&lt;br&gt;
We will use the &lt;em&gt;second&lt;/em&gt; way to monitor the host memory resource. We'll not get the process information responsible for eating the memory resource in this way but we can have a watch over the current(consumed/total) memory. Follow the steps to setup the monitoring pod:&lt;/p&gt;

&lt;p&gt;Create the monitoring file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim myhtop.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Add the following to the myhtop.yaml&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="nn"&gt;---&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;Pod&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;myhtop&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;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;myhtop&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;litmuschaos/go-runner:ci&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;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sh'&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-c'&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sleep&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;3600'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="c1"&gt;## Replace this with the target node name...&lt;/span&gt;
  &lt;span class="na"&gt;nodeName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gke-cluster-1-default-pool-3020340d-3vns&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Create the myhtop pod:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@cloudshell:&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; myhtop.yaml
pod/myhtop created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;br&gt;
NOTE: To monitor more than one node you can use DaemonSet or Deployment.&lt;br&gt;
&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now exec into the pod and run htop command:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; myhtop &lt;span class="nt"&gt;--&lt;/span&gt; /bin/sh
/litmus &lt;span class="nv"&gt;$ &lt;/span&gt;htop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Output will look like this:&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%2Fyweil8okdaxfgogwvo0b.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%2Fyweil8okdaxfgogwvo0b.png" alt="Screenshot from 2021-01-29 20-10-43" width="800" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The memory row in the output is representing that the node size is &lt;code&gt;7.77G&lt;/code&gt; out of which &lt;code&gt;502M&lt;/code&gt; is in use.&lt;/p&gt;
&lt;h4&gt;
  
  
  Deploy an Nginx application as AUT
&lt;/h4&gt;

&lt;p&gt;We'll now deploy the Nginx application as Application Under Test.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; https://raw.githubusercontent.com/litmuschaos/chaos-ci-lib/master/app/nginx.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This will deploy an Nginx application with three replicas. It is &lt;strong&gt;Optional&lt;/strong&gt; to deploy an application for running a node memory experiment we do this to check the application behavior(its availability)under chaos. A general observation after deploying the application is a slight increase in memory usage from &lt;code&gt;502M&lt;/code&gt;(to &lt;code&gt;518M&lt;/code&gt;) as one replica of the application pod was scheduled on the target node. For heavy application, it will be definitely more.&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%2Fggovnc555uo8d029xzxi.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%2Fggovnc555uo8d029xzxi.png" alt="Screenshot from 2021-01-29 20-56-37" width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Setup Litmus and run chaos
&lt;/h4&gt;

&lt;p&gt;Install litmus to run the experiment if not already installed.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; https://litmuschaos.github.io/litmus/litmus-operator-latest.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For running chaos follow the instructions from experiment &lt;a href="https://docs.litmuschaos.io/docs/node-memory-hog/" rel="noopener noreferrer"&gt;docs&lt;/a&gt; and create the CRs using &lt;a href="https://hub.litmuschaos.io/generic/node-memory-hog" rel="noopener noreferrer"&gt;hub&lt;/a&gt;. This will include the creation of RBAC, experiment, and engine(with appinfo and memory consumption values). When all the resources are created and the experiment starts executing in a traditional litmus way a runner pod will get created that will create the experiment pod for chaos execution.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@cloudshell:&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl get pods
NAME                           READY   STATUS    RESTARTS   AGE
myhtop                         1/1     Running   1          61m
nginx-756f79d98d-47d5f         1/1     Running   0          47m
nginx-756f79d98d-q48dv         1/1     Running   0          47m
nginx-756f79d98d-sqrfz         1/1     Running   0          47m
nginx-chaos-runner             1/1     Running   0          31s
node-memory-hog-47m4k0-pz9tx   1/1     Running   0          27s
node-memory-hog-bdvnde         1/1     Running   0          12s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Run and Monitor Node Memory hog Chaos
&lt;/h2&gt;

&lt;p&gt;As we discussed in previous sections that we can run the node memory hog experiment in two different modes.&lt;/p&gt;
&lt;h4&gt;
  
  
  In Percentage Mode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By using the Percentage of total memory resource capacity of the node.&lt;/strong&gt; In this mode, we use &lt;code&gt;MEMORY_CONSUMPTION_PERCENTAGE&lt;/code&gt; env in chaosengine to provide the input percentage example &lt;code&gt;50&lt;/code&gt;(without percentage symbol) for &lt;code&gt;50%&lt;/code&gt; of total node capacity which is &lt;code&gt;7.77G&lt;/code&gt;. After running the chaos we can monitor the memory consumption from htop terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Expectation:&lt;/strong&gt; The 50% of total memory(&lt;code&gt;7.77G&lt;/code&gt;)  that is &lt;code&gt;3.885G&lt;/code&gt; Memory should be consumed.&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%2Feqchsvta6bjoa9e0vusk.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%2Feqchsvta6bjoa9e0vusk.png" alt="Screenshot from 2021-01-29 21-11-30" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observation:&lt;/strong&gt; We observe that the memory consumption is in between &lt;code&gt;3.56G&lt;/code&gt; to &lt;code&gt;3.93G&lt;/code&gt;. It is more fluctuating when compared with Mebibytes mode of execution.&lt;/p&gt;
&lt;h4&gt;
  
  
  In Mebibytes Mode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By using the Mebibytes unit to consume available memory.&lt;/strong&gt; In this mode, we use &lt;code&gt;MEMORY_CONSUMPTION_MEBIBYTES&lt;/code&gt; env in chaosengine to provide the input in Mebibytes example &lt;code&gt;3500&lt;/code&gt;(without Mebibytes symbol) for consuming nearly &lt;code&gt;3.5G&lt;/code&gt; of available node memory. After running the chaos we can monitor the memory consumption from htop terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Expectation:&lt;/strong&gt; The &lt;code&gt;3.5G&lt;/code&gt; of available memory to be consumed apart of 518M that was already in use. So the total amount of memory to be consumed should be nearly &lt;code&gt;4.0G&lt;/code&gt;.&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%2Fm97i4igp0yie8xgxftxh.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%2Fm97i4igp0yie8xgxftxh.png" alt="Screenshot from 2021-01-29 21-47-10" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observation:&lt;/strong&gt; From the above output we can observe that the memory consumed is &lt;code&gt;3.94G&lt;/code&gt; which is near to  &lt;code&gt;4.0G&lt;/code&gt;. This mode of execution is less fluctuating and more accurate than the percentage mode.&lt;/p&gt;
&lt;h2&gt;
  
  
  Analysing The Memory Spike On Node
&lt;/h2&gt;

&lt;p&gt;Now let us try to analyze the Memory Spike over the target nodes as the experiment takes memory from the process, simulating a massive memory burst. This could cause extreme memory demands to see how the API would identify and rectify such an issue. For analyzing the experiment behavior let's plot a memory hog graph which tells us about the different parameters like active memory bytes, free and available memory bytes, cpu usage, and disk read time.&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%2Fuploads%2Farticles%2Fi41uionh1pdl1lhpxnup.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%2Fuploads%2Farticles%2Fi41uionh1pdl1lhpxnup.png" alt="Screenshot from 2021-02-22 03-41-55" width="800" height="396"&gt;&lt;/a&gt;&lt;br&gt;
In the above graph, the highlighted area marks the area under chaos. We can note the moment we start the experiment the free and available memory bytes spike up which represents that more amount of available or free bytes are consumed during the chaos and a very limited amount of memory is left to use. Similarly, the active memory and average free along with cache memory drop down which indicates the limited space left on the nodes.&lt;/p&gt;

&lt;p&gt;Now let us try to max-out the memory consumption by the Kubernetes nodes and analyze the real memory consumption using htop, free -m, and kubectl top(metrics-server) commands. &lt;/p&gt;

&lt;p&gt;We’ll re-run the experiment to check the upper limit of the memory consumption by changing the &lt;code&gt;MEMORY_CONSUMPTION_PERCENTAGE&lt;/code&gt; value to consume 100 % of memory (that is 7.77G)  in the chaosengine. To rerun the experiment we just need to create the chaosengine again with new inputs this time. And check the output using kubectl top (metrics-server), htop, free -m.&lt;/p&gt;
&lt;h2&gt;
  
  
  kubectl top Vs htop Vs free -m
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;kubectl top (metrics-server):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The kubectl top command returns current CPU and memory usage for a cluster’s pods or nodes. kubectl top pod uses a memory working set, the output of the kubectl top will be similar to the value of the metric "container_memory_working_set_bytes" in Prometheus.&lt;br&gt;
If we run this query in Prometheus:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;container_memory_working_set_bytes&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;pod_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~&lt;span class="s2"&gt;"&amp;lt;pod-name&amp;gt;"&lt;/span&gt;, &lt;span class="nv"&gt;container_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~&lt;span class="s2"&gt;"&amp;lt;container-name&amp;gt;"&lt;/span&gt;, container_name!&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"POD"&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you will get value in bytes that almost matches the output of kubectl top nodes. &lt;/p&gt;

&lt;p&gt;We observe from the latest experiment run along with 100% of memory consumption, the memory usage output from kubectl top reached a maximum up to 92% and fluctuated between 70-90%.&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%2Fuploads%2Farticles%2F3s09w7soydq0sgrkgyf4.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%2Fuploads%2Farticles%2F3s09w7soydq0sgrkgyf4.png" alt="Screenshot from 2021-04-09 16-26-38" width="800" height="154"&gt;&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%2Fuploads%2Farticles%2Fmv76io30sz50xkw7ukdo.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%2Fuploads%2Farticles%2Fmv76io30sz50xkw7ukdo.png" alt="Screenshot from 2021-04-09 16-27-02" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;htop:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;htop is similar or alternative to the top command that is much easier to use for normal tasks. It is a cross-platform interactive process viewer.&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%2Fuploads%2Farticles%2Fkk89ztjwifwdvq3usvj0.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%2Fuploads%2Farticles%2Fkk89ztjwifwdvq3usvj0.png" alt="Screenshot from 2021-04-09 16-26-20" width="800" height="97"&gt;&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%2Fuploads%2Farticles%2Fspbbtdkgyfkb6crt2exj.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%2Fuploads%2Farticles%2Fspbbtdkgyfkb6crt2exj.png" alt="Screenshot from 2021-04-09 16-26-42" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The amount of memory consumption will raise to 6G.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;free -m:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;free is another useful command in Linux to get a detailed report on the system’s memory usage. When used without any option, the free command will display information about the memory and swap in kibibyte. 1 kibibyte (KiB) is 1024 byte. To get the vales in megabytes we need to use &lt;code&gt;free -m&lt;/code&gt;.&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%2Fuploads%2Farticles%2Fowk9t0h9949btmlc0oj9.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%2Fuploads%2Farticles%2Fowk9t0h9949btmlc0oj9.png" alt="Screenshot from 2021-04-09 16-26-35" width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The experiment will not consume/hog the memory greater than the total memory available on Node in other words there will always be an upper limit for the amount of memory to be consumed equal to the total available memory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is more fluctuation in the memory consumption when we provide the amount of memory to be consumed in percentage while providing the memory in mebibytes will be less fluctuating but we need to make sure that we should not exceed the available memory otherwise our experiment helpe pod will get evicted.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  What happens when both modes are provided
&lt;/h2&gt;

&lt;p&gt;There are cases when both ENVs are provided or non of them are provided. Then priority will be given according to the following table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;MEMORY_CONSUMPTION_PERCENTAGE&lt;/th&gt;
    &lt;th&gt;MEMORY_CONSUMPTION_MEBIBYTES&lt;/th&gt;
    &lt;th&gt;Priority&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Defined&lt;/td&gt;
    &lt;td&gt;Not Defined&lt;/td&gt;
    &lt;td&gt;Percentage&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Defined&lt;/td&gt;
    &lt;td&gt;Defined&lt;/td&gt;
    &lt;td&gt;Percentage&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Not Defined&lt;/td&gt;
    &lt;td&gt;Defined&lt;/td&gt;
    &lt;td&gt;Memory in Mebibytes&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Not Defined&lt;/td&gt;
    &lt;td&gt;Not Defined&lt;/td&gt;
    &lt;td&gt;Default with 30%&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;WARNING: When a large amount of available memory is consumed like 95% or 100% of available memory then some services may stop working for a certain duration and the node may get crashed and go into a NotReady state.&lt;br&gt;
&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You have installed litmus on your Kubernetes cluster and learned to execute LitmusChaos node memory hog experiments in different modes and at different values. You also configure a monitoring pod on the node using htop unix command. You also came across the different cases of node memory hog execution and its validation. If you haven't tried the experiment yet this is the best time for you to start and don't forget to give your opinion and share your feedback/experience with litmus in the comments below.&lt;/p&gt;



&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>
    </item>
    <item>
      <title>Multiarch Support In LitmusChaos</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Mon, 07 Dec 2020 09:10:19 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/multiarch-support-in-litmuschaos-34da</link>
      <guid>https://dev.to/litmus-chaos/multiarch-support-in-litmuschaos-34da</guid>
      <description>&lt;p&gt;In this blog, I will be discussing how to build a multi-arch image for any desired docker architecture to run litmus chore components. For those who are new to litmus and wanted to explore more about &lt;a href="https://dev.to/umamukkara/chaos-engineering-for-cloud-native-systems-2fjn"&gt;chaos engineering&lt;/a&gt;, I would recommend to check out &lt;a href="https://dev.to/umamukkara/litmuschaos-in-cncf-sandbox-3j57"&gt;litmus blog&lt;/a&gt;. Now coming back to the topic we will be using docker buildx for building the images in the following sections.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Docker(version 19.03)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Understanding Multiarch Builds&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Docker introduced the principle of multi-arch builds to support the "Build once, deploy anywhere" concept which helps to use ARM targets and reduce your bills such as &lt;em&gt;AWS A1&lt;/em&gt; and &lt;em&gt;Raspberry Pis&lt;/em&gt; instances. But how do we produce them? and How do they work? &lt;br&gt;
A multi-arch Docker image supports a different architecture behind the same imagetag. Let's compare the manifest of the multi-arch image with the image having a single arch. &lt;/p&gt;

&lt;p&gt;Enable docker CLI if not already enabled using the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;export DOCKER_CLI_EXPERIMENTAL=enabled&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;"experimental": "enabled",&lt;/code&gt; to &lt;code&gt;~/.docker/config.json&lt;/code&gt; (default location) at the beginning of the file and not at the end.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Image with single arch manifest&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;docker manifest inspect &lt;span class="nt"&gt;--verbose&lt;/span&gt; litmuschaos/go-runner:1.9.0
&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"Ref"&lt;/span&gt;: &lt;span class="s2"&gt;"docker.io/litmuschaos/go-runner:1.9.0"&lt;/span&gt;,
    &lt;span class="s2"&gt;"Descriptor"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
        &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:bc14ce592d7d600eb14c0b6dbfb0f6e8211f7795b5bc9def057cba6b3c994185"&lt;/span&gt;,
        &lt;span class="s2"&gt;"size"&lt;/span&gt;: 2002,
        &lt;span class="s2"&gt;"platform"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"architecture"&lt;/span&gt;: &lt;span class="s2"&gt;"amd64"&lt;/span&gt;,
            &lt;span class="s2"&gt;"os"&lt;/span&gt;: &lt;span class="s2"&gt;"linux"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;,
    &lt;span class="s2"&gt;"SchemaV2Manifest"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"schemaVersion"&lt;/span&gt;: 2,
        &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
        &lt;span class="s2"&gt;"config"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.container.image.v1+json"&lt;/span&gt;,
            &lt;span class="s2"&gt;"size"&lt;/span&gt;: 5502,
            &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:79fc16e2bbab6885589bd491c5ebf68c693239b8dbf13d45223b84e1a3aaa25b"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="s2"&gt;"layers"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt; ... &lt;span class="o"&gt;]&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;Multi arch image manifest&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;docker manifest inspect &lt;span class="nt"&gt;--verbose&lt;/span&gt; litmuschaos/go-runner:1.10.0
&lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"Ref"&lt;/span&gt;: &lt;span class="s2"&gt;"docker.io/litmuschaos/go-runner:1.10.0@sha256:89717f4c87c7fc93c63d2d74c54c5e4457dd99dd37b1bbda3bbbabfc0f2eacb4"&lt;/span&gt;,
        &lt;span class="s2"&gt;"Descriptor"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
            &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:89717f4c87c7fc93c63d2d74c54c5e4457dd99dd37b1bbda3bbbabfc0f2eacb4"&lt;/span&gt;,
            &lt;span class="s2"&gt;"size"&lt;/span&gt;: 2207,
            &lt;span class="s2"&gt;"platform"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"architecture"&lt;/span&gt;: &lt;span class="s2"&gt;"arm64"&lt;/span&gt;,
                &lt;span class="s2"&gt;"os"&lt;/span&gt;: &lt;span class="s2"&gt;"linux"&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="s2"&gt;"SchemaV2Manifest"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
            &lt;span class="s2"&gt;"schemaVersion"&lt;/span&gt;: 2,
            &lt;span class="s2"&gt;"config"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.container.image.v1+json"&lt;/span&gt;,
                &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:959a3aa87f6ae3add03a5a568d218e99e9394c785d924e5d6398d7cb4be0f472"&lt;/span&gt;,
                &lt;span class="s2"&gt;"size"&lt;/span&gt;: 5123
            &lt;span class="o"&gt;}&lt;/span&gt;,
            &lt;span class="s2"&gt;"layers"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt; ... &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;,
    &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"Ref"&lt;/span&gt;: &lt;span class="s2"&gt;"docker.io/litmuschaos/go-runner:1.10.0@sha256:04cec97644444d564e256e87184e0daa73f3f335d187c65a1723f0f8dc61ad22"&lt;/span&gt;,
        &lt;span class="s2"&gt;"Descriptor"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
            &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:04cec97644444d564e256e87184e0daa73f3f335d187c65a1723f0f8dc61ad22"&lt;/span&gt;,
            &lt;span class="s2"&gt;"size"&lt;/span&gt;: 2210,
            &lt;span class="s2"&gt;"platform"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"architecture"&lt;/span&gt;: &lt;span class="s2"&gt;"amd64"&lt;/span&gt;,
                &lt;span class="s2"&gt;"os"&lt;/span&gt;: &lt;span class="s2"&gt;"linux"&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;,
        &lt;span class="s2"&gt;"SchemaV2Manifest"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.distribution.manifest.v2+json"&lt;/span&gt;,
            &lt;span class="s2"&gt;"schemaVersion"&lt;/span&gt;: 2,
            &lt;span class="s2"&gt;"config"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"mediaType"&lt;/span&gt;: &lt;span class="s2"&gt;"application/vnd.docker.container.image.v1+json"&lt;/span&gt;,
                &lt;span class="s2"&gt;"digest"&lt;/span&gt;: &lt;span class="s2"&gt;"sha256:679ad1c72c9be392b47b3fc6c455c383e28b8fcdbcf923dd5fb9db2cfb5c3cc2"&lt;/span&gt;,
                &lt;span class="s2"&gt;"size"&lt;/span&gt;: 5125
            &lt;span class="o"&gt;}&lt;/span&gt;,
            &lt;span class="s2"&gt;"layers"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt; ... &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We can observe that the manifest for the multi-arch image is a simple list of manifests prepared for each platform while an image with a single arch will have only one platform in its manifest.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Build Multi-arch image for Litmus Components&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For building a multi-arch image for litmus core components just follow the following simple steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup buildx&lt;/li&gt;
&lt;li&gt;Build go binary for different architectures.&lt;/li&gt;
&lt;li&gt;Prepare Dockerfile for Multiarch.&lt;/li&gt;
&lt;li&gt;Build and push the multi-arch image.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Build using Buildx instance&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Introduction:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Docker Buildx is a CLI plugin that extends the docker command with the full support of the features provided by &lt;a href="https://github.com/moby/buildkit" rel="noopener noreferrer"&gt;Moby BuildKit&lt;/a&gt; builder toolkit. It has new features like creating scoped builder instances and building against multiple nodes concurrently.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Setup:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Docker Buildx is included in Docker 19.03 to install it run the following commands:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DOCKER_BUILDKIT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;span class="nv"&gt;$ &lt;/span&gt;docker build &lt;span class="nt"&gt;--platform&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; git://github.com/docker/buildx
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.docker/cli-plugins
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;buildx ~/.docker/cli-plugins/docker-buildx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Confirm the installation:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;docker buildx version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;github.com/docker/buildx v0.4.2-16-g1595352 159535261de8416d2a83d600ccdd7dbfa6d71303
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;for any issue in installation refer &lt;a href="https://github.com/docker/buildx/blob/master/README.md" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now the buildx is setup in your system. Buildx allows you to create new instances of isolated builders. You can use this to get a scoped environment for your CI builds that does not change the state of the shared daemon, or for isolating builds for different projects. You can create a new instance for a set of remote nodes, forming a build farm, and quickly switch between them.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Setup Builder instance&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Using the QEMU emulation support in the kernel&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;qemu-user-static &lt;span class="nt"&gt;-y&lt;/span&gt;
docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;--privileged&lt;/span&gt; multiarch/qemu-user-static &lt;span class="nt"&gt;--reset&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nb"&gt;yes &lt;/span&gt;i
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;2. Command to create new builder instances.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker buildx create --name multibuilder&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;multibuilder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;3. To show the builder instance created&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker buildx ls&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME/NODE       DRIVER/ENDPOINT             STATUS  PLATFORMS
multibuilder *  docker-container                    
  multibuilder0 unix:///var/run/docker.sock running linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
default         docker                              
  default       default                     running linux/amd64, linux/386
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;4. Inspect the builder&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker buildx inspect multibuilder&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Name:   multibuilder
Driver: docker-container

Nodes:
Name:      multibuilder0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Here the platforms will show the platform available to build images. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. If the Status is not &lt;code&gt;running&lt;/code&gt; run the following command&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;docker buildx inspect multibuilder --bootstrap&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will activate the Status of the builder instance.&lt;br&gt;
Output&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
[+] Building 6.5s (1/1) FINISHED                                                                                                                                                       
 =&amp;gt; [internal] booting buildkit                                                                                                                                                   6.5s
 =&amp;gt; =&amp;gt; pulling image moby/buildkit:buildx-stable-1                                                                                                                                5.0s
 =&amp;gt; =&amp;gt; creating container buildx_buildkit_multibuilder0                                                                                                                           1.5s
Name:   multibuilder
Driver: docker-container

Nodes:
Name:      multibuilder0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/386, linux/arm/v7, linux/arm/v6, linux/s390x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;6. Use the multibuilder instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker buildx use multibuilder&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Build Go binary&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We know that all the litmus core components (chaos experiment, operator, and runner) are written in Golang and we are building the go binaries and using them in the image. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;You can build the go binaries and copy them in Dockerfile or we can build the binary in the Dockerfile itself and use them.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;In this example, I'll be following the first way that is building binary and copying them in the Dockerfile.&lt;br&gt;
The main &lt;strong&gt;key point&lt;/strong&gt; here is to build different binaries with Go ENVs set to desired values like &lt;code&gt;GOARCH=amd64&lt;/code&gt; &amp;amp;&lt;code&gt;GOOS=linux&lt;/code&gt; for which we have to build the image.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/litmuschaos/chaos-operator.git
&lt;span class="nb"&gt;cd &lt;/span&gt;chaos-operator
vi build/go-multiarch-build.sh 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The following script will help to do that:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="nv"&gt;package&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$package&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"usage: &lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt; &amp;lt;package-name&amp;gt;"&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi

&lt;/span&gt;&lt;span class="nv"&gt;package_split&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;package&lt;/span&gt;&lt;span class="p"&gt;//\// &lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;package_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;package_split&lt;/span&gt;&lt;span class="p"&gt;[-1]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# add the arch for which we want to build the image&lt;/span&gt;
&lt;span class="nv"&gt;platforms&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="s2"&gt;"linux/amd64"&lt;/span&gt; &lt;span class="s2"&gt;"linux/arm64"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;platform &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;platforms&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;platform_split&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;//\// &lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nv"&gt;GOOS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;platform_split&lt;/span&gt;&lt;span class="p"&gt;[0]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
    &lt;span class="nv"&gt;GOARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;platform_split&lt;/span&gt;&lt;span class="p"&gt;[1]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
    &lt;span class="nv"&gt;output_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;build/_output/bin/chaos-operator&lt;span class="nv"&gt;$GOARCH&lt;/span&gt;

    &lt;span class="c"&gt;# The script executes for the argument passed (in package variable)&lt;/span&gt;
    &lt;span class="c"&gt;# here the arg will be "github.com/litmuschaos/chaos-operator/cmd/manager" for creating binary&lt;/span&gt;
    &lt;span class="nb"&gt;env &lt;/span&gt;&lt;span class="nv"&gt;GOOS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$GOOS&lt;/span&gt; &lt;span class="nv"&gt;GOARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$GOARCH&lt;/span&gt; go build &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$output_name&lt;/span&gt; &lt;span class="nv"&gt;$package&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$?&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'An error has occurred! Aborting the script execution...'&lt;/span&gt;
        &lt;span class="nb"&gt;exit &lt;/span&gt;1
    &lt;span class="k"&gt;fi
done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;./build/go-multiarch-build.sh github.com/litmuschaos/chaos-operator/cmd/manage&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the above script, we are creating the binary of &lt;code&gt;github.com/litmuschaos/chaos-operator/cmd/manage&lt;/code&gt; with &lt;code&gt;GOARCH&lt;/code&gt; &amp;amp; &lt;code&gt;GOOS&lt;/code&gt; set in the platforms. This will create binaries as follow:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;build/_output/bin/
chaos-operatoramd64&lt;span class="k"&gt;*&lt;/span&gt;  chaos-operatorarm64&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Prepare Dockerfile for Multiarch&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Prepare a Dockerfile that should work for all the different architectures. Make sure that:&lt;br&gt;
&lt;strong&gt;1. The base image should be multi-arch:&lt;/strong&gt; Use the base image which is having multiarch support.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; registry.access.redhat.com/ubi8/ubi-minimal:8.3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Which supports both ARM64 and AMD64 arch.&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%2Fljq3df35jgwturydaorg.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%2Fljq3df35jgwturydaorg.png" alt="Screenshot from 2020-11-23 20-58-06" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use TARGETARCH variable for using binary in Dockerfile:&lt;/strong&gt; All binaries used should support multi-arch builds and are built accordingly. The Docker predefines a set of ARG variables according to the &lt;code&gt;--platform&lt;/code&gt; we pass in buildx. This is only available when using the BuildKit backend. Here the &lt;code&gt;TARGETARCH&lt;/code&gt; is the architecture component of &lt;code&gt;TARGETPLATFORM&lt;/code&gt;. Check out more platform env &lt;a href="https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; registry.access.redhat.com/ubi8/ubi-minimal:8.3&lt;/span&gt;

&lt;span class="k"&gt;ARG&lt;/span&gt;&lt;span class="s"&gt; TARGETARCH&lt;/span&gt;

&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; OPERATOR=/usr/local/bin/chaos-operator \&lt;/span&gt;
    USER_UID=1001 \
    USER_NAME=chaos-operator

&lt;span class="c"&gt;# install operator binary&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; build/_output/bin/chaos-operator${TARGETARCH} ${OPERATOR}&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; build/bin /usr/local/bin&lt;/span&gt;
&lt;span class="k"&gt;RUN  &lt;/span&gt;/usr/local/bin/user_setup

&lt;span class="k"&gt;ENTRYPOINT&lt;/span&gt;&lt;span class="s"&gt; ["/usr/local/bin/entrypoint"]&lt;/span&gt;

&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="s"&gt; ${USER_UID}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This will copy the binaries created in the previous step while building the image.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Build and push the multi-arch image&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;BuildKit is designed to work well for building for multiple platforms and not only for the architecture and operating system that the user invoking the build happens to run. When you invoke a build, you can set the &lt;code&gt;--platform&lt;/code&gt; flag to specify the target platform for the build output, (for example, linux/amd64, linux/arm64, darwin/amd64).&lt;/p&gt;

&lt;p&gt;A sample command to build and push the multiarch image with the Dockerfile created in the previous stage.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;docker buildx build &lt;span class="nt"&gt;--file&lt;/span&gt; build/Dockerfile &lt;span class="nt"&gt;--progress&lt;/span&gt; plane &lt;span class="nt"&gt;--platform&lt;/span&gt; linux/arm64,linux/amd64 &lt;span class="nt"&gt;--tag&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;ORG_NAME&lt;span class="si"&gt;)&lt;/span&gt;/&lt;span class="si"&gt;$(&lt;/span&gt;IMAGE_NAME&lt;span class="si"&gt;)&lt;/span&gt;:&lt;span class="si"&gt;$(&lt;/span&gt;IMAGE_TAG&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--push&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The above command will build a multiarch image and push it to Dockerhub. The flags used are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--file&lt;/code&gt;: Path of the Dockerfile (Default is ‘PATH/Dockerfile’)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--progress&lt;/code&gt;: Use to control verbosity. Set type of progress output (auto, plain, tty). Use plain to show container output.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--platform&lt;/code&gt;: Set target platform for build.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--tag&lt;/code&gt;: Set tag of the image in the ‘name:tag’ format.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--push&lt;/code&gt;: Used to push the image to the registry.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for more flags checkout buildx &lt;a href="https://docs.docker.com/engine/reference/commandline/buildx_build/" rel="noopener noreferrer"&gt;man page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiarch image in Dockerhub:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have successfully built and pushed the multiarch images on Dockerhub. The images will look like: &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%2Fiw6zc5cnl4jxm5gjjmyu.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%2Fiw6zc5cnl4jxm5gjjmyu.png" alt="Screenshot from 2020-11-24 01-52-28" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Troubleshooting&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. standard_init_linux.go:211: exec user process caused "exec format error"&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;There could be multiple reasons for this. Try to check out the base image you're using is supporting all the platforms for which you're building the images. &lt;/p&gt;

&lt;p&gt;Make sure while building and copying the binary in Dockerfile that the arch and os should be same. Like you're building the binary with &lt;code&gt;linux/amd64&lt;/code&gt; and you're trying to run it on linux/arm64. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. rpc error: code = Unknown desc = failed to load LLB: runtime execution on platform linux/arm/v7 not supported&lt;/strong&gt;: &lt;/p&gt;

&lt;p&gt;This means the platform you're looking for is not available. You can verify the available platforms using &lt;code&gt;docker buildx inspect &amp;lt;builder-name&amp;gt;&lt;/code&gt;.Now you can run the following commands to resolve the above error.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;qemu-user-static &lt;span class="nt"&gt;-y&lt;/span&gt;
docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;--privileged&lt;/span&gt; multiarch/qemu-user-static &lt;span class="nt"&gt;--reset&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nb"&gt;yes &lt;/span&gt;i
docker buildx &lt;span class="nb"&gt;rm &lt;/span&gt;multibuilder
docker buildx create &lt;span class="nt"&gt;--name&lt;/span&gt; multibuilder
docker buildx &lt;span class="nb"&gt;ls
&lt;/span&gt;docker buildx inspect multibuilder
docker buildx inspect multibuilder &lt;span class="nt"&gt;--bootstrap&lt;/span&gt;
docker buildx use multibuilder
docker ps &lt;span class="nt"&gt;-a&lt;/span&gt;
docker buildx build &lt;span class="nt"&gt;--platform&lt;/span&gt; linux/amd64,linux/arm64,linux/arm/v7 &lt;span class="nt"&gt;-t&lt;/span&gt; &amp;lt;ORG_NAME&amp;gt;/&amp;lt;IMAGE_NAME&amp;gt;:&amp;lt;IMAGE_TAG&amp;gt; &lt;span class="nt"&gt;--push&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;In this blog, we learn how to build and push an image that can be used at different docker architecture with the same image tag on it. This can be done using a powerful docker buildx feature which helps to build image with a single command. We can create images that can run on any desired platform using buildx and can be used to reduce your bills using ARM targets &lt;em&gt;Raspberry Pis&lt;/em&gt; instance. So have ever tried building multiarch images? How useful it could be? Please leave your thoughts in the comment box.&lt;/p&gt;

&lt;p&gt;🚀 Special Thanks 🙌&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://www.linkedin.com/in/michael-fornaro-5b756179/" rel="noopener noreferrer"&gt;&lt;strong&gt;Michael Fornaro&lt;/strong&gt;&lt;/a&gt; for helping in suggesting, reviewing &amp;amp; adopting the multiarch support for Litmus Chore Components.&lt;/p&gt;



&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>litmuschaos</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>LitmusChaos GitLab Remote Templates</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Sat, 12 Sep 2020 20:32:01 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/litmuschaos-gitlab-remote-templates-6l2</link>
      <guid>https://dev.to/litmus-chaos/litmuschaos-gitlab-remote-templates-6l2</guid>
      <description>&lt;p&gt;In this blog, I will be talking about setting up a GitLab remote template for running a Chaos Experiment in the GitLab CI environment with LitmusChaos. Before jumping in, let's do a quick recap on Litmus. Litmus is a framework for practising chaos engineering in cloud-native environments. Litmus provides a chaos operator, a large set of chaos experiments on its hub, detailed documentation, and a friendly community. Litmus also has Github Chaos Actions and GitLab remote templates for the members who are using litmus experiments as part of their CI pipelines.&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%2Fmnsosbv4lsa6jfsmq2or.jpg" 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%2Fmnsosbv4lsa6jfsmq2or.jpg" alt="Alt Text" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Pre-requisites:&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes 1.11 or later in your CI workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Brief Introduction to GitLab Remote Template&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.gitlab.com/" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt; is a DevOps lifecycle tool which is extremely famous for its continuous integration and deployment pipeline features in the DevOps world nowadays which are configured using a YAML file called .gitlab-ci.yml within each project. The &lt;code&gt;.gitlab-ci.yaml&lt;/code&gt; defines the structure and determines what to execute using GitLab Runner .It deals with what decisions to be taken for when specific conditions are encountered. Like when a process is passed or failed. In GitLab we can include an external yaml file using the &lt;code&gt;include&lt;/code&gt; keyword these external files are called &lt;em&gt;templates&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Benefits of using templates:&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This helps to break down the CI/CD configuration into multiple files and increases readability for long configuration files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It’s also possible to have template files stored in a central repository(like &lt;a href="https://github.com/mayadata-io/gitlab-remote-templates" rel="noopener noreferrer"&gt;litmus-templates&lt;/a&gt;) and projects include their configuration files. This helps avoid duplicated configuration, for example, global default variables for all projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Different Types of Templates&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The addition of a template in GitLab is a very simple job. We just need to add the &lt;code&gt;include&lt;/code&gt; keyword that requires the external YAML file to have the extensions &lt;code&gt;.yml&lt;/code&gt; or &lt;code&gt;.yaml&lt;/code&gt;, otherwise the external file is not included. include supports the following inclusion methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;local:&lt;/em&gt;&lt;/strong&gt;  It Includes a file from the local project repository and referenced using full paths relative to the root directory. 
we can use it like this:
&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="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;local&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/templates/.gitlab-chaos-template.yml'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;file:&lt;/em&gt;&lt;/strong&gt; We can include files from another private project under the same GitLab instance using file along with include. It can be added with:
&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="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;mayadata-io/gitlab-remote-template'&lt;/span&gt;
    &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/templates/pod-delete-template.yml'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;template:&lt;/em&gt;&lt;/strong&gt; It used to include the pre-built GitLab template. It can be used like:
&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;# File sourced from GitLab's template collection&lt;/span&gt;
&lt;span class="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Auto-DevOps.gitlab-ci.yml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;remote:&lt;/em&gt;&lt;/strong&gt; It can be used to include a file from a different location, using HTTP/HTTPS, referenced by using the full URL.This makes  the remote template very popular among all and it is widely used in many projects. The remote file must be publicly accessible through a simple GET request as authentication schemas in the remote URL are not supported. This brings &lt;em&gt;&lt;a href="https://github.com/mayadata-io/gitlab-remote-templates" rel="noopener noreferrer"&gt;LitmusChaos Remote Templates&lt;/a&gt;&lt;/em&gt; into the picture which is used to induce chaos on an application. The yaml templates are stored in a github repository and can be used as an external template.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&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="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remote&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://raw.githubusercontent.com/mayadata-io/gitlab-remote-templates/master/templates/pod-delete-template.yml'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Setup LitmusChaos Remote Template in your CI workflow&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you are using/willing to use litmus experiments as part of your CI pipelines and using GitLab as your CI platform then you are at the right place. LitmusChaos introduced GitLab remote templates to integrate the chaos experiments in your CI workflow. It helps to manage your configuration file and provide a simple way to perform the chaos testing on your application. We need to follow some simple steps to setup GitLab Remote Template in your CI workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Setup a cluster:&lt;/em&gt;&lt;/strong&gt; Before we begin make sure that we have a kubernetes cluster setup in our CI workflow this is more of a pre-requisite step. If we don’t have any cloud cluster like GKE or AWS we can set up a light weight simple clusters like &lt;a href="https://kind.sigs.k8s.io/" rel="noopener noreferrer"&gt;KinD&lt;/a&gt; cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Deploy an application:&lt;/em&gt;&lt;/strong&gt; Once we setup a cluster we need to have an application on which we want to perform the chaos testing. If we don’t have the application running in a pod don’t worry we can set that in these two simple steps.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;i. Create an Image of the application:&lt;/em&gt;  We need to Dockerize the application for this we need to have a Dockerfile which can be used to create the application image. Let us suppose that we have a Dockerfile at location &lt;code&gt;/build&lt;/code&gt; from root. So we will build the image with that.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ii. Run a pod with the application container:&lt;/em&gt;  Now as we have our application image in the Docker registry. We can deploy an application pod with that image. You can refer to a sample pod manifest that can be used to create an application pod from &lt;a href="https://raw.githubusercontent.com/mayadata-io/chaos-ci-lib/master/app/nginx.yml" rel="noopener noreferrer"&gt;here&lt;/a&gt; replace the nginx image with your image and other attributes. Now apply the pod manifest and wait for it to come in Running state.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; app.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Select a Chaos template:&lt;/em&gt;&lt;/strong&gt;  Now select a chaos template from the list of templates available in the chaos template &lt;a href="https://github.com/mayadata-io/gitlab-remote-templates" rel="noopener noreferrer"&gt;repository&lt;/a&gt;. Based on the experiment you want to perform, take the raw link of the template. Make sure before running any experiment we need to &lt;strong&gt;&lt;em&gt;install litmus&lt;/em&gt;&lt;/strong&gt; which can be done using the &lt;a href="https://github.com/mayadata-io/gitlab-remote-templates/blob/master/templates/install-litmus-template.yml" rel="noopener noreferrer"&gt;install litmus&lt;/a&gt; template present in the same list. A chaos template looks like:&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="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;APP_NS&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;APP_KIND&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deployment&lt;/span&gt; 
  &lt;span class="na"&gt;APP_LABEL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;APPLICATION_LABEL&lt;/span&gt;
  &lt;span class="na"&gt;TARGET_CONTAINER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TARGET_CONTAINER_NAME&lt;/span&gt;
  &lt;span class="na"&gt;TOTAL_CHAOS_DURATION&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;30"&lt;/span&gt;
  &lt;span class="na"&gt;CHAOS_INTERVAL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;10"&lt;/span&gt;
  &lt;span class="na"&gt;FORCE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;false"&lt;/span&gt;
  &lt;span class="na"&gt;EXPERIMENT_IMAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos/go-runner&lt;/span&gt;
  &lt;span class="na"&gt;EXPERIMENT_IMAGE_TAG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1.7.0&lt;/span&gt;

&lt;span class="na"&gt;.pod_delete_template&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="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mayadata-io/chaos-ci-lib:ci&lt;/span&gt;
    &lt;span class="na"&gt;entrypoint&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;./pod-delete"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;echo "Running Pod Delete Experiment"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Get the raw link by clicking on the raw button.&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%2Ff506doadstvmmbc23w0c.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%2Ff506doadstvmmbc23w0c.PNG" alt="Alt Text" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And copy the raw link&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%2Fwcieplcs86ape15n117u.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%2Fwcieplcs86ape15n117u.PNG" alt="Alt Text" width="800" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;4. Add template in .gitlab-ci-yml:&lt;/em&gt;&lt;/strong&gt; Now we need to add the chaos template in the GitLab configuration file for which we need to add a remote template URL with the &lt;code&gt;include&lt;/code&gt; keyword.&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="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remote&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://raw.githubusercontent.com/mayadata-io/gitlab-remote-templates/master/templates/node-cpu-hog-template.yml'&lt;/span&gt;

&lt;span class="na"&gt;stages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;chaosInject&lt;/span&gt;

&lt;span class="na"&gt;Inject Node CPU Hog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chaosInject&lt;/span&gt;
  &lt;span class="na"&gt;extends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.node_cpu_hog_template&lt;/span&gt;
  &lt;span class="na"&gt;before_script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;APP_NS&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;APP_LABEL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;run=nginx"&lt;/span&gt;
    &lt;span class="na"&gt;APP_KIND&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deployment&lt;/span&gt;
    &lt;span class="na"&gt;TARGET_CONTAINER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use the link which we copied in &lt;em&gt;step 3&lt;/em&gt; in &lt;code&gt;include:remote&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;5. Add the Chaos Experiment:&lt;/em&gt;&lt;/strong&gt;  Once we are done with setting up the chaos infra we can add the chaos experiment which we want to induce on our application in the similar way for example the addition of pod delete chaos has been added in the below code.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;.gitlab-ci.yml&lt;/em&gt;&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="na"&gt;include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remote&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://raw.githubusercontent.com/mayadata-io/gitlab-remote-templates/master/templates/install-litmus-template.yml'&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remote&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://raw.githubusercontent.com/mayadata-io/gitlab-remote-templates/master/templates/node-cpu-hog-template.yml'&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remote&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://raw.githubusercontent.com/mayadata-io/gitlab-remote-templates/master/templates/uninstall-litmus-template.yml'&lt;/span&gt;

&lt;span class="na"&gt;stages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;appDeploy&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;chaosInfraSetup&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;chaosInject&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;chaosInfraCleanup&lt;/span&gt;

&lt;span class="na"&gt;Deploy to Staging&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;appDeploy&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kubectl run nginx --image=nginx --restart=Always&lt;/span&gt;

&lt;span class="na"&gt;Install LitmusChaos&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chaosInfraSetup&lt;/span&gt;
  &lt;span class="na"&gt;extends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.install_litmus_template&lt;/span&gt;
  &lt;span class="na"&gt;before_script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;APP_NS&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;EXPERIMENT_IMAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos/go-runner&lt;/span&gt;
    &lt;span class="na"&gt;EXPERIMENT_IMAGE_TAG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1.7.0&lt;/span&gt;

&lt;span class="na"&gt;Inject Node CPU Hog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chaosInject&lt;/span&gt;
  &lt;span class="na"&gt;extends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.node_cpu_hog_template&lt;/span&gt;
  &lt;span class="na"&gt;before_script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;APP_NS&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;APP_LABEL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;run=nginx"&lt;/span&gt;
    &lt;span class="na"&gt;APP_KIND&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deployment&lt;/span&gt;
    &lt;span class="na"&gt;TARGET_CONTAINER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;

&lt;span class="na"&gt;UnInstall LitmusChaos&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chaosInfraCleanup&lt;/span&gt;
  &lt;span class="na"&gt;extends&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.uninstall_litmus_template&lt;/span&gt;
  &lt;span class="na"&gt;before_script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;APP_NS&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;EXPERIMENT_IMAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos/go-runner&lt;/span&gt;
    &lt;span class="na"&gt;EXPERIMENT_IMAGE_TAG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1.7.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;6. Trigger the pipeline:&lt;/em&gt;&lt;/strong&gt; Once we are done with the set up we can trigger the pipeline and get the results under respective stages of the pipeline. In the same way we can add and perform any chaos experiment in the GitLab CI.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;By using GitLab Remote template we can easily integrate LitmusChaos experiment with GitLab which helps to perform the chaos testing on an application in the CI workflow. We just need to make use of the &lt;code&gt;include:remote&lt;/code&gt; feature of GitLab and select the &lt;a href="https://github.com/mayadata-io/gitlab-remote-templates/tree/master/templates" rel="noopener noreferrer"&gt;desired&lt;/a&gt; templates from the litmuschaos remote templates. So, What are your opinions on running chaos in the CI workflow? If you’re in favor of this then does it seem to be helpful? DevOps experts are welcome to comment and suggest on this!&lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>litmuschaos</category>
      <category>gitlab</category>
      <category>kubernetes</category>
      <category>docker</category>
    </item>
    <item>
      <title>Setup GitHub Chaos Action using KinD Cluster [Part-2]</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Fri, 07 Aug 2020 13:27:21 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/setup-github-chaos-action-using-kind-cluster-part-2-4dbm</link>
      <guid>https://dev.to/litmus-chaos/setup-github-chaos-action-using-kind-cluster-part-2-4dbm</guid>
      <description>&lt;p&gt;In this blog I’ll be talking about setting up GitHub Chaos Action using KinD cluster in your GitHub workflow, to know more about GitHub Chaos Actions and how to get started with chaos actions please refer &lt;a href="https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke"&gt;Part-1&lt;/a&gt; of the action series. This blog deals with automating the workflow by creating a kind cluster inside the CI workflow only in place of connecting an external cluster as we did in &lt;a href="https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke"&gt;Part-1&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 on 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;, and a friendly &lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;community&lt;/a&gt;. Litmus is very easy to use; you can also set up a very quick &lt;a href="https://dev.to/uditgaurav/get-started-with-litmuschaos-in-minutes-4ke1"&gt;demo environment&lt;/a&gt; to install and run Litmus experiments.&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%2F9a1qur50nxb8hlp8w0nk.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%2F9a1qur50nxb8hlp8w0nk.png" alt="Alt Text" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;GO&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;The above is only required when you're not using the default runner otherwise the ubuntu-latest image has all the dependencies installed in it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Brief Introduction to GitHub Chaos Action&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GitHub Chaos Action helps you to automate the chaos testing in a Cloud Native way using Github Actions. It contains a number of litmuschaos experiments which will help to find the weaknesses or improvements required for your application.&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%2Fumj108o9b38q2ll1ymas.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%2Fumj108o9b38q2ll1ymas.png" alt="Alt Text" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also say that the Github chaos action is used to create custom software development life cycle (SDLC) workflows directly in your GitHub repository.To know more about setting up a sample workflow using GitHub chaos action please visit the &lt;a href="https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke"&gt;Part-1&lt;/a&gt; of the blog.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Why KinD Cluster?&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;KinD (Kubernetes in Docker) was primarily designed for testing Kubernetes itself, but now it has become very famous to be used for local development or CI. But &lt;em&gt;“Why KinD?”&lt;/em&gt; You might ask this question to yourself while setting up GitHub CI with chaos action to answer this let’s do a small analysis of what is required.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Easily Setup:&lt;/em&gt; We mostly use GitHub default runner as it has almost all the capabilities installed in it to run a simple workflow and we don’t need an external runner until or unless we have a larger requirement. The Github Ubuntu image of the default runner comes preinstalled with kind so we just need to spin up a cluster with a configuration file or with default values. In this blog I will be using default values to setup KinD which will create a single node cluster with named ‘kind’&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Compatible:&lt;/em&gt; We need a cluster which is very lightweight and easy to use. For this purpose, KinD fits the best. &lt;a href="https://sigs.k8s.io/kind" rel="noopener noreferrer"&gt;KinD&lt;/a&gt; is a tool for running local Kubernetes clusters using Docker container “nodes”.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are enough reasons to use kind in our CI workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;New trend in Continuous Integration/Deployment:&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the new trends in Continuous Integration/Deployment is to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an application image.&lt;/li&gt;
&lt;li&gt;Run tests against the created image. &lt;/li&gt;
&lt;li&gt;Push image to a remote registry.&lt;/li&gt;
&lt;li&gt;Deploy to a server from the pushed image.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s also useful when your application already has the Dockerfile that can be used to create and test an image. &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%2Focmej40tyk78zdv0k1eh.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%2Focmej40tyk78zdv0k1eh.png" alt="Alt Text" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will create a Github CI workflow covering the above stages on a particular PR for that we need to follow the following ten simple steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-1:  Setup a fresh workflow in case you don’t have one&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s get started with writing a GitHub CI YAML if you don’t have it already. We are now familiar with the fields and attributes of CI YAML from &lt;a href="(https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke)"&gt;Part-1&lt;/a&gt;, so we will directly move toward steps involved in setting up the actions with the following template:&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="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Litmus-CI&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# Trigger the workflow on push or pull request,&lt;/span&gt;
  &lt;span class="c1"&gt;# but only for the master branch&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# Job name&lt;/span&gt;
  &lt;span class="na"&gt;choas-tests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-2:  Checkout  the latest commit on the Pull Request&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;When you commit code to your repository, you can continuously build and test the code to make sure that the commit doesn't introduce errors. The error could be in the form of some security issue, functional issue or performance issue which can be tested using different custom tests, linters or by pulling actions. This brings the need of having Chaos Actions which will perform a chaos test on the application over a particular commit which in-turn helps to track the performance of the application on a commit level. The following lines of code will help you checkout on the latest commit on the PR:&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="c1"&gt;#Using the last commit id of pull request&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;octokit/request-action@v2.x&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;get_PR_commits&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;route&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GET /repos/:repo/pulls/:pull_number/commits&lt;/span&gt;
          &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.repository }}&lt;/span&gt;
          &lt;span class="na"&gt;pull_number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.issue.number }}&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&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;set commit to output&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;getcommit&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt; 
           &lt;span class="s"&gt;prsha=$(echo $response | jq '.[-1].sha'  | tr -d '"')&lt;/span&gt;
           &lt;span class="s"&gt;echo "::set-output name=sha::$prsha" &lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
          &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;${{ steps.get_PR_commits.outputs.data }}&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{steps.getcommit.outputs.sha}}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Just add these lines under steps in list format and we are on the latest commit on the PR.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Step-3:   Create an Image of the application&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;In this stage we will &lt;em&gt;Dockerize&lt;/em&gt; the application from the repository. For this we need to have a Dockerfile in the repository which can be used to create the application image. Here, let us suppose that we have a Dockerfile at location &lt;br&gt;
&lt;code&gt;/build&lt;/code&gt; from root. So for creating a Docker image of this application we need to run following command in CI YAML:&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="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;Build docker image&lt;/span&gt;
        &lt;span class="s"&gt;run&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;sudo docker build -f build/Dockerfile -t &amp;lt;image-name&amp;gt;:&amp;lt;image-tag&amp;gt; &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-4:   Install and configure KinD Cluster&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;As we discussed for running Chaos Actions we need to have a cluster and we will be creating a KinD cluster in the CI workflow only. As we’re using Ubuntu-latest image which already contain the kind installation we  need to spin a cluster. For spinning the latest version of the KinD cluster we just need to run a kind create cluster command or for a specific version we need to add an action for that. For this blog I’ll be using kind 0.7.0 version which can be installed from the following line of code:&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="c1"&gt;#Install and configure a kind cluster&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;Installing Prerequisites (KinD Cluster)&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;engineerd/setup-kind@v0.5.0&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&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;v0.7.0"&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;Configuring and testing the Installation&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kubectl cluster-info --context kind-kind&lt;/span&gt;
          &lt;span class="s"&gt;kind get kubeconfig --internal &amp;gt;$HOME/.kube/config&lt;/span&gt;
          &lt;span class="s"&gt;kubectl get nodes &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-5:  Load the image inside the node of the cluster&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;After creating the cluster we need to load the application image which was built in step 3 in the node of the cluster to be used locally for testing.&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="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;Load image on the nodes of the cluster&lt;/span&gt;
        &lt;span class="s"&gt;run&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kind load docker-image --name=kind &amp;lt;image-name&amp;gt;:&amp;lt;image-tag&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-6:  Run a pod with the application container&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Now we will run the application container in a pod. Different chaos testing on the application level and on the node level will be performed and the health of the pod will be verified after inducing chaos. You can refer to a sample pod manifest which can be used to create an application pod from &lt;a href="https://raw.githubusercontent.com/mayadata-io/chaos-ci-lib/master/app/nginx.yml" rel="noopener noreferrer"&gt;here&lt;/a&gt; replace the nginx image with your image and place it at some location (say &lt;code&gt;/path/to/application&lt;/code&gt;) in your repository. In this step we will create the application pod via the following command and wait for a few seconds to get it ready.&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="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;Deploy a sample application for chaos injection&lt;/span&gt;
        &lt;span class="s"&gt;run&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kubectl apply -f /path/to/application&lt;/span&gt;
          &lt;span class="s"&gt;sleep 30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-7:  Setup kubeconfig ENV for GitHub Actions&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Now we need to export &lt;code&gt;KUBE_CONFIG_DATA&lt;/code&gt; containing kubeconfig of the the KinD cluster encoded in &lt;code&gt;base64&lt;/code&gt; to be used by Chaos Action.&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="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;Setting up kubeconfig ENV for Github Chaos Action&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-8: Run GitHub Chaos Actions on the application&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Here comes the step where we will use GitHub &lt;a href="https://github.com/marketplace/actions/kubernetes-chaos" rel="noopener noreferrer"&gt;Chaos Actions&lt;/a&gt; for chaos testing. The experiments and parameters are controlled by actions ENV as explained in the Chaos Action page.&lt;/p&gt;

&lt;p&gt;Example:&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="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;Running Litmus pod delete chaos experiment&lt;/span&gt;
        &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;startsWith(github.event.comment.body, '/run-e2e-pod-delete') || startsWith(github.event.comment.body, '/run-e2e-all')&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mayadata-io/github-chaos-actions@v0.1.1&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;INSTALL_LITMUS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
          &lt;span class="na"&gt;EXPERIMENT_NAME&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;EXPERIMENT_IMAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos/ansible-runner&lt;/span&gt;
          &lt;span class="na"&gt;EXPERIMENT_IMAGE_TAG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ci&lt;/span&gt;
          &lt;span class="na"&gt;IMAGE_PULL_POLICY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;IfNotPresent&lt;/span&gt;
          &lt;span class="na"&gt;LITMUS_CLEANUP&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-9: Push the application image to the registry&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;This step will execute only when all other steps run fine. This means our application has passed the chaos test and now we are good to push the image in the registry.&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="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;Publish to Docker Repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;elgohr/Publish-Docker-Github-Action@master&lt;/span&gt;
        &lt;span class="na"&gt;with&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;&amp;lt;image-name&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DUSER }}&lt;/span&gt;
          &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DPASS }}&lt;/span&gt;
          &lt;span class="na"&gt;dockerfile&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build/Dockerfile&lt;/span&gt;
          &lt;span class="na"&gt;tags&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;image-tag&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Step-10: Delete Kind Cluster&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;This is basically a cleanup step where we remove the cluster so the application pod and chaos components also get removed. This should In case some experiment fails, even then  the cleanup stage should execute.&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="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;Deleting KinD cluster&lt;/span&gt;
        &lt;span class="na"&gt;if&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;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kind delete cluster&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the complete workflow YAML looks like:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;main.yml&lt;/em&gt;&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="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Litmus-CI&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

      &lt;span class="c1"&gt;#Using the last commit id of pull request&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;octokit/request-action@v2.x&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;get_PR_commits&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;route&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GET /repos/:repo/pulls/:pull_number/commits&lt;/span&gt;
          &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.repository }}&lt;/span&gt;
          &lt;span class="na"&gt;pull_number&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.issue.number }}&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&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;set commit to output&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;getcommit&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt; 
           &lt;span class="s"&gt;prsha=$(echo $response | jq '.[-1].sha'  | tr -d '"')&lt;/span&gt;
           &lt;span class="s"&gt;echo "::set-output name=sha::$prsha" &lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
          &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  &lt;span class="s"&gt;${{ steps.get_PR_commits.outputs.data }}&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{steps.getcommit.outputs.sha}}&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;Build docker image&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;sudo docker build -f build/ansible-runner/Dockerfile -t litmuschaos/ansible-runner:ci .&lt;/span&gt;
      &lt;span class="c1"&gt;#Install and configure a kind cluster&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;Installing Prerequisites (KinD Cluster)&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;engineerd/setup-kind@v0.4.0&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&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;v0.7.0"&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;Configuring and testing the Installation&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kubectl cluster-info --context kind-kind&lt;/span&gt;
          &lt;span class="s"&gt;kind get kubeconfig --internal &amp;gt;$HOME/.kube/config&lt;/span&gt;
          &lt;span class="s"&gt;kubectl get nodes   &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;Load image on the nodes of the cluster&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kind load docker-image --name=kind litmuschaos/ansible-runner:ci&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;Deploy a sample application for chaos injection&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;kubectl apply -f https://raw.githubusercontent.com/mayadata-io/chaos-ci-lib/master/app/nginx.yml&lt;/span&gt;
          &lt;span class="s"&gt;sleep 30&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;Setting up kubeconfig ENV for Github Chaos Action&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)&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;Running node-memory-hog chaos experiment&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mayadata-io/github-chaos-actions@v0.1.1&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;INSTALL_LITMUS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
          &lt;span class="na"&gt;EXPERIMENT_NAME&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;node-memory-hog&lt;/span&gt;
          &lt;span class="na"&gt;EXPERIMENT_IMAGE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litmuschaos/ansible-runner&lt;/span&gt;
          &lt;span class="na"&gt;EXPERIMENT_IMAGE_TAG&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ci&lt;/span&gt;
          &lt;span class="na"&gt;IMAGE_PULL_POLICY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;IfNotPresent&lt;/span&gt;
          &lt;span class="na"&gt;LITMUS_CLEANUP&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;Publish to Docker Repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;elgohr/Publish-Docker-Github-Action@master&lt;/span&gt;
        &lt;span class="na"&gt;with&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;&amp;lt;image-name&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DUSER }}&lt;/span&gt;
          &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DPASS }}&lt;/span&gt;
          &lt;span class="na"&gt;dockerfile&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build/Dockerfile&lt;/span&gt;
          &lt;span class="na"&gt;tags&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;image-tag&amp;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;Deleting KinD cluster&lt;/span&gt;
        &lt;span class="na"&gt;if&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;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kind delete cluster&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;View the Result:&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now to view the result of the run we need to navigate to the main page of the repository. Under your repository name, click &lt;strong&gt;Actions&lt;/strong&gt;.&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%2F5egf5m4l477jepoeyas4.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%2F5egf5m4l477jepoeyas4.png" alt="Alt Text" width="800" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;List of all workflows will appear. Out of these workflows select the latest one to view the logs and get an idea what happen during the execution of the chaos test.&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%2Ft3j5urw5e20gj2i5e2ma.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%2Ft3j5urw5e20gj2i5e2ma.PNG" alt="Alt Text" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The complete log will look like:&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%2Fu27tc6q7ui0doqoaiuug.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%2Fu27tc6q7ui0doqoaiuug.PNG" alt="Alt Text" width="616" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to create and use your own experiment/test in the GitHub Chaos Action then you create it using litmus with the help of cool &lt;a href="https://dev.to/ispeakc0de/getting-started-with-litmus-sdk-358l"&gt;SDK&lt;/a&gt;  or for more help you can also raise an &lt;a href="https://github.com/litmuschaos/litmus/issues/new?labels=enhancement&amp;amp;template=feature_request.md" rel="noopener noreferrer"&gt;issue&lt;/a&gt; in litmus for that. The community is extremely active and surely they will get back to you with some good help.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;em&gt;If you're new to GitHub Actions and wanted to create a simple GitHub workflow then please also read the &lt;a href="https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke"&gt;Part-1&lt;/a&gt; of the action series.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Conclusion:&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By using GitHub Chaos Actions along with KinD in the CI workflow automate, customize, and execute your software development workflows right in your repository. You can use the Chaos Action in a completely customized way to check the performance of your application for every commit coming in the Pull Request. This will help both developers and testers to maintain the quality of the software. So, what do you think? What else can we achieve using Chaos Actions and what other tests can be performed apart from what we &lt;a href="https://github.com/marketplace/actions/kubernetes-chaos" rel="noopener noreferrer"&gt;have now&lt;/a&gt;? Kubernetes experts are welcome to comment and suggest on this! &lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>litmuschaos</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>github</category>
    </item>
    <item>
      <title>GitHub Chaos Actions in Your CI/CD workflow [Part-1]</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Tue, 14 Jul 2020 12:54:01 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/github-chaos-actions-in-your-ci-cd-workflow-mke</link>
      <guid>https://dev.to/litmus-chaos/github-chaos-actions-in-your-ci-cd-workflow-mke</guid>
      <description>&lt;p&gt;``In this blog, I will be talking about setting GitHub Chaos Actions in your CI workflow. 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 on 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;, and a friendly &lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;community&lt;/a&gt;. Litmus is very easy to use you can also set up a very quick &lt;a href="https://dev.to/uditgaurav/get-started-with-litmuschaos-in-minutes-4ke1"&gt;demo environment&lt;/a&gt; to install and run Litmus experiments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Github Chaos Action?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Github actions automate the chaos execution on an application in the same place where the code is stored. You can write individual tasks along with chaos actions and combine them to create a custom GitHub workflow. GitHub Workflows are custom automated processes that you can set up in your repository to build, test, package, or deploy any code project on GitHub. Including the Github chaos actions in your workflow YAML, you can test the performance/resiliency of your application in a much simpler and better way. To know more visit Github chaos actions &lt;a href="https://github.com/mayadata-io/github-chaos-actions" rel="noopener noreferrer"&gt;repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What do we need Github Chaos Action?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub Action makes the execution of chaos on an application in a much simpler and easier way. This action could be triggered on the basis of &lt;a href="https://bit.ly/37hYd1x" rel="noopener noreferrer"&gt;parameter&lt;/a&gt; listed in the GitHub workflow YAML. This action can be performed over an application that can be deployed in the cluster or already present in the cluster. Github chaos action helps to fix the weaknesses leads to increased resilience of the system which helps to gain confidence to developers and SRE. It takes a cloud-native approach to create, manage, and monitor the chaos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-requisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes 1.11 or later.&lt;/li&gt;
&lt;li&gt;A workflow in your Github Repository&lt;/li&gt;
&lt;li&gt;Application pod in a healthy state&lt;/li&gt;
&lt;li&gt;Pre-requisites of the Chaos Experiment you are executing. You can find this under the experiment section in &lt;a href="https://docs.litmuschaos.io/docs/getstarted/" rel="noopener noreferrer"&gt;litmus docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Sample Github Chaos Action Workflow&lt;/strong&gt;&lt;br&gt;
The workflow file is stored under &lt;code&gt;.github/workflows&lt;/code&gt; directory of your repository and it uses YAML syntax and must have either a .yml or .yaml file extension. We just need to follow the below-mentioned steps to create a sample GitHub workflow for performing chaos engineering on a Kubernetes application using Github chaos action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Setup name and event to trigger the GitHub workflow&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;`yaml&lt;br&gt;
name: Push&lt;br&gt;
on:&lt;br&gt;
 push:&lt;br&gt;
 branches: [ master ]&lt;br&gt;
 pull_request:&lt;br&gt;
 branches: [ master ]&lt;br&gt;
`&lt;/code&gt;&lt;br&gt;
This will trigger the GitHub workflow on a push or pull request basis on the master branch. Similarly, it can also be on a scheduled basis.&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;yaml&lt;br&gt;
on:&lt;br&gt;
 schedule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cron: ‘&lt;em&gt;/15 * * * *’
&lt;code&gt;&lt;/code&gt;`
**2. Setup jobs in the workflow&lt;/em&gt;*
&lt;code&gt;`yaml
jobs:
build:
runs-on: ubuntu-latest
`&lt;/code&gt;
A GitHub workflow run is made up of one or more jobs. Each job runs in an environment specified by runs-on. So in the above case, each job will run on the ubuntu-latest environment. By default jobs run in parallel to run them sequentially, we need to add
&lt;code&gt;`yaml
needs: &amp;lt;Job-Name&amp;gt;.
jobs:
build:
runs-on: ubuntu-latest
needs: job1
steps: 
— uses: actions/checkout@v2
`&lt;/code&gt;
&lt;strong&gt;3. Setup different tasks in a job&lt;/strong&gt;
A job contains a sequence of tasks called Steps. Steps can be used to run commands, tasks, or actions itself. Not all steps run actions, but all actions run as a step.
`&lt;code&gt;&lt;/code&gt;yaml
jobs:
build:
runs-on: ubuntu-latest
steps:

&lt;ul&gt;
&lt;li&gt;uses: actions/checkout@master
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
Using job steps we can run the chaos action over an application and for doing so we need to use our [Github-chaos-actions](https://github.com/marketplace/actions/kubernetes-chaos) in a below-mentioned way:
A sample pod deletes experiment workflow:
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;yaml
.github/workflows/main.yml
name: main
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
— uses: actions/checkout@master&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;— name: Running Litmus pod delete chaos experiment&lt;br&gt;
 uses: mayadata-io/github-chaos-actions@master&lt;br&gt;
 env:&lt;br&gt;
 ##Pass kubeconfig data from secret in base 64 encoded form &lt;br&gt;
 KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}&lt;br&gt;
 ##If litmus is not installed&lt;br&gt;
 INSTALL_LITMUS: true&lt;br&gt;
 ##Give application info under chaos&lt;br&gt;
 APP_NS: default&lt;br&gt;
 APP_LABEL: run=nginx&lt;br&gt;
 APP_KIND: deployment&lt;br&gt;
 EXPERIMENT_NAME: pod-delete&lt;br&gt;
 ##Custom image can also been used&lt;br&gt;
 EXPERIMENT_IMAGE: litmuschaos/ansible-runner&lt;br&gt;
 EXPERIMENT_IMAGE_TAG: latest&lt;br&gt;
 IMAGE_PULL_POLICY: Always&lt;br&gt;&lt;br&gt;
 TOTAL_CHAOS_DURATION: 30&lt;br&gt;
 CHAOS_INTERVAL: 10&lt;br&gt;
 FORCE: false&lt;br&gt;
 ##Select true if you want to uninstall litmus after chaos&lt;br&gt;
 LITMUS_CLEANUP: true&lt;br&gt;
&lt;code&gt;&lt;/code&gt;`&lt;br&gt;
This is a complete single job that is running a chaos action over an application for every push on branch master and the kubeconfig of the cluster and application details are provided in the form of secrets and environment variables respectively. Other Variables are chaos action variables that change on the basis of the &lt;a href="https://github.com/mayadata-io/github-chaos-actions/blob/master/README.md" rel="noopener noreferrer"&gt;chaos experiment&lt;/a&gt; we are running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to connect the cluster with chaos actions?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To connect a healthy cluster with the chaos action we need to pass the kubeconfig of the cluster in the base 64 encoded form as done in the above example. For doing this we need to follow these steps:
Convert the kubeconfig of your cluster in base 64 encoded form using this command:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;`bash&lt;br&gt;
cat $HOME/.kube/config | base64&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a secret KUBE_CONFIG_DATA with the value containing the output of the above command.&lt;/li&gt;
&lt;li&gt;Pass this secret as ENV in Github chaos actions to connect your cluster with the action.
`&lt;code&gt;&lt;/code&gt;yaml&lt;/li&gt;
&lt;li&gt;name: Running Litmus pod delete chaos experiment
uses: mayadata-io/github-chaos-actions@master
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
&lt;code&gt;&lt;/code&gt;`&lt;/li&gt;
&lt;li&gt;Creating a Cluster in the workflow itself is also one of the ways of performing chaos actions. We can even create a cluster in one of the steps of the job and then use Github-chaos-actions in further steps. In this case we don’t need to pass the kubeconfig externally through action’s ENV instead you can setup kubeconfig as an environment variable in base 64 encoded form using:
`&lt;code&gt;&lt;/code&gt;yaml&lt;/li&gt;
&lt;li&gt;name: "Setup kubeconfig ENV for Github Chaos Action"
run: echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
The&lt;/code&gt;KUBE_CONFIG_DATA` will be accessable to the Chaos Action which is running on a different container. Please visit [Part-2] of the GitHub actions series, we have discussed it in more detailed way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Monitor the GitHub workflow jobs:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the workflow triggers we need to monitor the workflow. For monitoring the different jobs in the workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the Actions option present in the repository containing workflow.
&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%2Fuaqa0ypj87cdzjdad2f4.png" alt="Alt Text" width="800" height="170"&gt;
&lt;/li&gt;
&lt;li&gt;It will show all the workflow runs. Select the one which triggered recently
&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%2F7u9upgerdnmf5nqgbf94.png" alt="Alt Text" width="800" height="367"&gt;
&lt;/li&gt;
&lt;li&gt;Check the job logs of the workflow.
&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%2Fia2ksh1f174bk03i9dxt.png" alt="Alt Text" width="800" height="377"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Details of chaos action run&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To get the details of what happened when the chaos action was running check the logs on the Github-chaos-actions from the job logs.&lt;/li&gt;
&lt;li&gt;The Github-chaos-action contains the logs of the process involved in running the chaos actions.&lt;/li&gt;
&lt;li&gt;It also contains the logs of the experiment pod which will give a verbose idea of what was happening at the time of chaos injection.&lt;/li&gt;
&lt;li&gt;At the end of the logs, there will be a check of the verdict whether the chaos result verdict is Pass or Fail (It will be a pass for the successful execution of the experiment).&lt;/li&gt;
&lt;li&gt;To know more about the terms like Chaos Experiment, Chaos Engine and Chaos Result visit &lt;a href="https://docs.litmuschaos.io/docs/getstarted/" rel="noopener noreferrer"&gt;litmus docs&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;To know more about GitHub Chaos Actions and different ways to setup Chaos Actions in your GitHub workflow read  &lt;a href="https://dev.to/uditgaurav/github-chaos-actions-in-your-ci-cd-workflow-mke"&gt;Part-2&lt;/a&gt; now.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can automate the chaos execution on a review application to check its resiliency in the same place where the codes are stored using &lt;a href="https://github.com/marketplace/actions/kubernetes-chaos" rel="noopener noreferrer"&gt;Github Action&lt;/a&gt;.It provides an easier way to perform different chaos experiments which helps in gaining confidence.&lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>litmuschaos</category>
      <category>github</category>
      <category>chaosengineering</category>
    </item>
    <item>
      <title>Get Started with LitmusChaos in Minutes</title>
      <dc:creator>Udit Gaurav</dc:creator>
      <pubDate>Sun, 21 Jun 2020 13:03:27 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/get-started-with-litmuschaos-in-minutes-4ke1</link>
      <guid>https://dev.to/litmus-chaos/get-started-with-litmuschaos-in-minutes-4ke1</guid>
      <description>&lt;p&gt;&lt;br&gt;
In this blog, I will be talking about setting up a quick demo environment for 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 on 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;, and a friendly &lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;community&lt;/a&gt;. Litmus is very easy to use but a quick demo environment to install Litmus, run experiments, and learn chaos engineering on Kubernetes will be of course cooler.&lt;/p&gt;

&lt;h3&gt;&lt;b&gt;Litmus Demo Environment&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;The Litmus Demo is a quick way to introduce yourself to the world of Cloud-Native Chaos Engineering. It helps you to familiarize yourself with running LitmusChaos experiments in a realistic application environment running multiple services on a Kubernetes cluster. By following the instructions in this blog, you will be able to create a cluster, install a sample application that will be subjected to chaos, build the chaos infrastructure &amp;amp; run the chaos experiments, all in a matter of minutes. &lt;/p&gt;

&lt;p&gt;When, as a community, we were pondering about a quick, lightweight environment to achieve this automated “Demo” setup, we just couldn’t look beyond KinD (cluster infra) &amp;amp; the immensely popular Sock-Shop (sample microservices application). However, the demo script also provides for a more “extensive” platform in GKE, in case you want to explore the larger suite of experiments.&lt;/p&gt;

&lt;p&gt;The idea here, as you may have guessed, is to get down to experiencing chaos injection without brooding over documentation &amp;amp; copy-pasting multiple Kubernetes manifests. This demo is designed to help get your hands dirty on injecting failures using a chaos framework &amp;amp; finding out what happens and not so much about inculcating in you, in-depth knowledge of standard practices around chaos engineering. We are hoping this will get you there eventually!  &lt;/p&gt;

&lt;p&gt;&lt;b&gt;LitmusChaos PreRequisites&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.docker.com/engine/install/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;, &lt;a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noopener noreferrer"&gt;Kubectl&lt;/a&gt; &amp;amp; &lt;a href="https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/" rel="noopener noreferrer"&gt;Python3.7+&lt;/a&gt; (with the PyYaml package) are all you need for running the KinD platform based chaos demo. If GKE is your platform choice, you may need to configure gcloud on your workstation (or test-harness machines, if you are old fashioned!). &lt;/p&gt;

&lt;h3&gt;&lt;b&gt;Know Your Cluster&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;As described earlier, this demo environment supports different platforms (KinD, GKE).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;KinD:&lt;/strong&gt;  A 3 node KinD cluster pre-installed with the sock-shop demo application, litmus chaos CRDs, operator, and a minimal set of prebuilt chaos experiment CRs is setup. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GKE:&lt;/strong&gt; A 3 node GKE cluster pre-installed with the sock-shop demo application, litmus chaos CRDs, operator, and the full generic Kubernetes chaos experiment suite is setup. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;code&gt;The support for other platforms like AWS will be added very soon&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;&lt;b&gt;Getting started:&lt;/b&gt;&lt;/h2&gt;

&lt;p&gt;To get started with any of the above platforms, we will follow the following steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Clone Litmus demo repository in your system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This command will clone the master branch of the litmus demo repository in your system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/litmuschaos/litmus-demo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;2. Check out the available options on the demo script&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;litmus-demo
./manage.py &lt;span class="nt"&gt;-h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;usage: manage.py &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-h&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;start,test,list,stop&lt;span class="o"&gt;}&lt;/span&gt; ...

Spin up a Demo Environment on Kubernetes.

positional arguments:
  &lt;span class="o"&gt;{&lt;/span&gt;start,test,list,stop&lt;span class="o"&gt;}&lt;/span&gt;
    start               Start a Cluster with the demo environment deployed.
    &lt;span class="nb"&gt;test                &lt;/span&gt;Run Litmus ChaosEngine Experiments inside litmus demo
                        environment.
    list                List all available Litmus ChaosEngine Experiments
                        available to run.
    stop                Shutdown the Cluster with the demo environment
                        deployed.

optional arguments:
  &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt;            show this &lt;span class="nb"&gt;help &lt;/span&gt;message and &lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So, we can see that the available arguments are start, test, list, and stop with their usage. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Check the available experiments on the desired platform&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also view the experiments supported by the platform, as of today (The folks in the litmus community are busy extending the platform interoperability for the chaos experiment, so stay tuned!). &lt;/p&gt;

&lt;p&gt;For KinD platform&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py list &lt;span class="nt"&gt;--platform&lt;/span&gt; kind
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The default value of &lt;code&gt;--platform&lt;/code&gt; is kind so &lt;code&gt;./manage.py list&lt;/code&gt; will also give the same output.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;OUTPUT:&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
Available Litmus Chaos Experiments:


    1. pod-delete
    2. container-kill
    3. node-cpu-hog
    4. node-memory-hog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For GKE platform&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py list &lt;span class="nt"&gt;--platform&lt;/span&gt; GKE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;u&gt;&lt;strong&gt;OUTPUT:&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Available Litmus Chaos Experiments:


    1. container-kill
    2. disk-fill
    3. node-cpu-hog
    4. node-memory-hog
    5. pod-cpu-hog
    6. pod-delete
    7. pod-memory-hog
    8. pod-network-corruption
    9. pod-network-latency
    10. pod-network-loss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;h3&gt;&lt;b&gt;4. Installing Demo Environment&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;Install the demo environment using one of the platforms with start argument:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;KinD Cluster:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py start &lt;span class="nt"&gt;--platform&lt;/span&gt; kind
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once done, wait for all the pods to get in a ready state. You can monitor this using.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;watch kubectl get pods &lt;span class="nt"&gt;--all-namespaces&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now when all pods come into Running state, we can access the sock-shop application through web-ui, which will help us to visualize the impact of chaos on the application and whether the application persists after chaos injections. &lt;/p&gt;

&lt;p&gt;Follow the given steps to access through web-ui.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get the port of frontend deployment:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deploy front-end &lt;span class="nt"&gt;-n&lt;/span&gt; sock-shop &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;jsonpath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'{.spec.template.spec.containers[?(@.name == "front-end")].ports[0].containerPort}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;u&gt;&lt;strong&gt;OUTPUT:&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
8079&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Perform port forwarding on the port obtained above&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; kubectl port-forward deploy/front-end &lt;span class="nt"&gt;-n&lt;/span&gt; sock-shop 3000:8079
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;u&gt;&lt;b&gt;OUTPUT:&lt;/b&gt;&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Forwarding from 127.0.0.1:3000 -&amp;gt; 8079
Forwarding from &lt;span class="o"&gt;[&lt;/span&gt;::1]:3000 -&amp;gt; 8079
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Copy the IP to a web browser and get the web-ui of sock-shop using a kind cluster.&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%2F8a5fdztec22ktlw3ckil.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%2F8a5fdztec22ktlw3ckil.png" alt="Alt Text" width="800" height="457"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GKE CLuster&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py start &lt;span class="nt"&gt;--platform&lt;/span&gt; GKE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once done, you will get an output containing Ingress Details:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Ingress Details:

&lt;span class="k"&gt;**&lt;/span&gt; RUNNING: kubectl get ingress basic-ingress &lt;span class="nt"&gt;--namespace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sock-shop
NAME            HOSTS   ADDRESS        PORTS   AGE
basic-ingress   &lt;span class="k"&gt;*&lt;/span&gt;       34.120.15.86   80      95s

You can access the web application &lt;span class="k"&gt;in &lt;/span&gt;a few minutes at http://34.120.15.86
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After waiting for a few minutes, you can check the given URL (here &lt;a href="http://34.120.15.86" rel="noopener noreferrer"&gt;http://34.120.15.86&lt;/a&gt;) it will take you to the sock-shop catalog UI on the localhost browser. This makes sure that the sock-shop application is deployed in the cluster-infra. The sock-shop catalog UI will look like:&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%2F3ppx6bt8gon3cnrel3rf.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%2F3ppx6bt8gon3cnrel3rf.png" alt="Alt Text" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To check all pods are ready, run the following command and check the status of all pods which should be in Running state.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;watch kubectl get pods &lt;span class="nt"&gt;--all-namespaces&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;b&gt;&lt;h3&gt;5. Running Chaos in Demo Environment&lt;/h3&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;We can run all the chaos experiments we get from &lt;code&gt;./manage.py list&lt;/code&gt; or we can also run selective experiments that only we want to perform using &lt;code&gt;./manage test&lt;/code&gt; as shown:&lt;/p&gt;

&lt;p&gt;For running all experiments&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--platform&lt;/span&gt; &amp;lt;platform-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For running selective experiments&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py &lt;span class="nb"&gt;test&lt;/span&gt;  &lt;span class="nt"&gt;--platform&lt;/span&gt; &amp;lt;platform-name&amp;gt; &lt;span class="nt"&gt;--test&lt;/span&gt; &amp;lt;test-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Follow step 3 to get the available test-name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; For running the pod-delete experiment.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;**&lt;/span&gt;./manage.py &lt;span class="nb"&gt;test&lt;/span&gt;  &lt;span class="nt"&gt;--platform&lt;/span&gt; kind &lt;span class="nt"&gt;--test&lt;/span&gt; pod-delete &lt;span class="k"&gt;**&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Take this opportunity to view what happens as the experiment runs its course. Pods may be killed; containers may be restarted, the resource usage may spike up - all impacting the application in its own unique way. In a typical run of the chaos experiment, a hypothesis is built around each of these failures. While we discuss this in detail in upcoming blogs, the endeavor in our case is to find out if the sock-shop app continues to stay available across these failures!!&lt;/p&gt;

&lt;p&gt;The experiment results (Pass/Fail) are derived based on the simple criteria of app availability post chaos &amp;amp; are summarized on the console once the execution completes. &lt;/p&gt;

&lt;p&gt;Get more details about the flags used to configure and run the chaos tests please refer to the param tables in the &lt;a href="https://github.com/litmuschaos/litmus-demo#test" rel="noopener noreferrer"&gt;test&lt;/a&gt; section. &lt;/p&gt;

&lt;h3&gt;&lt;b&gt;6. Deleting Cluster / Cluster Clean up&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;To shut down and destroy the cluster when you're finished, run the following commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KinD cluster&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py &lt;span class="nt"&gt;--platform&lt;/span&gt; kind stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;GKE cluster&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./manage.py &lt;span class="nt"&gt;--platform&lt;/span&gt; GKE stop &lt;span class="nt"&gt;--project&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;GC_PROJECT&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;h3&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;Did you get a taste of chaos in a Kubernetes environment? Did you end up killing different microservices to gauge the impact? Are you inclined to understand what happened when the failures were injected &amp;amp; what options the chaos framework provides to control &amp;amp; assess these? Did you make a mental map of how &lt;em&gt;your&lt;/em&gt; microservices might behave if the same failures were injected on them? And about how to mitigate the impact of these failures? &lt;/p&gt;

&lt;p&gt;If you asked yourself these questions, then the purpose of this litmus-demo is met. It also means you are onwards and upwards in your chaos engineering journey!! &lt;/p&gt;

&lt;p&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;br&gt;
Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;em&gt;&lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;https://kubernetes.slack.com/messages/CNXNB0ZTN&lt;/a&gt;&lt;/em&gt; &lt;br&gt;
(#litmus channel on the Kubernetes workspace)&lt;br&gt;
Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;em&gt;&lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&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>chaosengineering</category>
      <category>litmuschaos</category>
    </item>
  </channel>
</rss>
