<?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: tejendrab</title>
    <description>The latest articles on DEV Community by tejendrab (@tejendrab).</description>
    <link>https://dev.to/tejendrab</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%2F450676%2Fcecb5559-a0ce-466c-a085-4f1627cbd5ba.jpeg</url>
      <title>DEV Community: tejendrab</title>
      <link>https://dev.to/tejendrab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tejendrab"/>
    <language>en</language>
    <item>
      <title>Chaos Tools &amp; LinkerD</title>
      <dc:creator>tejendrab</dc:creator>
      <pubDate>Tue, 11 Aug 2020 11:15:39 +0000</pubDate>
      <link>https://dev.to/tejendrab/chaos-tools-linkerd-5goh</link>
      <guid>https://dev.to/tejendrab/chaos-tools-linkerd-5goh</guid>
      <description>&lt;h1&gt;
  
  
  Experiments using chaos tools &amp;amp; LinkerD in your environment
&lt;/h1&gt;

&lt;p&gt;Install linkerD on your setup using linkerD &amp;amp; Kubernetes CLI &lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -sL https://run.linkerd.io/install | sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, add linkerd to your path with:&lt;br&gt;
 &lt;code&gt;export PATH=$PATH:$HOME/.linkerd2/bin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you use Homebrew, you can instead download and install the CLI with:&lt;br&gt;
&lt;code&gt;brew install linkerd&lt;/code&gt;&lt;br&gt;
To verify the linkerd is running fine you check version with the below command :&lt;br&gt;
&lt;code&gt;linkerd version&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Validate your K8 cluster
&lt;/h1&gt;

&lt;p&gt;To check that your cluster is configured correctly and ready to install the control plane, you can run:&lt;br&gt;
&lt;code&gt;linkerd check --pre&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Install Linkerd onto the cluster
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;linkerd install | kubectl apply -f -&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;validate the installation by running:&lt;br&gt;
&lt;code&gt;linkered check&lt;/code&gt;&lt;br&gt;
components were installed, you can run:&lt;br&gt;
&lt;code&gt;kubectl -n linkerd get deploy&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Linkerd Dashboard
&lt;/h1&gt;

&lt;p&gt;Explore Linkerd&lt;br&gt;
&lt;code&gt;linkerd dashboard &amp;amp;&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Install the application or demo application
&lt;/h1&gt;

&lt;p&gt;Install emojivoto into the emojivoto namespace by running:&lt;br&gt;
&lt;code&gt;curl -sL https://run.linkerd.io/emojivoto.yml \&lt;br&gt;
  | kubectl apply -f -&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Before we mesh it, let's take a look at the app. If you're using Docker Desktop at this point you can visit &lt;a href="http://localhost"&gt;http://localhost&lt;/a&gt; directly. If you're not using Docker Desktop, we'll need to forward the web-svc service. To forward web-svc locally to port 8080, you can run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl -n emojivoto port-forward svc/web-svc 8080:80&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, let's add Linkerd to emojivoto by running:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl get -n emojivoto deploy -o yaml \&lt;br&gt;
  | linkerd inject - \&lt;br&gt;
  | kubectl apply -f -&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;you can replace your deployment or application name with the emojivoto.&lt;/p&gt;

&lt;p&gt;Insights ::&lt;br&gt;
How you can inject the faults to your application &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Either using an ingress ( installed on your local or namespace)&lt;/li&gt;
&lt;li&gt;Or you can utilize the UI of the application if you have one like emojivto.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In my case there was a local NGINX - host application is installed so initiating the same and using it as ingress host, &lt;/p&gt;

&lt;h1&gt;
  
  
  Injecting chaos experiment
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;kubectl apply -f kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.2?file=charts/generic/pod-network-latency/experiment.yaml -n emojivoto&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now after this setup the RBAC&lt;br&gt;
&lt;code&gt;kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.2?file=charts/generic/pod-network-latency/rbac.yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit the RBAC with the namespace you are applying the experiments.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl apply -f rbac.yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now create a chaosEngine using the below :&lt;br&gt;
&lt;code&gt;kubectl apply -f https://hub.litmuschaos.io/api/chaos/1.6.2?file=charts/generic/pod-network-latency/rbac.yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;1.set the annotationcheck=false&lt;br&gt;
2.set the applable &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;kgp -n emojivoto --show--lables

&lt;ul&gt;
&lt;li&gt;app=emojvoto.svc
3.target container &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;describe the above pod and get the container ID

&lt;ol&gt;
&lt;li&gt;Check the latency timings edit according to your comfort and requirements.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now try ping the application &lt;br&gt;
&lt;code&gt;kubectl get pods&lt;/code&gt;&lt;br&gt;
&lt;code&gt;kubectl exec -it NGINX POD&lt;/code&gt;&lt;br&gt;
&lt;code&gt;kubectl get pods -n emojivto -o wide&lt;/code&gt;&lt;br&gt;
get the IP for voting or UI/ F/E IP for the applications&lt;/p&gt;

&lt;h1&gt;
  
  
  Now run the fault to the application
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;kubectl apply -f chaosengine.yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will apply the chaosenperiment as given and the latency will be induced by PUMBA and delay will be see in ping and from the linkerD portal we can see the grafana graph.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>chaos</category>
      <category>network</category>
      <category>experiments</category>
    </item>
  </channel>
</rss>
