<?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>Forem: Puru</title>
    <description>The latest articles on Forem by Puru (@ptuladhar3).</description>
    <link>https://forem.com/ptuladhar3</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%2F436100%2F024b1b3e-5d8e-4d4f-a529-20709466eb2c.jpg</url>
      <title>Forem: Puru</title>
      <link>https://forem.com/ptuladhar3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ptuladhar3"/>
    <language>en</language>
    <item>
      <title>Should you be vibe coding?</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Mon, 19 May 2025 20:10:38 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/should-you-be-vibe-coding-5dka</link>
      <guid>https://forem.com/ptuladhar3/should-you-be-vibe-coding-5dka</guid>
      <description>&lt;p&gt;After the &lt;a href="https://www.linkedin.com/posts/david-heinemeier-hansson-374b18221_the-appeal-of-vibe-coding-where-programmers-activity-7327959526941306880-hu1i?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAABw5JyQBOjlXftekEK8eg44hVd1R02oX8zo" rel="noopener noreferrer"&gt;recent post by&lt;/a&gt; DHH about “vibe coding”, I too felt the urge to take a plunge into the “vibe coding” pool as to what it is, and why it’s appealing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter the vibe coding
&lt;/h3&gt;

&lt;p&gt;The term “vibe coding” was &lt;a href="https://x.com/karpathy/status/1886192184808149383" rel="noopener noreferrer"&gt;coined by&lt;/a&gt; &lt;a href="https://x.com/karpathy/status/1886192184808149383" rel="noopener noreferrer"&gt;Andrej Karpathy&lt;/a&gt;&lt;a href="https://karpathy.ai/" rel="noopener noreferrer"&gt;,&lt;/a&gt; who was also a &lt;a href="https://openai.com/index/introducing-openai/" rel="noopener noreferrer"&gt;founding member of OpenAI&lt;/a&gt;. As Karpathy describes, vibe coding is when you don’t think about code, you blindly trust whatever LLMs throws at you, and you vibe your way into building something.&lt;/p&gt;

&lt;p&gt;This approach to software development is made possible by how far language models have come (like Claude Sonnet), along with the rise of AI-powered editors such as &lt;a href="https://ptuladhar.gumroad.com/l/a-beginners-guide-to-using-cursor-the-ai-code-editor?layout=profile&amp;amp;recommended_by=search" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt; and &lt;a href="https://code.visualstudio.com/docs/copilot/overview" rel="noopener noreferrer"&gt;GitHub Copilot in VS Code&lt;/a&gt;. Vibe coding or not, coding with AI is quickly becoming the new default.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why vibe coding appeals
&lt;/h3&gt;

&lt;p&gt;Traditional software development has a steep entry barrier. You need to learn a programming language, grasp the intricacies of a framework, and spend significant time just getting something basic to work. That complexity often discourages newcomers.&lt;/p&gt;

&lt;p&gt;Vibe coding flips that on its head. With high-quality LLMs, you can go from idea to execution almost instantly. The results are often “good enough” to keep moving, without rewriting everything line by line.&lt;/p&gt;

&lt;p&gt;It’s not just about speed — it’s about maintaining creative momentum. When the feedback loop is tight, building feels fun again.&lt;/p&gt;

&lt;h3&gt;
  
  
  After the “vibe rush”
&lt;/h3&gt;

&lt;p&gt;But what happens once the initial excitement, the “vibe rush” wears off?&lt;/p&gt;

&lt;p&gt;For some, it’s the start of something deeper. They see potential in their idea and shift gears, using AI as a coding assistant rather than letting it lead. They invest time in understanding, refining, and iterating.&lt;/p&gt;

&lt;p&gt;For others, it’s the end of the road. They realize they were never interested in the code itself — just the thrill of rapid prototyping. Once the novelty fades, so does their engagement. The outcome was what mattered, not the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why vibe coding will thrive
&lt;/h3&gt;

&lt;p&gt;Vibe coding dramatically lowers the barrier to entry. It removes much of the intimidation around building software, making it accessible to non-developers, creatives, and solo entrepreneurs.&lt;/p&gt;

&lt;p&gt;For example, indie hackers and solo entrepreneurs can test ideas quickly, validate them, and iterate — all without a traditional software engineering background. The world may start to see many more &lt;a href="https://levels.io/" rel="noopener noreferrer"&gt;levelsio&lt;/a&gt; emerging, building fast and in public.&lt;/p&gt;

&lt;p&gt;Ultimately, vibe coding is reshaping how people approach software development. It provides instant gratification, builds confidence, and lets newcomers figure out whether this path is for them. Some will move on. Others will go deeper. But either way, &lt;em&gt;vibe coding opens the door.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Ready to vibe?
&lt;/h3&gt;

&lt;p&gt;If this got you excited about building with AI, now’s the perfect time to dive deeper. Start your journey with &lt;a href="https://cursor.purutuladhar.com/" rel="noopener noreferrer"&gt;&lt;em&gt;A Beginner’s Guide to Using Cursor, the AI Code Editor&lt;/em&gt;&lt;/a&gt; — a hands-on guide to one of the best AI coding editors available.&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%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2A2KbI_vibYtZOoz3N" 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%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2A2KbI_vibYtZOoz3N" alt="A Beginner’s Guide to Using Cursor, the AI Code Editor" width="1005" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cursor.purutuladhar.com/" rel="noopener noreferrer"&gt;https://cursor.purutuladhar.com/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Preparing for the CKS? Don't let Falco catch you off guard. In this article, I break down what you need to know about Falco by Sysdig for the exam.</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Tue, 22 Apr 2025 08:17:13 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/preparing-for-the-cks-dont-let-falco-catch-you-off-guard-in-this-article-i-break-down-what-you-1idb</link>
      <guid>https://forem.com/ptuladhar3/preparing-for-the-cks-dont-let-falco-catch-you-off-guard-in-this-article-i-break-down-what-you-1idb</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/ptuladhar3/falco-must-know-for-cks-exam-7en" class="crayons-story__hidden-navigation-link"&gt;🦅 Falco: Must-know for CKS exam&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/ptuladhar3" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F436100%2F024b1b3e-5d8e-4d4f-a529-20709466eb2c.jpg" alt="ptuladhar3 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/ptuladhar3" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Puru
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Puru
                
              
              &lt;div id="story-author-preview-content-2423827" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/ptuladhar3" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F436100%2F024b1b3e-5d8e-4d4f-a529-20709466eb2c.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Puru&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/ptuladhar3/falco-must-know-for-cks-exam-7en" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 22 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/ptuladhar3/falco-must-know-for-cks-exam-7en" id="article-link-2423827"&gt;
          🦅 Falco: Must-know for CKS exam
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/falco"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;falco&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/kubernetes"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;kubernetes&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/security"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;security&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cks"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cks&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/ptuladhar3/falco-must-know-for-cks-exam-7en" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;6&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/ptuladhar3/falco-must-know-for-cks-exam-7en#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              2&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>falco</category>
      <category>kubernetes</category>
      <category>security</category>
      <category>cks</category>
    </item>
    <item>
      <title>🦅 Falco: Must-know for CKS exam</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Tue, 22 Apr 2025 08:15:27 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/falco-must-know-for-cks-exam-7en</link>
      <guid>https://forem.com/ptuladhar3/falco-must-know-for-cks-exam-7en</guid>
      <description>&lt;p&gt;👋 First of all, I am excited to share that I've officially become a Kubestronaut (&lt;a href="https://medium.com/r/?url=http%3A%2F%2Flinkedin.com%2Fpulse%2Fkubestronaut-becoming-one-puru-tuladhar-lndvf" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;). Among the five Kubernetes certifications, the CKS (Certified Kubernetes Security Specialist) was by far the toughest. In fact, I missed passing on my first attempt by just 2% (&lt;a href="https://www.linkedin.com/pulse/how-2-failure-turned-success-my-cks-exam-experience-puru-tuladhar-oniif/?trackingId=nAQrqgpKToSyI4KsEER7BA%3D%3D" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;). That experience inspired me to create the 📖 &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;CKS Handbook&lt;/a&gt;, which is now in its 2nd Edition, updated to reflect the latest changes to the CKS curriculum.&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%2F9h15ifvz272xuotkd0to.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%2F9h15ifvz272xuotkd0to.png" alt="Kubestronaut Journey" width="744" height="342"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;In this blog, we will explore what you need to know about &lt;strong&gt;Falco&lt;/strong&gt; to prepare for the CKS exam. Falco is a key part of the CKS curriculum under &lt;strong&gt;"Monitoring, Logging, and Runtime Security"&lt;/strong&gt; which accounts for about 20% of the exam.&lt;/p&gt;

