<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Laxman on Medium]]></title>
        <description><![CDATA[Stories by Laxman on Medium]]></description>
        <link>https://medium.com/@laxman139?source=rss-118cbbebcc32------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KUyZUSXYYlfdn4kj5radqw.jpeg</url>
            <title>Stories by Laxman on Medium</title>
            <link>https://medium.com/@laxman139?source=rss-118cbbebcc32------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 21:11:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@laxman139/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Fantasy Trap: How Replaying the Past Keeps You Stuck]]></title>
            <link>https://medium.com/@laxman139/the-fantasy-trap-how-replaying-the-past-keeps-you-stuck-5fda88a88c48?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fda88a88c48</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[self-reflection]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 06:05:53 GMT</pubDate>
            <atom:updated>2025-10-07T06:18:18.677Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z-Zf3_wFLRmPH7O4SyBRqA.jpeg" /></figure><p>We all do it. Replay old mistakes. Rewrite conversations. Fantasize about how life <em>could have been</em> if only we had made different choices.</p><p>“If I had studied harder…”<br>“If I hadn’t quit that job…”<br> “If I had said yes to that opportunity…”</p><p>It feels harmless — even comforting — to imagine those alternate realities.</p><h3>What Is the Fantasy Trap?</h3><p>The fantasy trap begins with <strong>regret. </strong>We look back at our past, identify where things went wrong, and then slip into a mental movie of how life <em>should have</em> turned out.</p><p>In that movie, we fix the mistake. We make the right choice. Everything unfolds perfectly — we’re happy, successful, confident, loved.<br> And for a few moments, we actually <em>feel good.</em></p><p>But that’s exactly the trap.<br> Fantasy tricks our brain into turning a <strong>negative emotion</strong> (shame, regret, sadness) into a <strong>positive one</strong> — without changing anything in real life.</p><p>It’s like taking a mental painkiller instead of treating the wound.</p><h3>Why Fantasy Feels So Good</h3><p>When something painful happens — failure, rejection, or loss — our mind naturally wants relief. Fantasy offers that relief instantly.<br> It’s a clever self-soothing mechanism: <em>a way to transform pain into pride</em>.</p><p>I remember when I first started trading. I made a few impulsive decisions, ignored my stop losses, and ended up blowing up a good chunk of my account. I felt humiliated and angry — watching red numbers pile up on the screen felt like watching my own failure unfold in real time. But instead of facing that shame, my mind drifted into fantasy. I’d imagine making a perfect comeback — doubling my capital, timing every trade flawlessly, and proving to everyone (and myself) that I wasn’t a loser. In my head, I was already celebrating my redemption while my real portfolio was bleeding. That day, I didn’t realize it — but I had just escaped into the fantasy trap.</p><p>In just a few seconds, my emotional state flipped — from shame to triumph.<br> That’s the hidden power of fantasy: <strong>it makes us feel strong when we feel weak.</strong></p><p>But that power comes with a cost.</p><h3>How Fantasy Keeps Us Stuck</h3><p>Here’s the <em>paradox</em>: The very emotions we try to escape — pain, regret, disappointment — are often the <strong>fuel for growth.</strong></p><p><a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC11259327/">Neuroscience backs this up</a>. The brain regions that process <strong>negative emotions</strong> are closely linked to the <strong>learning centers</strong>. We evolve and adapt <em>because</em> something hurts.</p><p>So when we escape into fantasy every time life gets uncomfortable, we rob ourselves of that fuel. We drain the emotional energy that could have motivated real change.</p><p>Instead of using regret to take action, we use imagination to feel better.<br> And after that short-lived relief fades… nothing has changed.</p><h3>The Energy Cost of Rewriting the Past</h3><p>There’s another reason fantasy keeps us paralyzed: <em>it consumes our mental energy.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*5vnPJtn7AeQvTVcgpWFOXg.png" /></figure><p>When we sit and replay old mistakes, imagining how things could have gone differently, we’re doing <em>real</em> cognitive work — but on an <em>impossible</em> problem. Our brain spends precious problem-solving energy rewriting history instead of improving the present.</p><p>The brain repeats this <strong><em>Feel Good Script</em></strong> whenever we are in a deep state of pain. It’s like opening a text editor, rewriting an old email, and expecting your life to change when you hit “save.”</p><p>You can’t move forward from a false reality.</p><h3>How to Break Free from the Fantasy Trap</h3><p>So how do we escape it?</p><p>The first step is uncomfortable but simple: <strong>tolerate negative emotion.</strong></p><p>When regret surfaces, resist the urge to rewrite the past. Sit with it. Feel the discomfort fully. Then, instead of asking:</p><blockquote><strong><em>“What should I have done differently?”<br> Ask: “What can I do </em>now<em>?”</em></strong></blockquote><p>This shift sounds small, but it’s everything.</p><p>Living in the present is hard — brutally hard — because it forces us to face the truth: <em>where we are</em>, <em>what we’ve done</em>, and <em>how far we still need to go</em>.<br> But it’s the <em>only</em> place from which real action is possible.</p><h3>From Fantasy to Action</h3><p>You don’t need to know where you’ll end up.<br>Forget about rewriting the past or predicting the future.</p><p>Just ask yourself one question:</p><blockquote><strong><em>“What’s the next step I can take </em>today<em>?”</em></strong></blockquote><p>Maybe it’s sending that email.<br> Maybe it’s cleaning your room.<br> Maybe it’s forgiving yourself.</p><p>The fantasy trap wants to pull you backward or push you too far forward.<br> Freedom begins when you stay right here — in the present — and start small.</p><p>Because the truth is, <strong>you can’t live anywhere except now.</strong></p><p>(Inspired by Dr. K’s take on <em>The Fantasy Trap</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fda88a88c48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My experience with CCDAK]]></title>
            <link>https://medium.com/@laxman139/my-experience-with-ccdak-33444ee94eaf?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/33444ee94eaf</guid>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[ccdak-exam]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Thu, 02 Oct 2025 08:01:38 GMT</pubDate>
            <atom:updated>2025-10-02T08:01:38.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p72-jEOJMrtZEeO3FkrBOA.png" /></figure><p>Last week, I sat for the <strong>Confluent Certified Developer for Apache Kafka (CCDAK)</strong> exam after a month of preparation. Unfortunately, I didn’t clear it this time — I scored <strong>67%</strong>, just shy of the passing mark.</p><p>But failure isn’t the end. Instead, it gave me perspective on <strong>what works, what doesn’t, and how to prepare effectively</strong>. Since Kafka certifications are gaining popularity, I wanted to share my preparation journey, study resources, and lessons learned, so others can benefit.</p><h3>Exam Focus Areas</h3><p>The CCDAK exam is <strong>heavily centered around Kafka fundamentals</strong>. In my experience, the questions were pretty straightforward but tested your <strong>understanding rather than memorization</strong>. Here are the main areas to expect:</p><ul><li><strong>Core Kafka concepts</strong>: Topics, Partitions, Replication, Producers, Consumers, Offsets</li><li><strong>Kafka Connect</strong>: Connectors, Source &amp; Sink connectors, configuration, error handling</li><li><strong>Kafka Streams</strong>: Stream processing, state stores, joins, aggregations</li><li><strong>ksqlDB</strong>: Core operations, syntax, use cases</li></ul><p>If you’re clear on the fundamentals, you’ll feel comfortable with the majority of the exam.</p><h3>My Preparation Strategy</h3><p>I gave myself <strong>about one month of dedicated preparation</strong>. Here’s how I structured my study plan:</p><h3>1. Start with the Official Confluent Developer Courses</h3><p>The best starting point is Confluent’s free learning resources. They’re concise, practical, and aligned with the exam:</p><ul><li><a href="https://developer.confluent.io/courses/apache-kafka/events/"><strong>Introduction to Events</strong> </a>— Covers brokers, partitions, replication, producers, and consumers in detail.</li><li><a href="https://developer.confluent.io/courses/architecture/get-started/"><strong>Kafka Internals &amp; Architecture</strong> </a>— Covers replication, Consumer groups, topic compaction in detail</li></ul><p>These courses helped me build the mental model of Kafka from the ground up.</p><h3>2. Read the Official Documentation</h3><p>Confluent’s documentation is surprisingly well-written. If you read it thoroughly (especially around Connect, Streams, and ksqlDB), you’ll notice that <strong>a lot of exam questions are lifted directly from these concepts</strong>.</p><p>Don’t skip this step. Reading the docs forces you to <strong>connect the dots between concepts</strong> instead of just memorizing.</p><p>I would recommend practising the questions <a href="https://github.com/Imlucky883/archive/blob/main/Kafka_Questions.pdf">here</a> (I prepared this list of questions) side by side as you cover up the relevant topics.</p><p>This <a href="https://github.com/confluentinc/cp-all-in-one/tree/8.0.0-post/cp-all-in-one">repo</a> from Confluent contains the docker-compose file which contains all the components that Confluent provides. You can pull up this file and start practising.</p><h3>3. Reinforce with Community Resources</h3><p>After covering the fundamentals, I moved to community-curated content. The standout resource was this GitHub repo:</p><p>👉 <a href="https://github.com/danielsobrado/CCDAK-Exam-Questions/tree/main">danielsobrado/CCDAK-Exam-Questions</a></p><p>It contains:</p><ul><li><strong>Topic summaries</strong> for quick revision</li><li><strong>Practice questions</strong> that simulate exam-style multiple-choice format</li></ul><p>This was a game-changer for me, as it let me test my knowledge and identify weak areas quickly.</p><h3>4. Practice Exams on Udemy (Optional)</h3><p>I don’t really recommend Udemy test series, because most of them are <strong>outdated</strong>. However, I did try this one:</p><p>👉 <a href="https://www.udemy.com/course/confluent-certified-apache-kafka-developer-practice-exams/">Confluent Certified Apache Kafka Developer Practice Exams</a></p><p>It wasn’t 100% aligned with the actual exam, but it gave me a <strong>feel for the exam flow</strong> — how the questions are structured, how to manage time, and what kind of tricks to expect.</p><h3>Lessons Learned</h3><p>Looking back, here are my key takeaways:</p><ul><li><strong>Focus on understanding, not memorization.</strong> Many questions are conceptual rather than rote.</li><li><strong>Kafka Streams and ksqlDB are exam-heavy.</strong> Don’t underestimate them — I wish I had spent more time here.</li><li><strong>Docs &gt; Courses &gt; Test Series.</strong> Confluent docs are the single most valuable resource; everything else is supplemental.</li><li><strong>Practice with scenarios.</strong> Think through real-world examples: how a consumer group rebalances, how a topic scales with partitions, how a stateful stream works, etc.</li></ul><h3>What’s Next</h3><p>Even though I didn’t clear the exam this time, I see it as part of the learning curve. My plan is to revisit <strong>Kafka Streams</strong> and <strong>ksqlDB</strong>, practice more hands-on scenarios, and attempt the exam again soon.</p><p>If you’re preparing for CCDAK, I hope this breakdown saves you some time and gives you a clearer roadmap.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33444ee94eaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CNI Demystified: The Backbone of Kubernetes Networking]]></title>
            <link>https://medium.com/@laxman139/cni-demystified-the-backbone-of-kubernetes-networking-f5b73d6f1765?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5b73d6f1765</guid>
            <category><![CDATA[cni]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 06:05:22 GMT</pubDate>
            <atom:updated>2025-10-01T14:11:51.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/301/0*otGEPIQQyE5ERrMV.png" /></figure><p>People can get puzzled when they need to choose one of the available <a href="https://github.com/containernetworking/cni">networking solutions for Kubernetes.</a> As you can see there are a lot of solutions.</p><p>Most of the mentioned solutions include container network interface (CNI) plug-ins. These are the cornerstones of Kubernetes networking, and it is essential to understand them to make an informed decision which networking solution to chose. It is also useful to know some details about the internals of your preferred networking solution. This way, you will be able to choose what Kubernetes networking features you need, analyze networking performance / security / reliability, and troubleshoot low-level issues.</p><h3>Some basics behind CNI</h3><p>When Kubernetes starts up your pod (a logical group of containers), something it will do is create a “infra container” — this is a container that has a shared network namespace (among other namespaces) that all the containers in the pod share.</p><p>This means that any networking elements you create in that infra container will be available to all the containers in the pod. This also means that as containers come and go within that pod, the networking stays stable.</p><p>If you have a running Kubernetes (which has some pods running), you can perform a docker ps and see containers that often running with <a href="http://gcr.io/google_containers/pause-amd64">gcr.io/google_containers/pause-amd64</a> image, and they&#39;re running a command that looks like /pause.In theory this is a lightweight enough container that it &quot;shouldn&#39;t really die&quot; and should be available to all containers within that pod.</p><p>As Kubernetes creates this infra container, it also will call an executable as specified in the /etc/cni/net.d/*conf files.</p><p>If you want even more detail, you can checkout the <a href="https://github.com/containernetworking/cni/blob/master/SPEC.md">CNI specification itself.</a></p><p>The official documentation <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/#the-kubernetes-network-model">outlines</a> <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/#the-kubernetes-network-model">a numbe</a> r of requirements that any CNI plugin implementation should support. Rephrasing it in a slightly different way, a CNI plugin must provide at least the following two things:</p><h3>Configuring a CNI plug-in</h3><p>While it’s not required — you probably want to have a Kubernetes environment setup for yourself where you can experiment with deploying the plugins in Kubernetes. In my case, I used a two EC2 instances on AWS with a master and worker node. Both are of the type: t2medium</p><p>master[ip-10-0-0-210] ; worker[ip-10-0-10-51]</p><h3>Using kubeadm to deploy Kubernetes</h3><p>We will be using kubeadm to configure and run Kubernetes components on our EC2. You can follow the script from the Github to setup the cluster. Once done, to check what subnets are allocated from the pod network range to both master and worker nodes</p><pre>$ kubectl describe node ip-10-0-0-210 | grep PodCIDR<br>PodCIDR:                     10.244.0.0/24<br><br>$ kubectl describe node ip-10-0-10-51| grep PodCIDR<br>PodCIDR:                     10.244.1.0/24</pre><p>As you can see from the output, the whole pod network range ( 10.244.0.0./20) has been divided into small subnets, and each of the nodes received its own subnets. This means that the master node can use any of the 10.244.0.0- 10.244.0.255 IPs for its Pods, and the worker node uses 10.244.1.0- 10.244.1.255 IPs.</p><pre>NAME            STATUS   ROLES           AGE   VERSION<br>ip-10-0-0-210   NotReady    control-plane   34m   v1.31.5<br>ip-10-0-10-51   NotReady    &lt;none&gt;          20m   v1.31.5</pre><h3>Step 1 : Creation of the plugin configuration file</h3><p>The first thing you should do is create the plug-in configuration. Save the following file as /etc/cni/net.d/10-bash-cni-plugin.conf</p><pre>{<br>        &quot;cniVersion&quot;: &quot;0.4.0&quot;, #  version of the CNI specification<br>        &quot;name&quot;: &quot;mynet&quot;,       #  name of the plugin<br>        &quot;type&quot;: &quot;bash-cni&quot;,    #  plugin written in Bash<br>        &quot;network&quot;: &quot;10.244.0.0/20&quot;,<br>        &quot;subnet&quot;: &quot;10.244.0.0/24&quot; # node-cidr-range<br>}</pre><p>This must be done on both master and worker nodes. Don’t forget to replace &lt;node-cidr-range&gt; with 10.244.0.0/24 for the master and 10.244.1.0./24 for the worker. It is also very important that you put the file into the /etc/cni/net.d/ folder.</p><blockquote><em>kubelet uses </em><em>/etc/cni/net.d/ to discover CNI plug-ins.</em></blockquote><p>The first three parameters in the configuration ( cniVersion, name, and type) are mandatory.</p><ul><li>cniVersion is used to determine the CNI version used by the plugin</li><li>name is just the network name</li><li>type refers to the file name of the CNI plug-in executable.</li></ul><p>The network and subnet parameters are our custom parameters, they are not mentioned in the CNI specification, and later we will see how exactly they are used by the bash-cni network plug-in.</p><h3>Step 2 : Preparation of a network bridge on both master and worker VMs</h3><p>The bridge network is a device that aggregates network packets from multiple network interfaces. A bridge is analogous to a network switch.</p><p>The bridge can also have its own MAC and IP addresses, so each container sees the bridge as another device plugged into the same network. We reserve the 10.244.0.1 IP address for the bridge on the master VM and 10.244.1.1 for the bridge on the worker VM. The following commands can be used to create and configure the bridge with the cni0 name:</p><pre>$ sudo brctl addbr cni0<br>$ sudo ip link set cni0 up<br>$ sudo ip addr add &lt;bridge-ip&gt;/24 dev cni0</pre><p>These commands create the bridge, enable it, and then assign an IP address to it. The last command also implicitly creates a route, so that all traffic with the destination IP belonging to the pod CIDR range, local to the current node, will be redirected to the cni0 network interface.</p><h3>Step 3 : Creation of the plugin binary</h3><p>The plug-in’s binary format must be placed in the /opt/cni/bin/ folder, its name must be exactly the same as the type parameter in the plug-in configuration ( bash-cni), and its contents can be found in the <a href="https://github.com/Imlucky883/cni-plugin/blob/main/bash-cni">Github-repo</a> After you put the plug-in in the correct folder, don&#39;t forget to make it executable by running sudo chmod +x bash-cni.) This should be done on both master and worker VMs.</p><blockquote><em>The </em><em>/opt/cni/bin folder stores all the CNI plug-ins</em></blockquote><p>The CNI plugin binary has 5 main commands :</p><ol><li><strong>ADD</strong>: This command is invoked by the container runtime to create a new network interface for a container.</li><li><strong>DEL</strong>: This command is used to delete a network interface when a container is removed.</li><li><strong>CHECK</strong>: This command checks whether a given configuration is valid and operational.</li><li><strong>VERSION</strong>: This command retrieves the version of the CNI plugin being used.</li><li><strong>GC (Garbage Collection)</strong>: This command is used to clean up unused resources or stale configurations.</li></ol><h3>Step 4 : Testing the plugin</h3><p>Now, if you execute the kubectl get node command, you can see that both nodes should go to the &quot;Ready&quot; state. So, let&#39;s try to deploy an application and see how it works. But before we&#39;re able to do this, we should &quot;untaint&quot; the master node. By default, the scheduler will not put any pods on the master node, because it is &quot;tainted.&quot; But we want to test cross-node container communication, so we need to deploy some pods on the master, as well as on the worker. The taint can be removed using the following command.</p><pre>$ kubectl taint nodes ip-10-0-0-210 node-role.kubernetes.io/control-plane:NoSchedule-<br>ip-10-0-0-210 untainted</pre><blockquote><strong><em>NOTE</em></strong><em> : Make sure you install </em><em>nmap on both of your nodes.</em></blockquote><p>Next, let’s use this test <a href="https://github.com/Imlucky883/cni-plugin/blob/main/manifests/master-deploy.yaml">deployment</a> to validate the CNI plug-in</p><pre>$ kubectl apply -f https://github.com/Imlucky883/cni-plugin/blob/main/manifests/master-deploy.yaml</pre><p>Here, we are deploying four simple pods. Two goes on the master and the remaining two on the worker. (Pay attention to how we are using the nodeName property to tell the pod, where it should be deployed.) On both master we have two pods running NGINX while on the worker nodes we have two pods running BUSYBOX with sleep command. Now, let&#39;s run kubectl get pod to make sure that all pods are healthy and then get the pods IP addresses. As I checked the containers were in the PendingState, after I described the pods I got to know that the error was with CNI.</p><p>I was getting the below error when I checked the error log of the plugin at /var/log/bash-cni.log</p><pre>Error: any valid address is expected rather than &quot;(10.244.0.1)&quot;.<br>CNI command: DEL<br>stdin: {&quot;cniVersion&quot;:&quot;0.4.0&quot;,&quot;name&quot;:&quot;mynet&quot;,&quot;network&quot;:&quot;10.244.0.0/20&quot;,&quot;subnet&quot;:&quot;10.244.0.0/24&quot;,&quot;type&quot;:&quot;bash-cni&quot;}<br>CNI command: ADD<br>stdin: {&quot;cniVersion&quot;:&quot;0.4.0&quot;,&quot;name&quot;:&quot;mynet&quot;,&quot;network&quot;:&quot;10.244.0.0/20&quot;,&quot;subnet&quot;:&quot;10.244.0.0/24&quot;,&quot;type&quot;:&quot;bash-cni&quot;}<br>Allocated container IP: 10.244.0.61</pre><p>After surfing the online for more than 1 hour, I found that the way nmap generates IP addresses includes extra characters like parentheses. I added tr -d &#39;()&#39; to the plugin script which actually fixed the issue and now IP&#39;s were allocated to the Pods. Below is the command that I added in the /opt/cni/bin/bash-cni</p><pre>all_ips=($(nmap -sL $subnet | grep &quot;Nmap scan report&quot; | awk &#39;{print $NF}&#39; | tr -d &#39;()&#39;))</pre><p>Now I checked the Pod status and both the pods are successfully been allocated a IP.</p><pre>$ $ kubectl get pods -o wide<br><br>busybox-deployment-787d986855-dxq7z   1/1     Running   0          22s   10.244.1.2   ip-10-0-10-51   &lt;none&gt;           &lt;none&gt;<br>busybox-deployment-787d986855-jxtx9   1/1     Running   0          22s   10.244.1.3   ip-10-0-10-51   &lt;none&gt;           &lt;none&gt;<br>nginx-deployment-6b874d4659-bmnk9     1/1     Running   0          30m   10.244.0.3   ip-10-0-0-210   &lt;none&gt;           &lt;none&gt;<br>nginx-deployment-6b874d4659-pkn2n     1/1     Running   0          30m   10.244.0.2   ip-10-0-0-210   &lt;none&gt;           &lt;none&gt;</pre><p>Now the objective is to test the connectivity between pod-pod, pod-node &amp; pod-external connectivity.</p><pre>$ kubectl exec -it busybox-deployment-787d986855-dxq7z -- sh</pre><pre>/ ping 10.0.10.51 # can ping own host<br>PING 10.0.10.51 (10.0.10.51): 56 data bytes<br>64 bytes from 10.0.10.51: seq=0 ttl=64 time=0.070 ms<br>64 bytes from 10.0.10.51: seq=1 ttl=64 time=0.071 ms<br><br>$ ping 10.0.0.210 # can’t ping different host <br>PING 10.0.0.210 (10.0.0.210): 56 data bytes<br><br>$ ping 10.244.0.2 # can ping a pod on the same host<br>64 bytes from 10.244.0.2: seq=0 ttl=64 time=0.092 ms<br>64 bytes from 10.244.0.2: seq=1 ttl=64 time=0.055 ms<br><br>$ ping 10.244.1.3 # can’t ping a pod on a different host<br>PING 10.244.1.3 (10.244.1.3): 56 data bytes<br><br>$ ping 108.177.121.113 # can’t ping any external address<br>PING 110.234.16.223 (110.234.16.223): 56 data bytes</pre><p>As you can see, the only thing that actually works is a pod to pod and Pod to host communication.</p><h3>Case 1 : Can’t ping external address</h3><p>The fact that our container can’t reach the Internet should be no surprise for you. Our containers are located in a private subnet (10.244.0.0/24).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/0*lGmNEmAURop0pzhe" /></figure><p>In order to fix this, we should set up a network address translation (NAT) on the host VM. NAT is a mechanism that replaces a source IP address in the outcoming package with the IP address of the host VM. The original source address is stored somewhere else in the TCP packet. When the response arrives to the host VM, the original address is restored, and a package is forwarded to the container network interface. You can easily setup NAT using the following two commands:</p><pre>$ sudo iptables -t nat -A POSTROUTING -s 10.244.0.0/24 ! -o cni0 -j MASQUERADE # on master<br>$ sudo iptables -t nat -A POSTROUTING -s 10.244.1.0/24 ! -o cni0 -j MASQUERADE # on worker</pre><p>Pay attention that here we are NATing only packages with the source IP belonging to the local pod subnet, which are not meant to be sent to the cni0 bridge. The ! -o cni0 condition in the iptables rule ensures that NAT is <strong>not applied</strong> to traffic intended to stay within the cluster (i.e., traffic sent to other pods via the cni0 bridge). Only traffic leaving the cluster and heading to external destinations is NATed.</p><h3>Case 2 : Can’t ping pod on the other host</h3><p>Pods on different host can’t talk to each other. If you think about it, this makes a perfect sense. If we are sending a request from the 10.244.0.4 Pod to the 10.244.1.3 Pod, we never specified that the request should be routed through the 10.0.10.51 host. Usually, in such cases, we can rely on the ip route command to setup some additional routes for us. If we carried out this experiment on some bare-metal servers directly connected to each other, we could do something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/0*FtcQvO6fN1oFXbzV" /></figure><pre>$ ip route add 10.244.1.0/24 via 10.0.10.51 dev enX0 # run on master <br>$ ip route add 10.244.0.0/24 via 10.0.0.210 dev enX0 # run on worker</pre><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/cni-demystified-the-backbone-of-kubernetes-networking">gorgeousgawin.hashnode.dev</a><em> on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5b73d6f1765" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PriorityClass in Kubernetes: The VIP Pass for Your Pods]]></title>
            <link>https://medium.com/@laxman139/priorityclass-in-kubernetes-the-vip-pass-for-your-pods-a2248cb361a4?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2248cb361a4</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[priorityclass]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 05:47:25 GMT</pubDate>
            <atom:updated>2025-10-01T11:01:51.779Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*QwCaT8U6PxyyhVb0.jpeg" /></figure><p>Imagine you’re at an airport, and there’s a long queue at security. But suddenly, a VIP with a priority pass walks straight through a special lane, skipping the entire line. Kubernetes has a similar system for pods-it’s called <strong>PriorityClass</strong>! 🚀</p><p>In this article, we’ll break down what <strong>PriorityClass</strong> is, why it matters, and when you should use it to keep your Kubernetes workloads running smoothly.</p><h3>What is PriorityClass?</h3><p><strong>PriorityClass</strong> is a Kubernetes feature that assigns priority levels to different pods. It helps the scheduler decide which pods should be scheduled first <strong>and</strong> which ones should be evicted when resources are limited.</p><p>Think of it as a VIP pass for workloads- <strong>critical pods get scheduled first</strong>, while less important ones may have to wait or even be evicted if resources run out.</p><h3>How it Works</h3><ul><li>Each <strong>PriorityClass</strong> has a numeric value.</li><li>The <strong>higher the value</strong>, the more important the pod is.</li><li>If the cluster runs out of resources, lower-priority pods <strong>may get evicted</strong> to make room for higher-priority ones.</li><li>You can also set <strong>preemption policies</strong> to decide whether a pod should evict lower-priority ones or not.</li></ul><h3>Why is PriorityClass Helpful?</h3><p>Kubernetes works best when resources are efficiently managed. PriorityClass helps by :</p><ul><li><strong>Ensuring critical workloads always run</strong> (e.g., system monitoring, security agents)</li><li><strong>Preventing resource starvation</strong> for high-importance services</li><li><strong>Handling overload situations</strong> by gracefully evicting low-priority pods</li><li><strong>Improving cluster resilience</strong> by making sure essential services don’t get disrupted</li></ul><p>Without PriorityClass, all pods are treated equally, which can lead to important services getting stuck in a pending state while non-essential ones consume resources.</p><h3>When Should You Use PriorityClass?</h3><p>Here are some real-world scenarios where <strong>PriorityClass</strong> is a lifesaver:</p><p>🔹 <strong>Critical System Services :</strong> Monitoring, logging, and security services should <strong>always</strong> be running. Assigning them a <strong>high-priority class</strong> ensures they don’t get evicted when the cluster is under pressure.</p><p>🔹 <strong>Multi-Tenant Clusters :</strong> If multiple teams share a Kubernetes cluster, you might want to <strong>prioritize production workloads</strong> over development or testing environments.</p><p>🔹 <strong>Failover &amp; Disaster Recovery :</strong> During <strong>failovers</strong>, critical services need to come back online ASAP. Using PriorityClass ensures your key services recover before anything else.</p><h3>How to Implement PriorityClass in Kubernetes ?</h3><p>Below workflow best explains the working of Priorityclass :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/0*w-774fJ4shjMV392" /></figure><pre>apiVersion: scheduling.k8s.io/v1<br>kind: PriorityClass<br>metadata:<br>  name: high-priority<br>value: 1000000<br>preemptionPolicy: PreemptLowerPriority<br>globalDefault: false<br>description: &quot;High priority class for critical services&quot;</pre><ul><li>value: 1000000 → Higher value means higher priority.</li><li>preemptionPolicy: PreemptLowerPriority → This pod can evict lower-priority pods if resources are tight.</li><li>globalDefault: false → This is not the default priority (you must explicitly assign it to pods).</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: low-priority-pod<br>spec:<br>  containers:<br>    - name: apache<br>      image: apache2</pre><h3>Assigning PriorityClass to a Pod</h3><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: high-priority-pod<br>spec:<br>  priorityClassName: high-priority<br>  containers:<br>    - name: nginx<br>      image: nginx</pre><p>Now, whenever <strong>critical-app</strong> is deployed, Kubernetes will give it priority over lower-priority pods.</p><h3>Important Things to Note</h3><ol><li>To mark a Pod as critical, set priorityClassName for that Pod to system-cluster-critical or system-node-critical.</li><li>system-node-critical is the highest available priority, even higher than system-cluster-critical</li><li>All the control-plane components are marked with the system-node-critical</li><li>preemptionPolicy field in a <strong>PriorityClass</strong> resource can take two possible values:<br>- PreemptLowerPriority (default) : This allows preemption, meaning that if a pod using this priority class is scheduled but there aren&#39;t enough resources, it can evict (preempt) lower-priority pods to make space.<br>- Never : This disables preemption, meaning that if there aren&#39;t enough resources, the pod will remain in a pending state instead of evicting lower-priority pods.</li><li>A static pod marked as critical can’t be evicted. However, non-static pods marked as critical are always rescheduled.</li></ol><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/priorityclass-in-kubernetes-the-vip-pass-for-your-pods">gorgeousgawin.hashnode.dev</a> <em>on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2248cb361a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DaemonSets in Kubernetes — The Silent Guardians of Your Cluster ️]]></title>
            <link>https://medium.com/@laxman139/daemonsets-in-kubernetes-the-silent-guardians-of-your-cluster-%EF%B8%8F-56fb2e316c6f?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/56fb2e316c6f</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[daemonset]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 05:34:35 GMT</pubDate>
            <atom:updated>2025-10-01T05:36:47.064Z</atom:updated>
            <content:encoded><![CDATA[<h3>DaemonSets in Kubernetes — The Silent Guardians of Your Cluster 🛡️</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*62LGC7uBT3wFJBC-.jpeg" /></figure><p>Kubernetes is a bustling ecosystem of pods, services, and deployments. But what about those tasks that need to run on <strong>every node</strong> in your cluster?</p><p>Enter <strong>DaemonSets</strong> -the unsung heroes of Kubernetes. In this article, we’ll explore what DaemonSets are, why they’re essential, and how to use them effectively.</p><h3>� The Problem: Node-Level Tasks in Kubernetes</h3><p>Imagine you need to:</p><ul><li>Run a logging agent on every node.</li><li>Deploy a monitoring tool like Prometheus Node Exporter.</li><li>Ensure a security agent is always present on all nodes.</li></ul><p>Using a regular Deployment or Pod won’t cut it because:</p><ul><li>You can’t guarantee a pod will run on <strong>every node</strong>.</li><li>Scaling manually is tedious and error-prone.</li><li>New nodes won’t automatically get the required pods.</li></ul><p>This is where <strong>DaemonSets</strong> come to the rescue.</p><h3>🛠️ What Are DaemonSets?</h3><p>A <strong>DaemonSet</strong> is a Kubernetes controller that ensures a copy of a pod runs on <strong>every node</strong> (or a subset of nodes) in your cluster. If a new node is added, the DaemonSet automatically schedules a pod on it. If a node is removed, the pod is garbage-collected.</p><p>Key features:</p><ul><li><strong>Node-Level Coverage</strong>: Runs a pod on every node (or specific nodes using labels).</li><li><strong>Automatic Scaling</strong>: Scales with your cluster-no manual intervention needed.</li><li><strong>Self-Healing</strong>: If a pod is deleted, the DaemonSet recreates it.</li><li><strong>Resource Efficiency</strong>: Ensures only one pod runs per node (unless overridden).</li></ul><h3>🎯 Why Are DaemonSets Needed?</h3><ol><li><strong>Node-Specific Tasks</strong>: Perfect for logging, monitoring, and security agents.</li><li><strong>Cluster-Wide Consistency</strong>: Ensures every node has the required software.</li><li><strong>Automatic Scaling</strong>: Handles node additions and removals seamlessly.</li><li><strong>Resource Optimization</strong>: Avoids over-provisioning by running only one pod per node.</li></ol><h3>🛠️ How to Use DaemonSets</h3><p>Let’s create a DaemonSet to deploy a logging agent on every node in your cluster.</p><pre>apiVersion: apps/v1<br>kind: DaemonSet<br>metadata:<br>  name: logging-agent<br>  namespace: kube-system<br>  labels:<br>    app: logging-agent<br>spec:<br>  selector:<br>    matchLabels:<br>      name: logging-agent<br>  template:<br>    metadata:<br>      labels:<br>        name: logging-agent<br>    spec:<br>      containers:<br>      - name: logging-agent<br>        image: fluent/fluentd:latest<br>        resources:<br>          limits:<br>            memory: &quot;200Mi&quot;<br>            cpu: &quot;100m&quot;<br>          requests:<br>            memory: &quot;100Mi&quot;<br>            cpu: &quot;50m&quot;<br>      tolerations:<br>      - key: node-role.kubernetes.io/master<br>        effect: NoSchedule</pre><ul><li><strong>selector</strong>: Matches the pods managed by this DaemonSet.</li><li><strong>template</strong>: Defines the pod specification.</li><li><strong>tolerations</strong>: Allows the DaemonSet to run on master nodes (optional).</li></ul><p>Apply the DaemonSet:</p><pre>kubectl apply -f daemonset.yaml</pre><p>Now, a logging-agent pod will run on every node in your cluster. If you add or remove nodes, the DaemonSet will handle it automatically.</p><h3>🧩 Advanced Use Cases</h3><ol><li><strong>Node-Specific Workloads</strong>: Use node labels to run DaemonSets on specific nodes.</li><li>Example: Run a GPU monitoring tool only on GPU-enabled nodes.</li><li><strong>Custom Taints and Tolerations</strong>: Control which nodes the DaemonSet can run on.</li><li><strong>Rolling Updates</strong>: Update DaemonSet pods in a controlled manner using updateStrategy.</li></ol><h3>🎯 Key Takeaways</h3><ul><li><strong>DaemonSets</strong> ensure a pod runs on every node in your cluster.</li><li>They’re perfect for node-specific tasks like logging, monitoring, and security.</li><li>They scale automatically with your cluster and handle node changes seamlessly.</li><li>Use them to maintain consistency and efficiency across your nodes.</li></ul><p>So, the next time you need to run a pod on every node, think <strong>DaemonSets</strong> -your silent guardians in the Kubernetes world. 🛡️</p><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/daemonsets-in-kubernetes-the-silent-guardians-of-your-cluster">gorgeousgawin.hashnode.dev</a> <em>on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56fb2e316c6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LimitRange and Resource Quotas: Taming Kubernetes Resource Chaos ]]></title>
            <link>https://medium.com/@laxman139/limitrange-and-resource-quotas-taming-kubernetes-resource-chaos-3da6567b35b2?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/3da6567b35b2</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[resource-quota]]></category>
            <category><![CDATA[kubernetes-namespaces]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 05:27:30 GMT</pubDate>
            <atom:updated>2025-10-01T05:30:48.103Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*jDbAuwR0749nvihc.jpeg" /></figure><p>Kubernetes is a powerful orchestration tool, but with great power comes great responsibility. Imagine a scenario where one greedy pod consumes all the CPU and memory, leaving other pods starving. Or a namespace where resources are over-allocated, causing cluster-wide performance issues. Sounds like a nightmare, right? Enter <strong>LimitRange</strong> and <strong>ResourceQuota</strong> -Kubernetes’ dynamic duo for resource management. In this article, we’ll dive into what they are, why they’re essential, and how to use them effectively.</p><h3>� The Problem: Resource Anarchy in Kubernetes</h3><p>In a Kubernetes cluster, multiple teams and applications share the same resources. Without proper governance, chaos ensues:</p><ul><li><strong>Resource Hogging</strong>: A single pod can monopolize CPU and memory, starving others.</li><li><strong>Over-Provisioning</strong>: Developers might request excessive resources “just to be safe,” leading to wasted capacity.</li><li><strong>Under-Provisioning</strong>: Pods might not get enough resources, causing crashes or poor performance.</li><li><strong>Namespace Sprawl</strong>: One namespace could consume all available resources, leaving nothing for others.</li></ul><p>This is where <strong>LimitRange</strong> and <strong>ResourceQuota</strong> come to the rescue.</p><h3>🛠️ What Are LimitRange and ResourceQuota?</h3><h4>1. LimitRange: Setting Boundaries for Pods and Containers</h4><p>Think of <strong>LimitRange</strong> as a bouncer at a club. It enforces rules on how much CPU, memory, and storage each pod or container can request or use. It ensures that no single pod or container goes overboard.</p><p><strong>Key features:</strong></p><ul><li>Sets <strong>minimum</strong> and <strong>maximum</strong> resource limits for CPU and memory.</li><li>Defines <strong>default requests</strong> and <strong>limits</strong> if not specified by the user.</li><li>Prevents resource starvation by ensuring fair usage.</li></ul><h4>2. ResourceQuota: Governing Namespace-Level Resources</h4><p>While <strong>LimitRange</strong> focuses on individual pods, <strong>ResourceQuota</strong> operates at the namespace level. It’s like a budget manager for your Kubernetes namespace, ensuring that no single namespace consumes all the cluster resources.</p><p><strong>Key features:</strong></p><ul><li>Limits the total amount of CPU, memory, and storage a namespace can use.</li><li>Controls the number of objects (pods, services, secrets, etc.) in a namespace.</li><li>Prevents resource exhaustion across the cluster.</li></ul><h3>� Why Are They Needed?</h3><ol><li><strong>Fair Resource Allocation</strong>: Ensures that all applications get their fair share of resources.</li><li><strong>Cost Optimization</strong>: Prevents over-provisioning, saving cloud costs.</li><li><strong>Stability and Performance</strong>: Avoids resource contention, ensuring smooth cluster operations.</li><li><strong>Multi-Tenancy</strong>: Enables safe sharing of clusters across teams or projects.</li><li><strong>Compliance</strong>: Helps meet organizational policies and SLAs.</li></ol><h3>🛠️ How to Use LimitRange and ResourceQuota</h3><h4>1. LimitRange in Action</h4><p>Let’s create a LimitRange to enforce resource constraints in a namespace.</p><pre>apiVersion: v1<br>kind: LimitRange<br>metadata:<br>  name: resource-limits<br>  namespace: my-namespace<br>spec:<br>  limits:<br>  - type: Container<br>    default:<br>      cpu: &quot;500m&quot;<br>      memory: &quot;512Mi&quot;<br>    defaultRequest:<br>      cpu: &quot;100m&quot;<br>      memory: &quot;256Mi&quot;<br>    max:<br>      cpu: &quot;1&quot;<br>      memory: &quot;1Gi&quot;<br>    min:<br>      cpu: &quot;50m&quot;<br>      memory: &quot;128Mi&quot;</pre><ul><li><strong>default</strong>: If no resource limits are specified, these values are applied.</li><li><strong>defaultRequest</strong>: The minimum resources a container will request.</li><li><strong>max</strong> and <strong>min</strong>: The upper and lower bounds for resource usage.</li></ul><pre>kubectl apply -f limitrange.yaml</pre><p>Now, any pod in the my-namespace namespace will be bound by these limits.</p><h3>2. ResourceQuota in Action</h3><p>Next, let’s create a ResourceQuota to limit the total resources in a namespace.</p><pre>apiVersion: v1<br>kind: ResourceQuota<br>metadata:<br>  name: namespace-quota<br>  namespace: my-namespace<br>spec:<br>  hard:<br>    requests.cpu: &quot;2&quot;<br>    requests.memory: &quot;2Gi&quot;<br>    limits.cpu: &quot;4&quot;<br>    limits.memory: &quot;4Gi&quot;<br>    pods: &quot;10&quot;<br>    services: &quot;5&quot;<br>    secrets: &quot;10&quot;</pre><ul><li><strong>requests.cpu/memory</strong>: Total requested CPU and memory.</li><li><strong>limits.cpu/memory</strong>: Total limit for CPU and memory.</li><li><strong>pods/services/secrets</strong>: Limits the number of these objects in the namespace.</li></ul><p>Apply the ResourceQuota:</p><pre>kubectl apply -f resourcequota.yaml</pre><p>Now, the my-namespace namespace is capped at the specified resource limits.</p><h3>🧩 Combining LimitRange and ResourceQuota</h3><p>When used together, <strong>LimitRange</strong> and <strong>ResourceQuota</strong> provide a robust resource management framework:</p><p>For example, if a namespace has a ResourceQuota of 2 CPU and a LimitRange with a max CPU of 1 per pod, you can&#39;t create more than 2 pods with the maximum CPU limit.</p><h3>🚀 Real-World Use Case: Multi-Tenant Clusters</h3><p>Imagine a SaaS platform where each customer gets a dedicated namespace. Without <strong>LimitRange</strong> and <strong>ResourceQuota</strong>, one customer’s misconfigured application could consume all cluster resources, affecting others. By enforcing resource limits and quotas, you ensure fair usage and isolate performance issues.</p><h3>🎯 Key Takeaways</h3><ul><li><strong>LimitRange</strong> enforces resource limits at the pod/container level.</li><li><strong>ResourceQuota</strong> governs resource usage at the namespace level.</li><li>Together, they ensure fair resource allocation, cost optimization, and cluster stability.</li><li>Use them to tame resource chaos and build reliable, multi-tenant Kubernetes clusters.</li></ul><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/limitrange-and-resource-quotas-taming-kubernetes-resource-chaos">gorgeousgawin.hashnode.dev</a> <em>on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3da6567b35b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Probes: The Secret to Self-Healing Applications ]]></title>
            <link>https://medium.com/@laxman139/kubernetes-probes-the-secret-to-self-healing-applications-5343de647253?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/5343de647253</guid>
            <category><![CDATA[kubernetes-probes]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 05:18:51 GMT</pubDate>
            <atom:updated>2025-10-01T05:24:10.232Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gdS3ZJjGfwjkh3ba-NgSxg.jpeg" /></figure><p>Imagine deploying an application in Kubernetes, only to find that some pods randomly stop working, others become unresponsive, and traffic still gets routed to a dead service. Nightmare, right? 😱 This is where <strong>Kubernetes Probes</strong> come to the rescue!</p><p>In this article, we’ll explore why probes are essential, what happens if you don’t use them, and how you can leverage different types of probes- <strong>liveness, readiness, and startup probes</strong>-to make your applications more <strong>resilient and self-healing</strong>. We’ll also cover different ways to implement probes using <strong>HTTP, gRPC, TCP, and exec checks</strong>. By the end, you’ll be a probe expert! 💡</p><h3>🚀 Why Do We Need Probes in Kubernetes?</h3><p>Kubernetes runs applications as <strong>containers</strong>, but unlike traditional applications, containers don’t always behave predictably. They might:</p><ul><li>Crash unexpectedly (due to memory leaks, panics, etc.).</li><li>Become unresponsive while still running.</li><li>Take too long to start due to heavy initialization tasks.</li></ul><p>Without probes, Kubernetes <strong>has no idea</strong> whether your application is healthy or not! As a result, it may keep sending traffic to a broken pod or fail to restart a crashed application.</p><h3>What Happens If We Don’t Use Probes?</h3><p>🚨 <strong>Scenario 1: A Dead Application Still Gets Traffic</strong></p><ul><li>A web server crashes but remains in a “running” state.</li><li>Kubernetes still routes traffic to it, causing users to get errors.</li><li>Customers get frustrated, and you lose business. 😭</li></ul><p>🚨 <strong>Scenario 2: A Slow-Starting App Gets Killed Prematurely</strong></p><ul><li>Your application takes 60 seconds to initialize.</li><li>Kubernetes thinks it’s dead and restarts it over and over.</li><li>Your app <strong>never becomes available</strong>, even though it was working fine! 🙃</li></ul><p>🚨 <strong>Scenario 3: A Pod Crashes but Never Gets Restarted</strong></p><ul><li>Your backend service crashes due to a memory leak.</li><li>Kubernetes doesn’t detect it and never restarts it.</li><li>The entire system slowly fails because of one bad pod. 🔥</li></ul><h3>🛠️ Types of Kubernetes Probes</h3><p>Kubernetes provides three types of probes to prevent these issues:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*h8Wyd-4lw0ZumSxRBgyV1A.png" /></figure><h3>🕵️‍♂️ Exploring Different Probe Methods</h3><p>Kubernetes offers multiple ways to check container health:</p><h4>1️⃣ HTTP Probe — Ideal for Web Applications 🌍</h4><p><strong>Use Case:</strong> Check if a web server is responding.</p><p>Kubernetes sends an HTTP request to /healthz. If the response is <strong>200 OK</strong>, the pod is healthy. If not, Kubernetes restarts it.</p><h4>2️⃣ gRPC Probe — Perfect for Microservices 🔗</h4><p><strong>Use Case:</strong> Check if a gRPC service is alive.</p><p>Kubernetes makes a <strong>gRPC health check</strong> request. If the service responds, it’s considered healthy. If not, it’s restarted.</p><h4>3️⃣ TCP Probe — Great for Databases and TCP-Based Services 📡</h4><p><strong>Use Case:</strong> Check if a database (e.g., PostgreSQL) is accepting connections.</p><p>Kubernetes tries to establish a <strong>TCP connection</strong>. If successful, the pod is healthy. If it fails, Kubernetes restarts the container.</p><h4>4️⃣ Exec Probe — Custom Commands for Complex Applications 🛠️</h4><p><strong>Use Case:</strong> Run a script inside the container to verify health.</p><p>Kubernetes <strong>executes a command</strong> inside the container. If the command runs successfully (exit code 0), the pod is healthy. Otherwise, Kubernetes restarts it.</p><p>💡 The Kubelet communicates with the <strong>container runtime</strong> (e.g., Docker, containerd, CRI-O) to <strong>execute probe commands</strong> inside containers. If the probe fails, Kubelet instructs the runtime to restart or remove the pod from service.</p><h3>🏆 Best Practices for Using Probes</h3><ul><li>Use Readiness Probes for External Dependencies</li><li>Use Startup Probes for Slow-Starting Apps</li><li>Set Reasonable Probe Timeouts</li><li>Always Test Your Probes</li></ul><h3>🎯 Conclusion</h3><p>Kubernetes <strong>Probes</strong> are a powerful feature that makes your applications more <strong>resilient, self-healing, and production-ready</strong>. Without them, you risk serving broken services to users, premature restarts, or complete application failure.</p><p>By using <strong>liveness, readiness, and startup probes</strong>, combined with <strong>HTTP, gRPC, TCP, or exec methods</strong>, you can ensure your Kubernetes workloads stay healthy and responsive. 🚀</p><p><em>Originally published at </em><a href="https://dev.to/imlucky883/kubernetes-probes-the-secret-to-self-healing-applications-2hnn"><em>https://dev.to</em></a><em> on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5343de647253" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RBAC in Kubernetes: Understanding Roles, and RoleBindings ]]></title>
            <link>https://medium.com/@laxman139/rbac-in-kubernetes-understanding-roles-and-rolebindings-dbcc7b12fc52?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbcc7b12fc52</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 05:02:16 GMT</pubDate>
            <atom:updated>2025-10-01T05:14:20.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*fcEoRMHjq-_Jz32V.jpeg" /></figure><p>Kubernetes is a powerful platform for managing containerized applications, but with great power comes the need for <strong>granular access control</strong>.</p><p>Enter <strong>Role-Based Access Control (RBAC)</strong>-a security mechanism that allows you to define <strong>who can do what</strong> in your cluster. In this article, we’ll dive into <strong>Roles</strong>, <strong>RoleBindings</strong>, <strong>ClusterRoles</strong>, and <strong>ClusterRoleBindings</strong>, explore their different combinations, and explain why <strong>ClusterRole with RoleBinding</strong> is possible but not the other way around.</p><h3>� The Problem: Managing Access in Kubernetes</h3><p>In a Kubernetes cluster, you might have:</p><ul><li><strong>Developers</strong> who need access to specific namespaces.</li><li><strong>Admins</strong> who require cluster-wide privileges.</li><li><strong>CI/CD tools</strong> that need limited permissions to deploy applications.</li></ul><p>Without proper access control:</p><ul><li>Users or services might have <strong>more permissions than they need</strong>, leading to security risks.</li><li>It’s difficult to enforce the <strong>principle of least privilege</strong>.</li><li>Auditing and compliance become challenging.</li></ul><p>This is where <strong>RBAC</strong> comes into play.</p><h3>🛠️ What Are Roles, RoleBindings, ClusterRoles, and ClusterRoleBindings?</h3><h3>1. Role: Namespace-Specific Permissions</h3><p>A <strong>Role</strong> defines a set of permissions (e.g., get, list, create) for resources within a <strong>specific namespace</strong>.</p><p>Example Role:</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: Role<br>metadata:<br>  namespace: default<br>  name: pod-reader<br>rules:<br>- apiGroups: [&quot;&quot;]<br>  resources: [&quot;pods&quot;]<br>  verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;]</pre><h3>2. RoleBinding: Granting Roles to Users or Groups</h3><p>A <strong>RoleBinding</strong> binds a Role to a user, group, or service account within a <strong>specific namespace</strong>.</p><p>Example RoleBinding:</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: RoleBinding<br>metadata:<br>  namespace: default<br>  name: pod-reader-binding<br>subjects:<br>- kind: User<br>  name: alice<br>  apiGroup: rbac.authorization.k8s.io<br>roleRef:<br>  kind: Role<br>  name: pod-reader<br>  apiGroup: rbac.authorization.k8s.io</pre><h3>3. ClusterRole: Cluster-Wide Permissions</h3><p>A <strong>ClusterRole</strong> defines permissions for resources across the <strong>entire cluster</strong> (including non-namespaced resources like Nodes or PersistentVolumes).</p><p>Example ClusterRole:</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  name: cluster-admin<br>rules:<br>- apiGroups: [&quot;&quot;]<br>  resources: [&quot;*&quot;]<br>  verbs: [&quot;*&quot;]</pre><h3>4. ClusterRoleBinding: Granting ClusterRoles to Users or Groups</h3><p>A <strong>ClusterRoleBinding</strong> binds a ClusterRole to a user, group, or service account across the <strong>entire cluster</strong>.</p><p>Example ClusterRoleBinding:</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: cluster-admin-binding<br>subjects:<br>- kind: User<br>  name: admin<br>  apiGroup: rbac.authorization.k8s.io<br>roleRef:<br>  kind: ClusterRole<br>  name: cluster-admin<br>  apiGroup: rbac.authorization.k8s.io</pre><h3>🧩 Different Combinations of Roles and Bindings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*2HzgxRxnEgVfBeW7sEcGng.png" /></figure><h3>🚀 Why ClusterRole with RoleBinding is Possible (But Not the Other Way Around)</h3><h3>1. ClusterRole with RoleBinding</h3><p>A <strong>ClusterRole</strong> can be bound to a <strong>RoleBinding</strong> within a specific namespace. This allows you to:</p><p><strong>Example</strong>: A ClusterRole for managing Pods across the cluster can be bound to a RoleBinding in the default namespace, granting Pod management permissions only in that namespace.</p><h3>2. Role with ClusterRoleBinding is Not Allowed</h3><p>A <strong>Role</strong> is <strong>namespace-scoped</strong>, meaning it only applies to resources within a specific namespace. Binding it to a <strong>ClusterRoleBinding</strong> (which is cluster-wide) would create ambiguity:</p><p>This is why Kubernetes does not allow this combination.</p><h3>🎯 When to Use Each Combination</h3><ol><li><strong>Role + RoleBinding</strong>: Use for <strong>namespace-specific access</strong> (e.g., granting a developer access to the dev namespace).</li><li><strong>ClusterRole + RoleBinding</strong>: Use for <strong>namespace-specific access with cluster-wide permissions</strong> (e.g., granting a CI/CD tool access to Deployments in the staging namespace).</li><li><strong>ClusterRole + ClusterRoleBinding</strong>: Use for <strong>cluster-wide access</strong> (e.g., granting cluster admin privileges).</li></ol><h3>📚 Best Practices</h3><ol><li><strong>Principle of Least Privilege</strong>: Grant only the permissions users or services need.</li><li><strong>Use Namespaces</strong>: Isolate resources and permissions using namespaces.</li><li><strong>Audit Regularly</strong>: Review Roles, ClusterRoles, and their bindings periodically.</li><li><strong>Avoid Wildcards</strong>: Be specific with permissions (e.g., avoid verbs: [&quot;*&quot;] unless absolutely necessary).</li></ol><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/">gorgeousgawin.hashnode.dev/</a><em> on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbcc7b12fc52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ConfigMaps and Secrets: Managing Configuration and Sensitive Data in Kubernetes ]]></title>
            <link>https://medium.com/@laxman139/configmaps-and-secrets-managing-configuration-and-sensitive-data-in-kubernetes-fb8732585573?source=rss-118cbbebcc32------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb8732585573</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[configmap]]></category>
            <category><![CDATA[secrets]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <dc:creator><![CDATA[Laxman]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 03:22:28 GMT</pubDate>
            <atom:updated>2025-10-01T04:49:11.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*vI-rCYcLW-ErxCaN.jpeg" /></figure><p>Kubernetes is all about running applications at scale, but how do you manage configuration data and sensitive information like passwords or API keys?</p><p>Enter <strong>ConfigMaps</strong> and <strong>Secrets</strong> -two powerful tools that help you decouple configuration and sensitive data from your application code. In this article, we’ll explore what ConfigMaps and Secrets are, how they work, when to use each, and how to use them effectively in your Kubernetes clusters.</p><h3>� The Problem: Configuration and Sensitive Data in Kubernetes</h3><p>When deploying applications, you often need to:</p><ul><li><strong>Configure application settings</strong> like environment variables, configuration files, or command-line arguments.</li><li><strong>Manage sensitive data</strong> like passwords, API keys, or TLS certificates.</li></ul><p>Hardcoding these values into your application or container images is a bad idea because:</p><ul><li>It makes your application <strong>inflexible</strong> and environment-specific.</li><li>It exposes sensitive data, creating <strong>security risks</strong>.</li><li>It requires rebuilding and redeploying your application for every configuration change.</li></ul><p>This is where <strong>ConfigMaps</strong> and <strong>Secrets</strong> come into play.</p><h3>🛠️ What Are ConfigMaps and Secrets?</h3><h4>1. ConfigMaps: Managing Non-Sensitive Configuration Data</h4><p>A <strong>ConfigMap</strong> is a Kubernetes object that stores <strong>non-sensitive configuration data</strong> in key-value pairs. It allows you to decouple configuration from your application code, making your application more portable and easier to manage.</p><p><strong>Key features:</strong></p><ul><li>Stores configuration data as <strong>key-value pairs</strong> or <strong>files</strong>.</li><li>Can be injected into pods as <strong>environment variables</strong> or <strong>configuration files</strong>.</li><li>Ideal for non-sensitive data like environment settings, URLs, or feature flags.</li></ul><h4>2. Secrets: Managing Sensitive Data</h4><p>A <strong>Secret</strong> is a Kubernetes object designed to store <strong>sensitive information</strong> like passwords, API keys, or TLS certificates. Secrets are similar to ConfigMaps but are specifically designed for sensitive data.</p><p><strong>Key features:</strong></p><ul><li>Stores sensitive data as <strong>key-value pairs</strong> or <strong>files</strong>.</li><li>Data is <strong>base64-encoded</strong> (not encrypted by default).</li><li>Can be injected into pods as <strong>environment variables</strong> or <strong>mounted files</strong>.</li><li>Ideal for sensitive data like database credentials, OAuth tokens, or TLS certificates.</li></ul><h3>🎯 When to Use ConfigMaps vs. Secrets</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*XTTweBqN_UySwa6TG7r75Q.png" /></figure><h3>🛠️ How to Use ConfigMaps and Secrets</h3><h3>1. Creating a ConfigMap</h3><p>Let’s create a ConfigMap to store non-sensitive configuration data.</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: app-config<br>  namespace: default<br>data:<br>  APP_COLOR: blue<br>  APP_ENV: production<br>  config.json: |<br>    {<br>      &quot;logLevel&quot;: &quot;debug&quot;,<br>      &quot;timeout&quot;: &quot;30s&quot;<br>    }</pre><ul><li><strong>data</strong>: Stores key-value pairs or files.</li><li><strong>APP_COLOR</strong> and <strong>APP_ENV</strong>: Simple key-value pairs.</li><li><strong>config.json</strong>: A configuration file stored as a multi-line string.</li></ul><p>Apply the ConfigMap:</p><pre>kubectl apply -f configmap.yaml</pre><h3>2. Creating a Secret</h3><p>Now, let’s create a Secret to store sensitive data.</p><pre>apiVersion: v1<br>kind: Secret<br>metadata:<br>  name: app-secret<br>  namespace: default<br>type: Opaque<br>data:<br>  DB_USERNAME: dXNlcm5hbWU=  # base64-encoded &quot;username&quot;<br>  DB_PASSWORD: cGFzc3dvcmQ=  # base64-encoded &quot;password&quot;</pre><p>Apply the Secret:</p><pre>kubectl apply -f secret.yaml</pre><h3>🧩 Injecting ConfigMaps and Secrets into Pods</h3><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: app-pod<br>spec:<br>  containers:<br>  - name: app-container<br>    image: busybox:latest<br>    command: [ &quot;/bin/sh&quot;, &quot;-c&quot;, &quot;env&quot; ]<br>    # Method 1: Injecting ConfigMap and Secret data as environment variables [2]<br>    env:<br>    - name: APP_COLOR<br>      valueFrom:<br>        configMapKeyRef:<br>          name: app-config<br>          key: APP_COLOR<br>    - name: APP_ENV<br>      valueFrom:<br>        configMapKeyRef:<br>          name: app-config<br>          key: APP_ENV<br>    - name: DB_USERNAME<br>      valueFrom:<br>        secretKeyRef:<br>          name: app-secret<br>          key: DB_USERNAME<br>    - name: DB_PASSWORD<br>      valueFrom:<br>        secretKeyRef:<br>          name: app-secret<br>          key: DB_PASSWORD<br>    # Method 2: Mounting ConfigMap and Secret as Volumes [2]<br>    volumeMounts:<br>    - name: config-volume<br>      mountPath: /etc/config<br>    - name: secret-volume<br>      mountPath: /etc/secrets<br>  volumes:<br>  - name: config-volume<br>    configMap:<br>      name: app-config<br>  - name: secret-volume<br>    secret:<br>      secretName: app-secret</pre><h3>🚀 Real-World Use Cases</h3><ol><li>ConfigMaps:<br>Storing environment-specific configurations (e.g., dev, staging, prod).</li></ol><ul><li>Managing feature flags or application settings.</li></ul><p>2. Secrets:</p><ul><li>Storing database credentials or API keys.</li><li>Managing TLS certificates for HTTPS</li></ul><h3>📚 Best Practices</h3><ol><li><strong>Use ConfigMaps for Non-Sensitive Data</strong>: Avoid storing sensitive information in ConfigMaps.</li><li><strong>Use Secrets for Sensitive Data</strong>: Always use Secrets for sensitive information, and consider enabling encryption at rest for added security.</li><li><strong>Avoid Hardcoding</strong>: Never hardcode configuration or sensitive data in your application code or container images.</li><li><strong>Use Namespaces</strong>: Isolate ConfigMaps and Secrets using namespaces for better organization and security.</li></ol><h3>� Key Takeaways</h3><ul><li><strong>ConfigMaps</strong> are for non-sensitive configuration data.</li><li><strong>Secrets</strong> are for sensitive information like passwords and API keys.</li><li>Both can be injected into pods as environment variables or mounted files.</li><li>Use them to decouple configuration and sensitive data from your application code.</li></ul><p>By leveraging ConfigMaps and Secrets, you can build more <strong>portable, secure, and maintainable</strong> applications in Kubernetes. 🚀</p><p><em>Originally published at </em><a href="https://gorgeousgawin.hashnode.dev/configmaps-and-secrets-managing-configuration-and-sensitive-data-in-kubernetes">gorgeousgawin.hashnode.dev</a> <em>on October 1, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb8732585573" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>