<?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: Antariksh Verma</title>
    <description>The latest articles on DEV Community by Antariksh Verma (@yum).</description>
    <link>https://dev.to/yum</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%2F485136%2Fcea1a636-7dae-4cd8-913b-61e73c224cd4.png</url>
      <title>DEV Community: Antariksh Verma</title>
      <link>https://dev.to/yum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yum"/>
    <language>en</language>
    <item>
      <title>What I Learned From Building a Datree Policy</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Wed, 19 Jan 2022 17:20:57 +0000</pubDate>
      <link>https://dev.to/yum/what-i-learned-from-building-a-datree-policy-7oo</link>
      <guid>https://dev.to/yum/what-i-learned-from-building-a-datree-policy-7oo</guid>
      <description>&lt;h1&gt;
  
  
  History
&lt;/h1&gt;

&lt;p&gt;Kubernetes is lovely! I have built and shipped many applications to production using Kubernetes. The one thing I could not wrap my head around was the configuration. Each time I built a project, I would just copy repetitive configuration from my previous projects, and if I was trying something new, I would have to scour the internet till I came across a piece of configuration that matched what I was looking for. This was a terrible developer experience, and that is when I found Datree, a magical tool for preventing Kubernetes misconfigurations from reaching production.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I have written a configuration policy for Datree. In this post, I will be sharing my experience about building a policy for Datree and reflecting upon the policy I built along with my final thoughts about Datree. The name of my policy is &lt;strong&gt;Horizontal Pod Autoscaler&lt;/strong&gt;, and the policy can be found &lt;a href="https://github.com/datreeio/datree/tree/main/examples/horizontal-pod-autoscaler-policy"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  About the Policy
&lt;/h1&gt;

&lt;p&gt;My policy is about the Kubernetes component Horizontal Podautoscaler. If you're unfamiliar with what Horizontal Podautoscaler is, it is a Kubernetes component that automatically updates resources like a Deployment or StatefulSet. It does this &lt;em&gt;horizontally&lt;/em&gt;, by increasing the number of pods, in response to the load. Coming back to my policy, my policy provides safety around building a Kubernetes configuration which aims to use Horizontal Podautoscaler to scale the application. Now, one could make a policy for absolutely any use case, but I chose to build a policy for the Horizontal Podautoscaler because this policy allows Kubernetes engineers to actually work on reducing costs and scaling their pods rather than ensuring correct configuration.&lt;/p&gt;

&lt;h1&gt;
  
  
  Policy Rules
&lt;/h1&gt;

&lt;p&gt;Each Datree policy has a bunch of rules. A rule is, essentially, something for which you want to check some piece of configuration for. My policy has 4 rules, indicating that it checks 4 pieces of configuration. The rules in my policy have been laid out as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensure target CPU utilization is set:&lt;/strong&gt; This rule checks for the field targetCPUUtilizationPercentage which defines the target for when the pods are to be scaled. CPU Utilization is the average CPU usage of all pods in a deployment divided by the requested CPU of the deployment. If the mean of CPU utilization is higher than the target, then the pod replicas will be readjusted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensure max replicas are set and valid:&lt;/strong&gt; This rule checks for the field maxReplicas which is vital because it sets the maximum number of Pod replicas for the autoscaler. It is a value between 1 and 10.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensure min replicas are set and valid:&lt;/strong&gt; This rule checks for the field minReplicas which defines the minimum number of replicas of a resource. As a best practice, it should be set to two, hence the minimum minReplicas one can set it to would be 2.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensure scale target ref is configured properly:&lt;/strong&gt; This rule checks for the configuration of the field scaleRefTarget. The rule also checks for subfields like kind and apiVersion.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Testing the Policy
&lt;/h1&gt;

&lt;p&gt;Getting started with Datree is fairly simple. &lt;a href="https://datree.io?utm_source=blog&amp;amp;utm_medium=influencer&amp;amp;utm_campaign=nishant"&gt;You can read about it here.&lt;/a&gt; I won't get into it right now, but rather focus on just testing my policy in a sample Kubernetes project. To start off, you need the Datree CLI installed. After that, just test the policy using &lt;code&gt;datree test manifest.yaml&lt;/code&gt;. Here is how the output looks:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zo2kaJgK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1c40wmb95mnh3hozl8k8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zo2kaJgK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1c40wmb95mnh3hozl8k8.png" alt="Image description" width="880" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the above image, the Datree CLI provides you with a complete summary of the policy. In our case, all of the rules were passed.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Overall, I'd say I learned a lot while building this policy. Not only did I experiment with configuration policies and Datree, but I also learned a great ton about YAML and Kubernetes. Finally, Datree is brilliant to use in production; it really enhances your productivity and boosts your workflow. After building a few policies and pushing some code to production, it really does the work and prevents K8s misconfigurations from reaching production.&lt;/p&gt;