&lt;p&gt;Anyone who's taken the CKS exam knows that Falco-related tasks can quickly eat up your time if you're not well prepared. &lt;strong&gt;So let's dive in!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🪏 Falco by Sysdig
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://falco.org/" rel="noopener noreferrer"&gt;Falco&lt;/a&gt; is an &lt;strong&gt;open-source cloud-native runtime security tool&lt;/strong&gt; originally created by &lt;a href="https://sysdig.com/" rel="noopener noreferrer"&gt;Sysdig&lt;/a&gt; and &lt;a href="https://www.cncf.io/projects/falco/" rel="noopener noreferrer"&gt;donated to the CNCF in 2018&lt;/a&gt;. It provides runtime security for Linux hosts, containers, Kubernetes, and cloud environments. For the scope of the CKS exam, &lt;strong&gt;focus only on the container runtime security&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Falco is designed to &lt;strong&gt;detect and alert on abnormal behavior&lt;/strong&gt; and potential security threats in real-time. These malicious behaviors are identified through &lt;a href="https://falco.org/docs/rules/" rel="noopener noreferrer"&gt;&lt;strong&gt;Falco rules,&lt;/strong&gt;&lt;/a&gt; and then using &lt;a href="https://github.com/falcosecurity/falcosidekick" rel="noopener noreferrer"&gt;&lt;strong&gt;Falcosidekick&lt;/strong&gt;&lt;/a&gt; to alert on the suspicious events. Falcosidekick is out of scope for the exam.&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%2Fu5rwp0qgffu5fh409huu.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%2Fu5rwp0qgffu5fh409huu.png" alt="How Falco works" width="744" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📕 Rules of Falco
&lt;/h2&gt;

&lt;p&gt;Falco rules are what you, as a Kubernetes security engineer, need to write or maintain to detect malicious behaviors in your Kubernetes environment.&lt;/p&gt;

&lt;p&gt;The default Falco rules file is stored in &lt;strong&gt;/etc/falco/falco_rules.yaml&lt;/strong&gt;. Every rule definition contains at least the following fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rule, Desc:&lt;/strong&gt; Name and short rule description.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Condition:&lt;/strong&gt; Key part of the rule, which determines if the rule should be fired or not based on a Boolean expression matching event fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt; Human-friendly log message that Falco emits, can include event metadata by prefixing % before event field.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Priority:&lt;/strong&gt; Every Falco rule has a priority, indicating how serious a violation of the rule is.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📝 &lt;strong&gt;NOTE:&lt;/strong&gt; In the exam, you are allowed to refer to the &lt;a href="https://falco.org/docs/reference/rules/supported-fields/" rel="noopener noreferrer"&gt;Supported Fields for Conditions and Outputs&lt;/a&gt; page.&lt;/p&gt;

&lt;h2&gt;
  
  
  🐚 Shell in the container
&lt;/h2&gt;

&lt;p&gt;Here is a custom Falco config in YAML with a rule to detect if a shell is spawned in a container, which is often a sign of debugging gone wrong, misconfigured containers, or possible malicious attempts, such as &lt;a href="https://www.linkedin.com/pulse/ingress-nginx-nightmare-cve-2025-1974-you-affected-puru-tuladhar-ithxf/" rel="noopener noreferrer"&gt;IngressNightmare&lt;/a&gt; remote code execution.&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%2F852bce0ah5sy09rbnln9.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%2F852bce0ah5sy09rbnln9.png" alt="Falco rule" width="800" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The config begins with &lt;a href="https://falco.org/docs/reference/rules/default-macros/" rel="noopener noreferrer"&gt;macros&lt;/a&gt; to simplify writing Falco rules. Pre-defined Falco macros come bundled in &lt;a href="https://github.com/falcosecurity/rules/blob/main/rules/falco_rules.yaml" rel="noopener noreferrer"&gt;&lt;strong&gt;/etc/falco/falco_rules.yaml&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;spawned_process&lt;/strong&gt; macro condition filters system call events by &lt;strong&gt;execve&lt;/strong&gt;, which is the syscall for executing a new program in Linux, and &lt;strong&gt;evt.dir=&amp;lt;&lt;/strong&gt; means the syscall is entering, i.e., the execution is starting.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;container macro&lt;/strong&gt; checks that the event is coming from a container and not the host system.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, we define a rule using the macro above. The rule is triggered when a process is started (spawned_process) and it happens inside a container, and the process name is bash (i.e., someone is starting a shell).&lt;/p&gt;

&lt;p&gt;In the rule’s output, we include useful context using &lt;a href="https://falco.org/docs/reference/rules/supported-fields/#field-class-user" rel="noopener noreferrer"&gt;user fields&lt;/a&gt;, &lt;a href="https://falco.org/docs/reference/rules/supported-fields/#field-class-container" rel="noopener noreferrer"&gt;container fields&lt;/a&gt;, and &lt;a href="https://falco.org/docs/reference/rules/supported-fields/#field-class-k8s" rel="noopener noreferrer"&gt;k8s fields&lt;/a&gt; to get Kubernetes-related metadata.&lt;/p&gt;

&lt;p&gt;📝 &lt;strong&gt;NOTE:&lt;/strong&gt; In the exam, you are allowed to access the Falco &lt;a href="https://falco.org/docs/reference/rules/examples/" rel="noopener noreferrer"&gt;example rules&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✍️ Falco in the exam
&lt;/h2&gt;

&lt;p&gt;In the exam, you will encounter at least one Falco-related task. You may be asked to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run Falco with custom rules on a specific worker node and save logs of detected malicious processes.&lt;/li&gt;
&lt;li&gt;Investigate Falco logs to identify malicious containers and gather details Kubernetes Pod name and namespace using the &lt;a href="https://kubernetes.io/docs/tasks/debug/debug-cluster/crictl/" rel="noopener noreferrer"&gt;crictl tool&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When solving tasks, adopt the mindset of a security engineer, as the questions typically reflect real-world scenarios that a Kubernetes security professional would face.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;TIP:&lt;/strong&gt; Keep the Falco documentation accessible during the exam, particularly the &lt;a href="https://falco.org/docs/reference/rules/supported-fields/" rel="noopener noreferrer"&gt;Supported Fields for Conditions and Outputs&lt;/a&gt; page, as you’ll need to understand which event fields to include in your Falco logs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Up Next
&lt;/h2&gt;

&lt;p&gt;In the upcoming article, we will gain hands-on Falco experience by installing it, implementing custom rules, and analyzing Falco logs — essential practice for the CKS exam.&lt;/p&gt;

&lt;p&gt;To accelerate your preparation, check out my &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;CKS Handbook — 2nd Edition&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; which provides comprehensive coverage of Falco and all other CKS exam topics_,_ updated to reflect the latest curriculum changes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As a thank you to the readers of this article, use discount code&lt;/em&gt; &lt;strong&gt;&lt;em&gt;FALCO15&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;to&lt;/em&gt; &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;&lt;em&gt;get 15% off&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on my&lt;/em&gt; &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;&lt;em&gt;CKS Handbook — 2nd Edition&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. — Puru&lt;/em&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%2Fi2yxabv1y6q0tn1np2i9.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%2Fi2yxabv1y6q0tn1np2i9.png" alt="CKS Handbook - 2nd Edition" width="455" height="774"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>falco</category>
      <category>kubernetes</category>
      <category>security</category>
      <category>cks</category>
    </item>
    <item>
      <title>Cilium: Everything you need to know for CKS</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Thu, 16 Jan 2025 06:44:53 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/cilium-everything-you-need-to-know-for-cks-31pa</link>
      <guid>https://forem.com/ptuladhar3/cilium-everything-you-need-to-know-for-cks-31pa</guid>
      <description>&lt;p&gt;First of all, I am excited to share that I've officially become a Kubestronaut (2 weeks ago, &lt;a href="http://linkedin.com/pulse/kubestronaut-becoming-one-puru-tuladhar-lndvf" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;). Among the five Kubernetes certifications, the CKS (Certified Kubernetes Security Specialist) was by far the toughest. In fact, I missed passing on my first attempt by just 2% (&lt;a href="https://www.linkedin.com/pulse/how-2-failure-turned-success-my-cks-exam-experience-puru-tuladhar-oniif/" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;). That experience inspired me to create the &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;CKS Handbook&lt;/a&gt;, which is now in its &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;2nd Edition&lt;/a&gt;, updated to reflect the latest changes to the CKS curriculum.&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%2Fio11d8nlcnamm7x6tq0y.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%2Fio11d8nlcnamm7x6tq0y.png" alt="Kubestronaut" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the &lt;a href="https://training.linuxfoundation.org/cks-program-changes/" rel="noopener noreferrer"&gt;Oct 2024 CKS exam program&lt;/a&gt; changes, &lt;strong&gt;implementing Pod-to-Pod encryption using Cilium&lt;/strong&gt; is now a key topic under the &lt;strong&gt;Minimizing Micro-services Vulnerability&lt;/strong&gt; domain. In this blog, we'll explore Cilium and everything you need to know about Cilium traffic encryption for the exam.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting to know Cilium
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cilium.io/" rel="noopener noreferrer"&gt;Cilium&lt;/a&gt; is an open-source, cloud-native solution providing networking, security, and observability for cloud-native environments such as Kubernetes clusters. &lt;/p&gt;

&lt;p&gt;Cilium's core is built upon the revolutionary Linux kernel technology called eBPF which allows the dynamic insertion of control logic into the Linux kernel. Cilium offers many powerful features, but for the CKS exam, the focus is on Cilium's transparent encryption capability.&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%2Fxk99qjfz4iosi12y80bi.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%2Fxk99qjfz4iosi12y80bi.png" alt="Cilium Overview" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Cilium Architecture
&lt;/h3&gt;

&lt;p&gt;Cilium's architecture comprises four key components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;agent&lt;/strong&gt; (&lt;code&gt;cilium-agent&lt;/code&gt;) runs as a pod on each node in the Kubernetes cluster as a DaemonSet. The agent manages the eBPF programs which the Linux Kernel uses to control all network access in/out of those containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;client&lt;/strong&gt; (&lt;code&gt;cilium-dbg&lt;/code&gt;) is a command-line tool bundled with the Cilium agent. It interacts with the Cilium agent API on the same node for inspecting the state and status of the local agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;operator&lt;/strong&gt; is responsible for cluster-wide Cilium operations, and there should only be one active operator per cluster. For high availability, the Cilium operator uses Kubernetes leader election library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;CNI plugin&lt;/strong&gt; (&lt;code&gt;cilium-cni&lt;/code&gt;) is invoked by Kubernetes when a pod is scheduled or terminated on a node. The plugin interacts with the Cilium agent to configure networking, load-balancing, and network policies for the pod.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2F78m2op8g0hyn2ay4fegv.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%2F78m2op8g0hyn2ay4fegv.png" alt="Cilium Components" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What you need to know
&lt;/h2&gt;

&lt;p&gt;The CKS exam requires that you know how to implement pod-to-pod traffic encryption using Cilium. In Cilium terms, this feature is called &lt;strong&gt;transparent encryption&lt;/strong&gt; and there are two options to encrypt traffic: IPSec and WireGuard. Both of these are VPN technology that enables secure communication between pods across different nodes in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;By default, Kubernetes doesn't natively offer encryption of data in transit as such this feature is essential for several reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Compliance requirements: Many regulatory frameworks, such as PCI and HIPAA, mandate the encryption of data in transit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security: Encryption prevents man-in-the-middle (MITM) attacks, ensuring that sensitive information remains confidential as it travels across potentially unsecured networks.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fknwxdsq8rcp2qq7k2e7h.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%2Fknwxdsq8rcp2qq7k2e7h.png" alt="Encryption of data in transit" width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Verify Encryption Status
&lt;/h3&gt;

&lt;p&gt;You can verify the encryption status of Cilium deployment using cilium CLI from any of the running Cilium agents using the following 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="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; ds/cilium &lt;span class="nt"&gt;--&lt;/span&gt; cilium encrypt status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the default Cilium deployment, the output will show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encryption: Disabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pod-to-Pod Encryption via IPSec
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; First, we need to generate a random Pre-Shared Key (PSK)&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;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/urandom &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;20 &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 2&amp;gt;/dev/null | xxd &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; We need to store this as a Kubernetes secret. Cilium will use this secret and mount it as a volume in the cilium-agent Pods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system secret generic cilium-ipsec-keys &lt;span class="nt"&gt;--from-literal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"3+ rfc4106(gcm(aes)) &lt;/span&gt;&lt;span class="nv"&gt;$PSK&lt;/span&gt;&lt;span class="s2"&gt; 128"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Install Cilium and configure IPsec encryption.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cilium &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--encryption&lt;/span&gt; ipsec
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4.&lt;/strong&gt; Verify that IPSec encryption is active. The output should show "Encryption: IPSec" and IPSec key details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encryption: IPsec
Keys in use: 1
Max Seq. Number: 0x0/0xffffffff
Errors: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pod-to-Pod Encryption via WireGuard
&lt;/h3&gt;

&lt;p&gt;Unlike IPsec, WireGuard automates encryption key pair generation and rotation, so there's no need to create an encryption key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Install Cilium and configure WireGuard encryption.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cilium install --encryption wireguard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Verify that WireGuard encryption is active. The output should show "Encryption: Wireguard" and WireGuard interface details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encryption: Wireguard
Interface: cilium_wg0
        Public key: nw2/evMwulhWhb3yij0J6T6ET9cPypExeUM5rKyKGHs=
        Number of peers: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;I hope this guide has provided valuable insights to help you prepare for the CKS exam. For more detailed guidance, consider exploring my &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;CKS Handbook&lt;/a&gt; which provides detailed step-by-step guidance on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Configuring Pod-to-Pod encryption with IPsec and WireGuard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigating other CKS domain topics effectively.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The updated second edition is designed to align with the latest exam curriculum.&lt;/p&gt;

&lt;p&gt;📕 Grab your copy of the &lt;a href="https://cks.purutuladhar.com/" rel="noopener noreferrer"&gt;CKS Handbook - 2nd Edition&lt;/a&gt; today with discount code &lt;code&gt;ENCRYPT25&lt;/code&gt; to &lt;strong&gt;get 25% off&lt;/strong&gt; as a thank-you for readers of this article - Puru&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%2Fpsm25rej3jtyrgvfghn1.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%2Fpsm25rej3jtyrgvfghn1.png" alt="CKS Handbook - 2nd Edition" width="800" height="737"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cilium</category>
      <category>cks</category>
      <category>certification</category>
    </item>
    <item>
      <title>11th Dec 2024 — OpenAI Outage (ChatGPT) Explained: Kubernetes Clusters on Fire!</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Mon, 16 Dec 2024 13:29:41 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/11th-dec-2024-openais-kubernetes-outage-explained-3351</link>
      <guid>https://forem.com/ptuladhar3/11th-dec-2024-openais-kubernetes-outage-explained-3351</guid>
      <description>&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%2Fudcsji750akt8urvyqrb.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%2Fudcsji750akt8urvyqrb.png" alt="Source: " width="696" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last week, December 11th, 2024, OpenAI faced an SRE nightmare. A &lt;a href="https://status.openai.com/incidents/ctrsv3lwd797" rel="noopener noreferrer"&gt;major platform outage&lt;/a&gt; lasting four hours affected &lt;a href="https://chat.com/" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt; and &lt;a href="https://openai.com/index/sora/" rel="noopener noreferrer"&gt;SORA&lt;/a&gt; (OpenAI's video generation model) due to faulty service deployment, bringing down their largest Kubernetes clusters to the knees. On-call engineers were locked out of the cluster, preventing them from running kubectl.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rollout turned bad
&lt;/h3&gt;

&lt;p&gt;The root cause was a bad rollout strategy for their new telemetry service deployment, which collected Kubernetes control plane metrics. This telemetry service overwhelmed the API server by sending a high volume of resource-intensive API calls, the cost of which scaled with the size of the cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Service not discovering
&lt;/h3&gt;

&lt;p&gt;The worst part was that the issue was not caught until the rollout began fleet-wide and propagated to their largest clusters running mission-critical workloads. DNS caching mitigated the impact temporarily by providing stale cached records to DNS queries, it only made the issue worse.&lt;/p&gt;

&lt;p&gt;After the DNS cache expired over the following 20 minutes, the telemetry service rollout had already propagated to their largest clusters running mission-critical workloads, and suddenly, a surge of real-time DNS queries overloaded the DNS server (CoreDNS likely) running on their control plane, which is already on stress due to telemetry service running resource-intensive API operations. As a result, the DNS-based service discovery for the cluster became unresponsive, leading to the application pod not being able to perform real-time DNS resolutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  No way to get into the cluster
&lt;/h3&gt;

&lt;p&gt;On-call engineers were not able to roll back this telemetry service as they were locked out and unable to access the Kubernetes control plane due to extensive load. I've experienced this exact issue before, and anyone who's faced this situation knows just how challenging it can be to recover an unresponsive API server.&lt;/p&gt;

&lt;p&gt;Ultimately, they were able to recover the API server and bring clusters back up by reducing the API operations in several ways, such as blocking network access to Kubernetes admin APIs and scaling up Kubernetes API servers. Finally, they rolled back the faulty telemetry service deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson re-learned
&lt;/h3&gt;

&lt;p&gt;In response to this major outage, OpenAI has laid out the following action items to prevent such large-scale outages from happening again.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Firstly, the phased rollout will be improved going forward by continuously monitoring the health of the workload and the Kubernetes control plane.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conduct fault injection testing to ensure that the Kubernetes data plane running production workloads can function without a control plane for a longer period of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get rid of the dependency on Kubernetes DNS for service discovery and decouple the Kubernetes data plane from the control plane to ensure the control plane doesn't play any major role in processing production workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement a break-glass mechanism for on-call engineers to be able to access the Kubernetes API server under any circumstances.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In today’s fast-paced, AI-driven world, where you can ship features as fast as you can think, platform reliability is crucial. This incident underscores that delivering features reliably is no easy feat, and if not planned properly, it directly impacts the product, consumers, and investors.&lt;/p&gt;