</description>
      <category>datree</category>
      <category>kubernetes</category>
      <category>yaml</category>
    </item>
    <item>
      <title>Tech Stack for DEV X DO Hackathon Project</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Tue, 15 Dec 2020 14:35:37 +0000</pubDate>
      <link>https://dev.to/yum/tech-stack-for-dev-x-do-hackathon-project-1b6i</link>
      <guid>https://dev.to/yum/tech-stack-for-dev-x-do-hackathon-project-1b6i</guid>
      <description>&lt;h3&gt;
  
  
  Right To The Point
&lt;/h3&gt;

&lt;p&gt;The tech stack for my project is very unique. I will be going with MongoDB as my database and yeah this is a MERN stack project but it isn't. Express JS is not my backend web server but Neuron JS is. If you have seen my post where I introduce Neuron JS then you know what it is but if you don't then Neuron JS is my own web server framework and this project will prove how awesome my framework is. Next up is frontend where I am using my favorite, your favorite REACT JS!!!! Not a big surprise there though. This is the main tech stack for the project. And please check out Neuron JS because if you won't then when I will show you the final product you will be racing to use it.&lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>react</category>
      <category>node</category>
    </item>
    <item>
      <title>My DEV X DO Hackathon Idea (Dont Copy)</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Mon, 14 Dec 2020 09:45:42 +0000</pubDate>
      <link>https://dev.to/yum/my-dev-x-do-hackathon-idea-dont-copy-5701</link>
      <guid>https://dev.to/yum/my-dev-x-do-hackathon-idea-dont-copy-5701</guid>
      <description>&lt;h3&gt;
  
  
  Right To The Point
&lt;/h3&gt;

&lt;p&gt;So I thought what project would excite me the most and what project would I need as a user. I thought and pondered for like, 2 minutes when I got the idea ⚡. A portfolio maker. A portfolio builder/maker which allows you to host it right there and then as well kind of like wix or weebly. &lt;/p&gt;

&lt;h3&gt;
  
  
  Advice
&lt;/h3&gt;

&lt;p&gt;The main thing in ideating over a project for an event or hackathon is that what are your strengths. Make something realistic yet wonderful and this can only be made if you have knowledge of many different technologies/frameworks/languages. Plus, don't fret in copying code from someone or using a template, remember they are created for you and if you face imposter syndrome like me then just &lt;strong&gt;deal&lt;/strong&gt; with it.&lt;/p&gt;

&lt;p&gt;Well, goodbye, I need to complete it now!&lt;/p&gt;

&lt;p&gt;P.S - I will be posting another post about the tech stack I used and why and of course another one which will show the final product and a bit about it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DEV Badge</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Thu, 03 Dec 2020 18:10:03 +0000</pubDate>
      <link>https://dev.to/yum/dev-badge-hf4</link>
      <guid>https://dev.to/yum/dev-badge-hf4</guid>
      <description>&lt;p&gt;I got my first DEV badge on dev.to, which is the hacktoberfest badge! Whoo hoo.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Neuron JS - BYE BYE EXPRESS!</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Fri, 06 Nov 2020 14:00:37 +0000</pubDate>
      <link>https://dev.to/yum/neuron-js-bye-bye-express-26k2</link>
      <guid>https://dev.to/yum/neuron-js-bye-bye-express-26k2</guid>
      <description>&lt;p&gt;I recently made this small, open source framework called Neuron JS which is heavily inspired by Express, but just much much better. Neuron JS is much faster and much more lightweight than Express.js being only 5kb in size. It supports 4 different request methods, GET, POST, PUT and DELETE. For CRUD functionality and APIs you would only need these methods. I mean, come on who really uses HEAD and COPY and LINK. Neuron JS also supports all Express middlewares, which means that existing libraries and modules will work just fine. Neuron is also under development for Deno.js since Express is not made for Deno yet. Neuron comes with in-built template engine support. And last but not the least, it is MVC-based. Right now, I am also working on integrating native MongoDB just like Django has integrated SQLite support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@yummyweb/neuronjs"&gt;Go to NPM&lt;/a&gt; to install Neuron.&lt;br&gt;
&lt;a href="https://neuron-docs.vercel.app/"&gt;Go to Neuron Docs&lt;/a&gt; to see how to work with it.&lt;br&gt;
&lt;a href="https://github.com/antriksh123/neuron-js"&gt;Go to Neuron JS GitHub&lt;/a&gt; to check out the source code and file issues.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>express</category>
      <category>neuronjs</category>
    </item>
    <item>
      <title>I Completed Hacktoberfest 2020</title>
      <dc:creator>Antariksh Verma</dc:creator>
      <pubDate>Sat, 17 Oct 2020 11:51:52 +0000</pubDate>
      <link>https://dev.to/yum/i-completed-hacktoberfest-2020-4ce4</link>
      <guid>https://dev.to/yum/i-completed-hacktoberfest-2020-4ce4</guid>
      <description>&lt;h2&gt;
  
  
  What I Learned From Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;I learned many important skills from Hacktoberfest this year, and not only that I also made my first open source contribution becuase of Hacktoberfest. I just completed the challenge and have now ordered the limited edition tee. I made 5 successful pull requests and had a blast. The learning was immense since I collaborated with many developers on projects and learnt the importance of good documentation.&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