&lt;p&gt;And remember, when in doubt, it's always DNS. After all, if it's not DNS, it's probably just DNS pretending to be something else! - &lt;a href="https://purutuladhar.com" rel="noopener noreferrer"&gt;Puru Tuladhar&lt;/a&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%2F1814xh6y6oe1kphvifwh.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%2F1814xh6y6oe1kphvifwh.png" alt="It's always DNS!" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>openai</category>
      <category>chatgpt</category>
      <category>outage</category>
    </item>
    <item>
      <title>Avoid Using “bloated” Node.js Docker Image in Production!</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Mon, 21 Oct 2024 14:09:00 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/avoid-using-bloated-nodejs-docker-image-in-production-3doc</link>
      <guid>https://forem.com/ptuladhar3/avoid-using-bloated-nodejs-docker-image-in-production-3doc</guid>
      <description>&lt;h2&gt;
  
  
  🏃‍➡️ TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;❌ Avoid "bloated" image in production: &lt;code&gt;node:22&lt;/code&gt;, &lt;code&gt;node:latest&lt;/code&gt;, &lt;code&gt;node:lts&lt;/code&gt;, &lt;code&gt;node:current&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✅ Use "slim" variant image in production, i.e., &lt;code&gt;node:lts-slim&lt;/code&gt;, &lt;code&gt;node:22-slim&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;❌ Avoid "non-LTS" and odd-numbered releases, i.e., &lt;code&gt;node:slim&lt;/code&gt;, &lt;code&gt;node:current-slim&lt;/code&gt;, &lt;code&gt;node:bookworm-slim&lt;/code&gt;,  &lt;code&gt;node:23&lt;/code&gt;, &lt;code&gt;node:21&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✅ Use even-numbered "LTS" release, i.e., &lt;code&gt;node:20-slim&lt;/code&gt;, &lt;code&gt;node:22-slim&lt;/code&gt;, &lt;code&gt;node-lts-slim&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤦🏻‍♂️ Bad choice
&lt;/h2&gt;

&lt;p&gt;As per Docker Hub, Node.js image gets 9 million weekly image pulls with 1+ Billion image already pulled and counting.&lt;/p&gt;

&lt;p&gt;Unfortunately, use of &lt;code&gt;buildpack-deps&lt;/code&gt; based version of NodeJS image by default leads to unnecessarily bloated image, full of dev packages, compilers and &lt;a href="https://www.cvedetails.com/vulnerability-list/vendor_id-12113/nodejs.html" rel="noopener noreferrer"&gt;riddled with CVEs&lt;/a&gt;. &lt;strong&gt;Avoid using "bloated" image at all cost in production, but why?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slower deployment times&lt;/strong&gt;: "bloated" images are significantly larger, slows down deployment times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disk spaces&lt;/strong&gt;: "bloated" image due to it's size, consumes more disk space when uncompressed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security risks&lt;/strong&gt;: With more packages included, higher risk to new security vulnerabilities and supply chain attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slow startup-times&lt;/strong&gt;: A larger image can slow down startup times.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://x.com/iximiuz" rel="noopener noreferrer"&gt;Ivan&lt;/a&gt; from &lt;a href="https://labs.iximiuz.com/" rel="noopener noreferrer"&gt;iximiuz Labs&lt;/a&gt; did a post mortem analysis of &lt;code&gt;node:22&lt;/code&gt; image and highlights the &lt;code&gt;buildpack-deps:stable&lt;/code&gt; and &lt;code&gt;buildpack-deps:scm&lt;/code&gt; layer image on-top of Debian base image (bookworm) is where all the "bloat" comes from, including a full Python installation and the GNU Compiler Collection (GCC), which contributes to larger image size.&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%2Flgaurnorsmerp4jjzu9y.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%2Flgaurnorsmerp4jjzu9y.png" alt="Source: iximiuz Labs" width="577" height="415"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 🤯 &amp;gt;1GB in image size 
$ docker images node

REPOSITORY   TAG              IMAGE ID       CREATED       SIZE
node         22               c9d4a6dda881   4 days ago    1.12GB
node         bookworm         8c96be300ba8   4 days ago    1.12GB
node         current          8c96be300ba8   4 days ago    1.12GB
node         latest           8c96be300ba8   4 days ago    1.12GB
node         lts              85f76d7c2b89   2 weeks ago   1.1GB

# 🪲 Riddle with vulnerable libraries
$ trivy image -q node:22

node:22 (debian 12.7)
=====================
Total: 997 (UNKNOWN: 4, LOW: 492, MEDIUM: 419, HIGH: 76, CRITICAL: 6)

# 🤨 Do you need GCC compiler?
$ docker run --rm -it node:22 gcc --version

gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# or 🐍 full Python installation?
$ docker run --rm -it node:22 python3 --version

Python 3.11.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  😌 Be calm and use "slim" variant
&lt;/h2&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%2F8zzoyah2jogthea7wu0n.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%2F8zzoyah2jogthea7wu0n.png" alt="Source: iximiuz Labs" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see from above image, "bloated" image is perfect as a builder image during build stage and "slim" variant as a runtime image for production use.&lt;/p&gt;

&lt;p&gt;"Slim" variant is 80% thinner with lot less build/dev packages, that means faster deploys, less disk space, more secure, faster start up times.&lt;/p&gt;

&lt;p&gt;For most Node.js projects running "slim" variant in production is a safer and optimal choice due to it's balanced of size and installed packages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Use "slim" variant for production
FROM node:lts-slim
FROM node:22-slim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 👌🏻 Thinner and smaller image size
$ docker images node
REPOSITORY   TAG              IMAGE ID       CREATED       SIZE
node         22-slim          ddf2ab152dc9   4 days ago    240MB
node         22-alpine        e906dc0e8219   4 days ago    153MB
node         lts-slim         1658b30e8115   2 weeks ago   220MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚠️ Be careful with "Alpine" variant
&lt;/h2&gt;

&lt;p&gt;Even though "alpine" variant is 30% thiner than "slim" variant, avoid using it for mission-critical NodeJS applications.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alpine is considered experimental and not officially supported target platform for Node.JS.&lt;/li&gt;
&lt;li&gt;"Slim" variant uses Debian, while "Alpine" variant uses &lt;a href="https://alpinelinux.org/" rel="noopener noreferrer"&gt;Alpine Linux&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Alpine uses "&lt;a href="https://www.musl-libc.org/" rel="noopener noreferrer"&gt;Musl&lt;/a&gt;" C library instead of widespread &lt;a href="https://www.gnu.org/software/libc/" rel="noopener noreferrer"&gt;GNU C Library (glibc)&lt;/a&gt; which leads to compatibility issue and unexpected behaviors or bugs.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Avoid "alpine" variant for mission-critical applications
FROM node:lts-alpine
FROM node:current-alpine
FROM node:22-alpine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🤔 But, when should I use "bloated" image?
&lt;/h2&gt;

&lt;p&gt;A "bloated", "full", "debug" image variant includes a full set of development tools and libraries, making it an ideal choice during development but not for production.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After all, just like a chef who brings every spice to the kitchen, it's great for cooking up ideas but not so much for serving dinner! - AI&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A "bloated" image serve as a &lt;strong&gt;builder image&lt;/strong&gt; for the &lt;a href="https://docs.docker.com/build/building/multi-stage/" rel="noopener noreferrer"&gt;multi-stage builds&lt;/a&gt;, and slim image for the final runtime stage, resulting in an optimized, small, secure image that is ready for production use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Build stage
FROM node:22-lts as builder
WORKDIR /app
COPY . .
RUN npm install &amp;amp;&amp;amp; npm run build

# Runtime stage
FROM node:22-slim
ENV NODE_ENV=production
WORKDIR /app
COPY --from=builder /app/dist ./dist
USER node
CMD ["node", "dist/index.js"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🙃 Wait, what about Distroless variant?
&lt;/h2&gt;

&lt;p&gt;Well…distroless variant is ~30% thinner compared to "slim" variant, and is more secure with no shell, no package manager. But…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Distroless" variant is not officially supported by Node.js team.&lt;/li&gt;
&lt;li&gt;"Distroless" variant do not maintain latest LTS version, unless you pay.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google provides "distroless" variant but you will get outdated Node.js version that is currently in maintenance mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# You get maintenance mode version
$ docker run -it --rm gcr.io/distroless/nodejs --version 
v18.15.0

# Slightly smaller than "slim" variant
$ docker images gcr.io/distroless/nodejs
REPOSITORY                 TAG       IMAGE ID       CREATED         SIZE
gcr.io/distroless/nodejs   latest    5fafa8030b0b   19 months ago   161MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://images.chainguard.dev/directory/image/node/versions" rel="noopener noreferrer"&gt;Chainguard&lt;/a&gt; also offers distroless variant but only "latest" tag is free to use which uses non-LTS version, and other tags node:22 is only available for paid users.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Free to use
$ docker run -it --rm cgr.dev/chainguard/node:latest --version
v23.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to run your mission-critical Node.js applications in highly regulated, secure environment then &lt;a href="https://images.chainguard.dev/directory/image/node/" rel="noopener noreferrer"&gt;Chainguard&lt;/a&gt; is your best option.&lt;/p&gt;




&lt;h2&gt;
  
  
  👋 Looking for more?
&lt;/h2&gt;

&lt;p&gt;Feel free to follow me on &lt;a href="https://twitter.com/ptuladhar3" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; or &lt;a href="https://www.linkedin.com/in/ptuladhar3/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; for more insightful contents.&lt;/p&gt;

&lt;p&gt;P.S. Don't forget to checkout &lt;a href="https://labs.iximiuz.com/tutorials/how-to-choose-nodejs-container-image" rel="noopener noreferrer"&gt;this insightful tutorial&lt;/a&gt; by Ivan and get hands-on on &lt;a href="https://labs.iximiuz.com/" rel="noopener noreferrer"&gt;iximiuz Labs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>node</category>
    </item>
    <item>
      <title>🍏 If I Got a New Mac, Here's What I'd Install First as a DevOps Engineer 🧑‍💻</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Mon, 30 Sep 2024 07:55:38 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/if-i-got-a-new-mac-heres-what-id-install-first-as-a-devops-engineer-3nec</link>
      <guid>https://forem.com/ptuladhar3/if-i-got-a-new-mac-heres-what-id-install-first-as-a-devops-engineer-3nec</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Whenever I get a new Mac, the first thing I do is set it up with the apps and tools that make my workflow smooth. These apps help me stay productive, organized, and ready for whatever comes my way. Here's my go-to list of must-have installs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Accepting Contribution for Hacktoberfest 2024! ✨ - &lt;a href="https://github.com/tuladhar/devops-on-mac" rel="noopener noreferrer"&gt;Contribute now!&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Essentials for Work and Dev
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌏 Arc&lt;/strong&gt; → My Safari/Chrome replacement for a cleaner browsing experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📺 Warp&lt;/strong&gt; → My favorite replacement for the built-in Terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📺 Alacritty&lt;/strong&gt; → Another solid Terminal option.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;↔️ Easy+Move+Resize&lt;/strong&gt; → Easily move and resize windows like on Linux.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐳 Docker Desktop&lt;/strong&gt; → For all things Docker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📊 iStat Menus&lt;/strong&gt; → Keeping an eye on system performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐶 k9s&lt;/strong&gt; → A terminal UI for interacting with Kubernetes clusters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐚 Fish&lt;/strong&gt; → My shell of choice, replacing bash and zsh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📺 Zellij&lt;/strong&gt; → My preferred Tmux replacement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📂 exa&lt;/strong&gt; → An enhanced &lt;code&gt;ls&lt;/code&gt; command replacement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📦 Homebrew + Nix&lt;/strong&gt; → Package managers to handle everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🌈 kubecolor&lt;/strong&gt; → Makes &lt;code&gt;kubectl&lt;/code&gt; outputs more readable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code Editors and Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🤖 Cursor&lt;/strong&gt; (📙 &lt;a href="https://ptuladhar.gumroad.com/l/a-beginners-guide-to-using-cursor-the-ai-code-editor" rel="noopener noreferrer"&gt;Checkout My Book&lt;/a&gt;) → VS Code replacement powered by AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📝 Sublime Text&lt;/strong&gt; → My all-time favorite for quick note-taking or file editing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐙 GitHub Desktop with GH CLI&lt;/strong&gt; → For managing Git repositories easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  macOS Enhancements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔎 Raycast&lt;/strong&gt; → Replaces Spotlight, streamlines productivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔘 ChatGPT&lt;/strong&gt; → My AI assistant on macOS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Creative and Visual Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🎨 Pixelmator Pro&lt;/strong&gt; → Photoshop for Mac.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎥 GIPHY Capture&lt;/strong&gt; → Simple GIF creation tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Productivity Boosters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;✍️ Day One&lt;/strong&gt; → Daily journaling for tracking life and work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚫️ Obsidian&lt;/strong&gt; → Powerful note-taking app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔵 Trello&lt;/strong&gt; → Organizing projects and tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Miscellaneous
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌝 Flux&lt;/strong&gt; → Reduces eye strain by adjusting screen brightness at night.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⬇️ Motrix&lt;/strong&gt; → The best download manager I’ve found.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🟣 OrbStack&lt;/strong&gt; → Lightweight Linux VM on Mac.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🟠 Multipass&lt;/strong&gt; → Another VM option for running Linux.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⏯️ VLC&lt;/strong&gt; → My go-to video player.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🦙 Ollama&lt;/strong&gt; → Run LLMs (Large Language Models) locally.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;These are my personal picks, and I’ve found them incredibly useful. If you found this list helpful, please give it a thumbs up, and let me know if there are any apps or tools you think I should try out! 🙌&lt;/p&gt;

&lt;p&gt;🤝 &lt;a href="https://www.linkedin.com/in/ptuladhar3/" rel="noopener noreferrer"&gt;LinkedIn (@ptuladhar3)&lt;/a&gt; | &lt;a href="https://twitter.com/tuladhar" rel="noopener noreferrer"&gt;X (@tuladhar)&lt;/a&gt; | &lt;a href="https://github.com/tuladhar" rel="noopener noreferrer"&gt;GitHub (@tuladhar)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👍 Did you found it helpful? If so, please &lt;a href="https://github.com/tuladhar/devops-on-mac/tree/main" rel="noopener noreferrer"&gt;give it a star&lt;/a&gt; ⭐️ and feel free to create an issue or submit a PR for any apps you'd like to include! 🙌&lt;/p&gt;

</description>
      <category>devops</category>
      <category>mac</category>
      <category>productivity</category>
    </item>
    <item>
      <title>✋🏻 Stop using VS Code Use This — Cursor: The AI Code Editor</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Wed, 25 Sep 2024 09:04:44 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/stop-using-vs-code-use-this-cursor-the-ai-code-editor-2977</link>
      <guid>https://forem.com/ptuladhar3/stop-using-vs-code-use-this-cursor-the-ai-code-editor-2977</guid>
      <description>&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%2Fgsz585pa889utal0uyop.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%2Fgsz585pa889utal0uyop.png" alt="Book: A Beginner’s Guide to Using Cursor — The AI Code Editor" width="522" height="702"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👋 Welcome to the Future of Coding with AI! 🤖&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The rise of AI-assisted code editors is transforming programming, making it faster and more efficient. If you’re ready to embrace this shift, my book, “&lt;a href="https://ptuladhar.gumroad.com/l/a-beginners-guide-to-using-cursor-the-ai-code-editor" rel="noopener noreferrer"&gt;A Beginner’s Guide to Using Cursor — The AI Code Editor&lt;/a&gt;,” is the perfect starting point. Whether you’re a beginner or looking to level up, AI can help you write and refine large portions of your code, streamlining your workflow.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unlock the full potential of AI in coding with my step-by-step beginner’s guide! &lt;a href="https://ptuladhar.gumroad.com/l/a-beginners-guide-to-using-cursor-the-ai-code-editor" rel="noopener noreferrer"&gt;Grab your copy here&lt;/a&gt; with 50% discount, use “CURSOR50”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🤨 What is Cursor?
&lt;/h2&gt;

&lt;p&gt;Cursor is a cutting-edge, AI-powered code editor designed to supercharge coding efficiency for developers of all skill levels. By leveraging advanced AI models like GPT-4 and Claude, Cursor offers intelligent code suggestions, automates repetitive tasks, and helps you become better developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💰 Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cursor offers a free tier that gives you access to powerful coding models like GPT-4, GPT-4o, and Claude 3.5 Sonnet. For those who need more advanced AI capabilities, the Pro plan is available at $20 per month, unlocking even more features and extended AI usage.&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%2F28lsxs30ujhvrubiox6t.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%2F28lsxs30ujhvrubiox6t.png" alt="Source: Cursor Pricing" width="514" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🪪 You Own Your Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Regardless of whether you’re using the Free, Pro, or Business version, all code generated with Cursor is entirely yours — including for commercial purposes. Your code, your rules.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ Install Cursor
&lt;/h2&gt;

&lt;p&gt;Getting started with Cursor is simple. Just head over to cursor.com, and download the installer for your platform. Whether you’re on Windows, macOS, or Linux, installation is quick and easy so you can start coding with AI in no 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%2F5in1cszrnn37re53w368.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%2F5in1cszrnn37re53w368.png" alt="Install" width="469" height="214"&gt;&lt;/a&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%2Fe76sd7hwteaysg8ge0r6.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%2Fe76sd7hwteaysg8ge0r6.png" alt="Mac" width="510" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; For Linux users, the download will be in the form of an AppImage. You’ll need to make it executable before running it.&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%2Ffvubvlnzag05ptk33eet.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%2Ffvubvlnzag05ptk33eet.png" alt="Linux" width="525" height="239"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Quickly Exploring Cursor’s AI Capabilities
&lt;/h2&gt;

&lt;p&gt;Now that you’ve installed Cursor, let’s take a quick glimpse into some of its powerful AI features highlighted in the book that can elevate your coding experience!&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%2F915810ha13y7eyvkpkea.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%2F915810ha13y7eyvkpkea.png" alt="Cursor Tab" width="473" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cursor Tab is an AI-driven autocomplete feature that helps you complete your code efficiently. It anticipates your next moves and suggests changes to multiple lines simultaneously, streamlining your coding process.&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%2Fasu46ftgtudwyyfcqco0.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%2Fasu46ftgtudwyyfcqco0.png" alt="Cursor Tab" width="540" height="423"&gt;&lt;/a&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%2Feejen4vu06qynx7mi8f7.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%2Feejen4vu06qynx7mi8f7.png" alt="Cursor Tab" width="545" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cursor Tab enables users to make complex edits with minimal keystrokes — often just a press of the Tab key. This represents a shift in coding tasks, allowing you to focus more on high-level logic and design rather than getting bogged down in syntax details.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;🔔 Don’t forget to connect with me on: &lt;a href="https://www.linkedin.com/in/ptuladhar3/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &amp;amp; follow me on: &lt;a href="https://twitter.com/tuladhar" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&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%2F23sstghno4k747wqgyvg.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%2F23sstghno4k747wqgyvg.png" alt="Cursor Chat" width="458" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cursor Chat lets you communicate with an AI using natural language, while accessing your entire codebase. This integration enhances your coding experience by allowing developers to ask questions directly within the editor, eliminating the need to switch to external sources for help.&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%2Fgpu2uav79dixgk30jkjm.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%2Fgpu2uav79dixgk30jkjm.png" alt="Cursor Chat" width="538" height="533"&gt;&lt;/a&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%2Fcxiz911rja94cfoqat6g.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%2Fcxiz911rja94cfoqat6g.png" alt="Cursor Code" width="470" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cursor allows developers to efficiently edit and generate new code using natural language. This feature streamlines the coding process, letting you express your intentions in plain language and watch as Cursor translates them into functional code.&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%2F3ri91etlic8d572jr79w.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%2F3ri91etlic8d572jr79w.png" alt="Cursor Code" width="527" height="357"&gt;&lt;/a&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%2Ftnwqxih1vcpchisj6s1a.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%2Ftnwqxih1vcpchisj6s1a.png" alt="Cursor Code" width="519" height="476"&gt;&lt;/a&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%2F6fegi9m1sers61qmdqch.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%2F6fegi9m1sers61qmdqch.png" alt="Cursor Composer" width="468" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cursor Composer is an advanced feature that empowers you to edit multiple files and generate full applications using AI. Here are some of its key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-file Editing&lt;/li&gt;
&lt;li&gt;Full Application Generation&lt;/li&gt;
&lt;li&gt;Contextual Understanding&lt;/li&gt;
&lt;li&gt;Interactive Refinement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ps4g5evfy773loakwjn.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%2F9ps4g5evfy773loakwjn.png" alt="Cursor Composer" width="522" height="631"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;🔔 Don’t forget to connect with me on: &lt;a href="https://www.linkedin.com/in/ptuladhar3/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &amp;amp; follow me on: &lt;a href="https://twitter.com/tuladhar" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;Cursor AI is a game-changer in coding, but remember that it’s not a substitute for your expertise. Think of it as a coding assistant — its effectiveness depends on how clearly you communicate your instructions. The more detailed your guidance, the more valuable the support will be.&lt;/p&gt;

&lt;p&gt;If you’re interested in learning more, check out my Beginner’s Guide to Using Cursor! Use the code CURSOR50 for a 50% discount! — &lt;a href="https://ptuladhar.gumroad.com/l/a-beginners-guide-to-using-cursor-the-ai-code-editor" rel="noopener noreferrer"&gt;Explore it here&lt;/a&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%2F85ea0x28pzos33gz63na.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%2F85ea0x28pzos33gz63na.png" alt="Source: A Beginner’s Guide to Using Cursor — The AI Code Editor" width="715" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>vscode</category>
      <category>dev</category>
    </item>
    <item>
      <title>Must Know 5 Vim Tricks (with GIF) for Kubernetes Certification</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Tue, 10 Sep 2024 07:42:13 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/must-know-5-vim-tricks-with-gif-for-kubernetes-certification-52bn</link>
      <guid>https://forem.com/ptuladhar3/must-know-5-vim-tricks-with-gif-for-kubernetes-certification-52bn</guid>
      <description>&lt;p&gt;Today, we’re diving into the world of Vim, and trust me, if you’re gearing up for Kubernetes certifications, these tricks are going to be your best friends.&lt;/p&gt;

&lt;p&gt;As we all know, Kubernetes exams (CKA, CKS, and more) are tough and demands strong hands-on command-line skills, and mastering Vim can significantly enhance your efficiency during the exam and level 🆙 your game!&lt;/p&gt;

&lt;p&gt;In this post, we’ll reveal five practical Vim tricks that will improve your editing and boost your efficiency, making your exam experience smoother and more effective.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  📢 Special Annoucement!
&lt;/h3&gt;

&lt;p&gt;My book &lt;a href="https://ptuladhar.gumroad.com/l/cks-handbook" rel="noopener noreferrer"&gt;Certified Kubernetes Security Specialist (CKS) Handbook&lt;/a&gt;, is now &lt;strong&gt;available for pre-order with 50% early bird discount!&lt;/strong&gt; — Use discount code EARLYBIRD during checkout: 👉 &lt;a href="https://ptuladhar.gumroad.com/l/cks-handbook" rel="noopener noreferrer"&gt;Checkout here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s jump in and sharpen those Vim skills with these essential tricks!&lt;/p&gt;




&lt;h2&gt;
  
  
  1 - Display Line Number and Use Goto Line
&lt;/h2&gt;

&lt;p&gt;It's crucial to easily navigate and jump to specific lines in YAML manifests as you work on tasks.​ Here's how to show line numbers and use goto to quickly jump into specific line.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;In Normal Mode:&lt;/strong&gt; Type &lt;code&gt;:set nu&lt;/code&gt; to display line numbers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jump to Specific Line:&lt;/strong&gt; Type &lt;code&gt;:10&lt;/code&gt; to jump directly to line 10.&lt;/li&gt;
&lt;/ol&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%2Fvffsk5v6ylrbhncr7oni.gif" 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%2Fvffsk5v6ylrbhncr7oni.gif" alt="GIF: Display Line Number and Goto Line" width="748" height="636"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2 - Smart Indent
&lt;/h2&gt;

&lt;p&gt;When copying and customizing YAML manifests from documentation, proper indentation is crucial for valid YAML syntax. Follow these steps to easily manage indentation in Vim:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enter Visual Mode:&lt;/strong&gt; Press &lt;code&gt;Shift + v&lt;/code&gt; to select the current line of text. Use the ↑ ↓ arrow or j k keys (recommended) to extend the selection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Indent Right:&lt;/strong&gt; Press &lt;code&gt;&amp;gt;&lt;/code&gt; to indent the selected text to the right. Press &lt;code&gt;.&lt;/code&gt; to repeat the indentation if needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Indent Left:&lt;/strong&gt; To indent text to the left, repeat steps 1 and 2, but use &lt;code&gt;&amp;lt;&lt;/code&gt; instead of &lt;code&gt;&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Highlight Previous Selection:&lt;/strong&gt; Use &lt;code&gt;gv&lt;/code&gt; to reselect the previously highlighted text.&lt;/li&gt;
&lt;/ol&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%2Frvnnxpu68xpzpj19wygn.gif" 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%2Frvnnxpu68xpzpj19wygn.gif" alt="GIF: Smart indent" width="748" height="636"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3 - Effective Cut, copy, paste and undo lines
&lt;/h2&gt;

&lt;p&gt;Quickly rearrange, duplicate, or correct mistakes in your YAML manifests. Here's how you to effectively cut, copy a line and paste it above or below another line and to undo previous action.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Copy a Line:&lt;/strong&gt; Press &lt;code&gt;yy&lt;/code&gt; to copy the current line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paste Above:&lt;/strong&gt; Use &lt;code&gt;Shift + p&lt;/code&gt; to paste the cut line above the current line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paste Below:&lt;/strong&gt; Use &lt;code&gt;p&lt;/code&gt; to paste the cut line below the current line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undo Action:&lt;/strong&gt; Press &lt;code&gt;u&lt;/code&gt; to undo the previous action.&lt;/li&gt;
&lt;/ol&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%2F6sc2ehf07uxumtjggouf.gif" 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%2F6sc2ehf07uxumtjggouf.gif" alt="GIF: Cut, Copy, Paste, Undo Lines" width="748" height="636"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4 - Visual block mode to insert text in multiple lines
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Visual Block Mode&lt;/strong&gt; is awesome because it lets you quickly select and edit text across multiple lines simultaneously, making tasks like formatting and adding consistent changes across your YAML files effortless.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enter Visual Block Mode:&lt;/strong&gt; Press &lt;code&gt;Ctrl + v&lt;/code&gt; to start visual block selection. Use the ↑ ↓ arrows or j k keys to extend the selection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insert Text:&lt;/strong&gt; Press Shift-i to start inserting text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply Changes:&lt;/strong&gt; Press &lt;code&gt;Esc&lt;/code&gt; to apply the changes to all selected lines.&lt;/li&gt;
&lt;/ol&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%2Feubypfowsnbsrhww89tc.gif" 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%2Feubypfowsnbsrhww89tc.gif" alt="GIF: Visual block mode in action" width="748" height="636"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5 - Run shell command directly within Vim
&lt;/h2&gt;

&lt;p&gt;Did you know you can run shell commands directly from within Vim? Well, now you do 😉&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;In Normal Mode:&lt;/strong&gt; Press &lt;code&gt;:!&lt;/code&gt; followed by command to run, e.g: :!k get pods&lt;/li&gt;
&lt;/ol&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%2Ft7oj1u13uachhuupb78z.gif" 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%2Ft7oj1u13uachhuupb78z.gif" alt="GIF: Run shell command directly within Vim" width="748" height="636"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;And that's a wrap! 🎉 - I hope you're feeling more confident and energized to practice these tricks for your upcoming exams.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👋 If you found this post helpful and want more tips and tricks, don't forget to follow me on &lt;a href="https://x.com/ptuladhar3" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and connect with me on &lt;a href="https://medium.com/r/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fptuladhar3%2F" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>vim</category>
      <category>kubernetes</category>
      <category>tricks</category>
      <category>certification</category>
    </item>
    <item>
      <title>How a 2% Failure Turned into a Success: My CKS Exam Experience</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Tue, 10 Sep 2024 05:07:37 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/how-a-2-failure-turned-into-a-success-my-cks-exam-experience-3c6</link>
      <guid>https://forem.com/ptuladhar3/how-a-2-failure-turned-into-a-success-my-cks-exam-experience-3c6</guid>
      <description>&lt;h2&gt;
  
  
  👋 Introduction
&lt;/h2&gt;

&lt;p&gt;Exams are tough, and failing by a narrow margin can be disheartening. Recently, I faced this challenge myself while attempting the Certified Kubernetes Security Specialist (CKS) exam. I missed passing by just 2%, and it was a learning experience that helped me refine my approach.&lt;/p&gt;

&lt;p&gt;I dedicated months to preparation with full-time job as Kubernetes Solution Architect, but there were a few key areas where I stumbled. From managing time efficiently to handling complex scenarios, every detail mattered.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After reviewing my approach and addressing the gaps, I re-took the exam and passed it with flying colors! &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's what I learned and how it led to creating a resource that could help others avoid the same pitfalls.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔑 Key Lessons Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Effective Study Techniques:&lt;/strong&gt; I discovered that some common study methods weren't enough. Incorporating hands-on practice and real-world scenarios made a significant difference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mastering Exam Strategies:&lt;/strong&gt; Understanding how to quickly navigate the terminal, use shell commands efficiently, and apply exam-specific shortcuts can give you the edge you need.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Utilizing Resources:&lt;/strong&gt; Leveraging tools and documentation effectively was crucial. It's not just about knowing the material but knowing how to find and use information quickly under exam conditions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  📚 Introducing My Handbook
&lt;/h2&gt;

&lt;p&gt;In response to my experience, I've put together the Certified Kubernetes Security Specialist (CKS) Handbook.&lt;/p&gt;

&lt;p&gt;This book is designed to help you prepare more effectively and avoid the pitfalls I encountered. It's packed with practical advice, study tips, and strategies tailored for the CKS exam.&lt;/p&gt;

&lt;p&gt;Pre-order my book now with 50% early bird discount. The book is 40% complete, and I'm excited to share it with you!&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Use code "EARLYBIRD" for get a 50% early bird discount - &lt;a href="https://ptuladhar.gumroad.com/l/cks-handbook" rel="noopener noreferrer"&gt;https://ptuladhar.gumroad.com/l/cks-handbook&lt;/a&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  📝 Summary
&lt;/h2&gt;

&lt;p&gt;Failing by 2% was a tough lesson, but it drove me to create something that could make a real difference in your preparation. I hope this book helps you succeed where I nearly fell short.&lt;/p&gt;

&lt;p&gt;Happy studying and best of luck on your journey to becoming a Certified Kubernetes Security Specialist!&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  🤝 Connect with me on &lt;a href="https://www.linkedin.com/in/ptuladhar3/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &lt;a href="https://twitter.com/tuladhar" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; &lt;a href="https://github.com/tuladhar" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;

</description>
      <category>kubernetes</category>
      <category>cks</category>
      <category>certification</category>
      <category>failure</category>
    </item>
    <item>
      <title>Kubernetes: Evenly Distribution of Pods Across Cluster Nodes</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Wed, 29 Dec 2021 14:04:52 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/kubernetes-evenly-distribution-of-pods-across-cluster-nodes-220l</link>
      <guid>https://forem.com/ptuladhar3/kubernetes-evenly-distribution-of-pods-across-cluster-nodes-220l</guid>
      <description>&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%2Furnsat2n52mfgwnx8tpz.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%2Furnsat2n52mfgwnx8tpz.png" alt="thumbnail" width="700" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Managing Pods distribution across a cluster is hard. Pod affinity and anti-affinity feature of Kubernetes allows some control of Pod placement. However, these features only resolve part of Pods distribution use cases.&lt;/p&gt;

&lt;p&gt;There is a common need to distribute the Pods evenly across the cluster for high availability and efficient cluster resource utilization.&lt;/p&gt;

&lt;p&gt;As such, &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/" rel="noopener noreferrer"&gt;PodTopologySpread&lt;/a&gt; scheduling plugin was designed to fill that gap. The plugin has reached a stable state since Kubernetes v1.19.&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%2F4mvbv6jomrx4iqi50g7z.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%2F4mvbv6jomrx4iqi50g7z.png" alt="Source: Pod Topology Spread Constraints" width="561" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, I’ll show you an example of using the topology spread constraints feature of Kubernetes to distribute the Pods workload across the cluster nodes in an absolute even manner.&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%2Fa9wdo4y5op5dka688u1u.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%2Fa9wdo4y5op5dka688u1u.png" width="700" height="524"&gt;&lt;/a&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%2Fpol3nymo792yrb7hu7wt.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%2Fpol3nymo792yrb7hu7wt.png" width="407" height="341"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Part 1. Spin Multi-node Kubernetes Cluster
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;If you already have a Kubernetes cluster with three or more worker nodes, you can skip this cluster setup part.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I’ll be using an awesome tool called &lt;a href="https://sigs.k8s.io/kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; to spin up a local Kubernetes cluster using Docker containers as “nodes”.&lt;/p&gt;

&lt;p&gt;By default, when creating a multi-node cluster via kind, it doesn’t assign a unique hostname for each worker nodes (very unkind 😄)&lt;/p&gt;

&lt;p&gt;Firstly, create a directory called &lt;code&gt;hostnames&lt;/code&gt; containing a file for each worker with a unique hostname.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir hostnames
$ echo 'worker-1' &amp;gt; hostnames/worker-1
$ echo 'worker-2' &amp;gt; hostnames/worker-2
$ echo 'worker-3' &amp;gt; hostnames/worker-3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, save the kind cluster config shown below which creates a K8s cluster consisting of 1 control panel (master) and 3 workers. The config also has mounts defined per worker to set the unique hostname.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat &amp;gt; unkind-config.yaml &amp;lt;&amp;lt;EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
  - role: worker
    extraMounts:
    - hostPath: hostnames/worker-1
      containerPath: /etc/hostname
  - role: worker
    extraMounts:
    - hostPath: hostnames/worker-2
      containerPath: /etc/hostname
  - role: worker
    extraMounts:
    - hostPath: hostnames/worker-3
      containerPath: /etc/hostname
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, spin up the Kubernetes cluster as such:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kind create cluster --config unkind-config.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output should be similar to shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.21.1) 🖼
 ✓ Preparing nodes 📦 📦 📦 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹️
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
 ✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Thanks for using kind! 😊
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, verify the cluster is up and running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output should be similar to shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                 STATUS   ROLES                  AGE     VERSION
kind-control-plane   Ready    control-plane,master   3m29s   v1.21.1
worker-1             Ready    &amp;lt;none&amp;gt;                 2m58s   v1.21.1
worker-2             Ready    &amp;lt;none&amp;gt;                 2m58s   v1.21.1
worker-3             Ready    &amp;lt;none&amp;gt;                 2m58s   v1.21.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’re now ready to play around with the cluster!&lt;/p&gt;




&lt;h3&gt;
  
  
  Part 2. Distribute Pods Evenly Across The Cluster
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;topology spread constraints&lt;/em&gt; rely on node labels to identify the topology domain(s) that each worker Node is in.&lt;/p&gt;

&lt;p&gt;In order to distribute pods evenly across all cluster worker nodes in an absolute even manner, we can use the well-known node label called &lt;a href="https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname" rel="noopener noreferrer"&gt;kubernetes.io/hostname&lt;/a&gt; as a topology domain, which ensures each worker node is in its own topology domain.&lt;/p&gt;

&lt;p&gt;In the below manifest, we have defined a deployment with 3 replicas that assigned a label &lt;code&gt;type=dummy&lt;/code&gt; to the Pod and a topologySpreadConstaints that acts on pods that have that label defined.&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;spec.topologySpreadConstaints&lt;/code&gt; is defined as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;maxSkew: 1&lt;/code&gt; — distribute pods in an absolute even manner&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;topologyKey: kubernetes.io/hostname&lt;/code&gt; — use the hostname as topology domain&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;whenUnsatisfiable: ScheduleAnyway&lt;/code&gt; — always schedule pods even if it can’t satisfy even distribution of pods&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;labelSelector&lt;/code&gt; — only act on Pods that match this selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, the Pods runs a container image called &lt;code&gt;pause&lt;/code&gt; that does absolutely nothing! 😃&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: Namespace
metadata:
  name: dummy
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy
  namespace: dummy
spec:
  replicas: 3
  selector:
    matchLabels:
      type: dummy
  template:
    metadata:
      labels:
        type: dummy
    spec:
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: ScheduleAnyway
          labelSelector:
            matchLabels:
              type: dummy    
      containers:
      - name: pause
        image: k8s.gcr.io/pause:3.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s apply the manifest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl apply -f dummy-deployment.yaml
namespace/dummy created
deployment.apps/dummy created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And verify that the pod's placement is balanced across all worker nodes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl -n dummy get pods -o wode --sort-by=.spec.nodeName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fohaeruae95v3p4dawtaw.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%2Fohaeruae95v3p4dawtaw.png" width="700" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see from the above screenshot, pods are scheduled evenly on worker-1, worker-2, and worker-3 respectively.&lt;/p&gt;

&lt;p&gt;We can further upscale the deployment to 30 replicas, and validate the distribution of pods as we scale.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl -n dummy scale deploy/dummy --replicas 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see in the screenshot below, the pods are evenly distributed across all cluster nodes after we upscaled the deployment. #awesomeness&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%2F8auv6dbu0d4kr8egmhi5.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%2F8auv6dbu0d4kr8egmhi5.png" width="700" height="524"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/" rel="noopener noreferrer"&gt;PodTopologySpread&lt;/a&gt; scheduling plugin gives power to Kubernetes administrators to achieve high availability of applications as well as efficient utilization of cluster resources.&lt;/p&gt;

&lt;h4&gt;
  
  
  Known Limitations:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Scaling down a Deployment will not guarantee and may result in imbalanced Pods distribution. You can use &lt;a href="https://github.com/kubernetes-sigs/descheduler" rel="noopener noreferrer"&gt;Descheduler&lt;/a&gt; to rebalance the Pods distribution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  References:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/blog/2020/05/introducing-podtopologyspread/" rel="noopener noreferrer"&gt;https://kubernetes.io/blog/2020/05/introducing-podtopologyspread/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>distributedsystems</category>
      <category>podtologyspread</category>
    </item>
    <item>
      <title>Testing SSL/TLS handshake latency using ssl-handshake</title>
      <dc:creator>Puru</dc:creator>
      <pubDate>Wed, 29 Dec 2021 13:53:26 +0000</pubDate>
      <link>https://forem.com/ptuladhar3/testing-ssltls-handshake-latency-using-ssl-handshake-22kd</link>
      <guid>https://forem.com/ptuladhar3/testing-ssltls-handshake-latency-using-ssl-handshake-22kd</guid>
      <description>&lt;p&gt;A command-line tool for testing SSL/TLS handshake latency, written in &lt;a href="https://go.dev/" rel="noopener noreferrer"&gt;Go&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TCP handshake latency&lt;/li&gt;
&lt;li&gt;SSL/TLS handshake latency&lt;/li&gt;
&lt;li&gt;TLS version used during the handshake&lt;/li&gt;
&lt;li&gt;Display handshake statistics&lt;/li&gt;
&lt;li&gt;Configurable endpoint port, handshake interval, timeout and count&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhyvz2sva90ne6y2kc9pn.gif" 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%2Fhyvz2sva90ne6y2kc9pn.gif" alt="ssl handshake in action" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an SSL/TLS Handshake?
&lt;/h2&gt;

&lt;p&gt;An SSL/TLS handshake is the process that kicks off a communication session between client and server that uses &lt;a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" rel="noopener noreferrer"&gt;TLS encryption&lt;/a&gt;. During a TLS handshake, the two communicating sides exchange messages to acknowledge each other, verify each other, establish the encryption algorithms they will use, and agree on session keys. TLS handshakes are a foundational part of how HTTPS works and it is defined in &lt;a href="https://tools.ietf.org/html/rfc8446" rel="noopener noreferrer"&gt;RFC 8446 (for TLS 1.3)&lt;/a&gt; or in &lt;a href="https://datatracker.ietf.org/doc/html/rfc5246" rel="noopener noreferrer"&gt;RFC 5246 (for TLS 1.2)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;TLS handshakes occur after a TCP connection has been opened via a TCP handshake. &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%2Fr8wpz5g2bsybjuclter9.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%2Fr8wpz5g2bsybjuclter9.png" alt="image" width="752" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TLS handshake packets captured with &lt;a href="https://www.wireshark.org/" rel="noopener noreferrer"&gt;Wireshark&lt;/a&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%2Fz1ebkjlwr1sww71e3w66.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%2Fz1ebkjlwr1sww71e3w66.png" alt="image" width="800" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Image
&lt;/h2&gt;

&lt;p&gt;Docker image is publicly available at DockerHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/r/ptuladhar/ssl-handshake" rel="noopener noreferrer"&gt;https://hub.docker.com/r/ptuladhar/ssl-handshake&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run &lt;code&gt;ssl-handshake&lt;/code&gt; as Docker container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --rm ptuladhar/ssl-handshake -c 5 tuladhar.github.io:443
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also alias &lt;code&gt;ssl-handshake&lt;/code&gt;, for ease of use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias ssl-handshake="docker run --rm ptuladhar/ssl-handshake"
ssl-handshake tuladhar.github.com:443
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install binary
&lt;/h2&gt;

&lt;p&gt;Binary is available for Linux, Windows and Mac OS (amd64 and arm64). Download the binary for your respective platform from the &lt;a href="https://github.com/tuladhar/ssl-handshake/releases" rel="noopener noreferrer"&gt;releases page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSLO https://github.com/tuladhar/ssl-handshake/releases/download/v1.6.0/ssl-handshake-v1.6.0-linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar zxf ssl-handshake-v1.6.0-linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo install -m 0755 ssl-handshake /usr/local/bin/ssl-handshake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;macOS (Intel):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSLO https://github.com/tuladhar/ssl-handshake/releases/download/v1.6.0/ssl-handshake-v1.6.0-darwin-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar zxf ssl-handshake-v1.6.0-darwin-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo install -m 0755 ssl-handshake /usr/local/bin/ssl-handshake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;macOS (Apple Silicon):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSLO https://github.com/tuladhar/ssl-handshake/releases/download/v1.6.0/ssl-handshake-v1.6.0-darwin-arm64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar zxf ssl-handshake-v1.6.0-darwin-arm64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo install -m 0755 ssl-handshake /usr/local/bin/ssl-handshake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSLO https://github.com/tuladhar/ssl-handshake/releases/download/v1.6.0/ssl-handshake-v1.6.0-windows-amd64.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;unzip ssl-handshake-v1.6.0-windows-amd64.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute or compile from source code, you'll first need Go installed on your machine. Go version 1.17+ is required. Currently, there are no dependencies on third-party modules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/tuladhar/ssl-handshake
cd ssl-handshake 
go build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Contributors
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tuladhar.github.io" rel="noopener noreferrer"&gt;Puru Tuladhar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sslhandshake</category>
      <category>cli</category>
      <category>devops</category>
      <category>go</category>
    </item>
  </channel>
</rss>
