<?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 Nishant Raj on Medium]]></title>
        <description><![CDATA[Stories by Nishant Raj on Medium]]></description>
        <link>https://medium.com/@369rnishant?source=rss-8542e7b85494------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kfEuzzYmlSiaHez98641Hg.jpeg</url>
            <title>Stories by Nishant Raj on Medium</title>
            <link>https://medium.com/@369rnishant?source=rss-8542e7b85494------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:11:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@369rnishant/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[Understanding AWS EBS on EKS: Architecture, Storage Flow, and Cost Optimization]]></title>
            <link>https://medium.com/@369rnishant/understanding-aws-ebs-on-eks-architecture-storage-flow-and-cost-optimization-c1cc7a00bd27?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1cc7a00bd27</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[gcp]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 12:41:01 GMT</pubDate>
            <atom:updated>2026-10-21T12:41:01.936Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with Amazon EKS, understanding how storage behaves under the hood is critical for building reliable and cost-effective applications. While many developers initially encounter shared network filesystems, managing persistent data for workloads like databases requires a completely different approach.</p><p>This guide breaks down what AWS EBS is, why it is deeply integrated into Kubernetes clusters from day one, how the internal provisioning flow works, and how you can leverage it to slash your architecture costs.</p><h3>1. EFS vs. EBS: The Real-World Analogy</h3><p>To understand the difference between <strong>AWS EFS (Elastic File System)</strong> and <strong>AWS EBS (Elastic Block Store)</strong>, imagine running a busy office:</p><ul><li><strong>AWS EFS</strong> is like a <strong>Shared Locker Room</strong>. Anyone from any floor or department can access a common folder simultaneously. It acts as a Network File System (NFS) designed for multi-pod read/write access.</li><li><strong>AWS EBS</strong> is like a <strong>Personal Hard Drive</strong> attached directly to an employee’s desk (your EC2 Worker Node). It is built for raw, high-performance, single-node block storage.</li></ul><h3>2. Why is EBS Present by Default in an EKS Cluster?</h3><p>When you spin up an EKS cluster, AWS provisions <strong>EC2 Worker Nodes</strong> (virtual machines) behind the scenes.</p><ul><li><strong>The Root Volume:</strong> Every EC2 instance requires an operating system and a boot drive. AWS automatically attaches a default root EBS volume to each node so it can boot up and run Kubernetes system components (like kubelet).</li><li><strong>The CSI Driver Ecosystem:</strong> Modern EKS clusters come pre-configured with or easily support the <strong>AWS EBS CSI (Container Storage Interface) Driver</strong>. This driver acts as the native bridge allowing the Kubernetes control plane to talk directly to AWS storage APIs.</li></ul><h3>3. Visualizing EBS Volumes &amp; Core Concepts</h3><p>EBS provides raw block storage (similar to a physical SSD plugged into a motherboard) virtualized over AWS’s high-speed network.</p><p>Plaintext</p><pre>+-----------------------------------------------------------------------+<br>|                         AWS EKS Worker Node                           |<br>|                                                                       |<br>|   +--------------------------+                                        |<br>|   |   PostgreSQL Pod         |                                        |<br>|   +--------------------------+                                        |<br>|                 | (Mounts via PVC)                                    |<br>|                 v                                                     |<br>|   +--------------------------+         (Virtual Network Cable)        |<br>|   |  EBS Volume (gp3)        | &lt;--------------------------------------+<br>|   |  (Raw Block Storage)     |                                        |<br>|   +--------------------------+                                        |<br>+-----------------------------------------------------------------------+</pre><h3>Key Concepts to Keep in Mind:</h3><ul><li><strong>Access Mode (</strong>ReadWriteOnce - RWO<strong>):</strong> An EBS volume can only be mounted to <strong>one node at a time</strong>. It is not meant for multi-node sharing, but it is ideal for single-primary databases.</li><li><strong>The </strong>gp3<strong> Standard:</strong> Always opt for gp3 volumes over legacy gp2. They offer baseline performance of 3,000 IOPS and 125 MB/s throughput out of the box at a lower price point.</li></ul><h3>4. The Complete Flow: How PVC, CSI, and EBS Work Together</h3><p>Let’s trace the exact lifecycle when you deploy a stateful application like PostgreSQL that needs persistent storage:</p><ul><li><strong>PVC Request (The Claim):</strong> You write a Kubernetes manifest defining a PersistentVolumeClaim (PVC), stating your app needs a 10GB gp3 volume.</li><li><strong>CSI Driver Interception:</strong> The Kubernetes <strong>EBS CSI Driver</strong> listens for storage requests and translates Kubernetes-native API objects into AWS-specific API commands.</li><li><strong>AWS API Call &amp; Volume Creation:</strong> The CSI driver talks to AWS: <em>“Provision a new 10GB EBS block storage volume in this account.”</em> AWS instantly creates the volume.</li><li><strong>Attachment &amp; Mounting:</strong> AWS physically attaches that EBS volume to the exact EC2 worker node where your PostgreSQL pod is scheduled. Kubernetes then mounts it into the container’s data path (/var/lib/postgresql/data).</li></ul><blockquote><strong><em>Result:</em></strong> Even if the application pod crashes or restarts, your data remains safely intact on the persistent EBS block volume.</blockquote><h3>5. Smart Cost Optimization with EBS</h3><p>Rethinking your database and storage architecture can lead to massive savings:</p><ul><li><strong>Eliminate Managed RDS Markups:</strong> Running managed databases like AWS RDS incurs heavy hourly compute and management markups. By hosting your database directly inside EKS backed by raw EBS volumes, you pay <strong>only for the raw storage (</strong>gp3<strong> at ~$0.08 per GB/month)</strong> while utilizing spare capacity on your existing worker nodes.</li><li><strong>Elastic Scaling:</strong> With gp3, you can scale storage size, IOPS, and throughput independently without downtime, allowing you to start small and scale only when needed.</li></ul><h3>Conclusion</h3><p>Understanding how EBS operates under the hood empowers you to design robust, high-performance, and cost-efficient cloud architectures on Kubernetes without relying blindly on expensive managed wrappers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1cc7a00bd27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Postgres on Kubernetes with EBS: Real Architecture or Clickbait?]]></title>
            <link>https://medium.com/@369rnishant/running-postgres-on-kubernetes-with-ebs-real-architecture-or-clickbait-ee5c73a3976c?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee5c73a3976c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[curiosity]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cost-savings]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 12:41:01 GMT</pubDate>
            <atom:updated>2026-10-20T12:41:01.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RS9xt2kpr_YLK7ibixhSLw.png" /></figure><p>If you’ve ever managed databases in the cloud, you know that managed services like AWS RDS can quickly eat up a significant chunk of your monthly cloud bill. But what if you could run production-grade PostgreSQL directly inside your Kubernetes cluster, backed by AWS EBS, without paying for extra managed service fees?</p><p>Is it practically viable, or is it just another infrastructure clickbait? Let’s break it down.</p><h3>1. The Real-Life Analogy: Owning vs. Renting a Storage Room</h3><p>Think of <strong>AWS RDS</strong> as renting a fully serviced luxury storage unit where a dedicated manager takes care of security, backups, maintenance, and cleaning. It’s convenient, but you pay a massive markup for that management service.</p><p>Running <strong>Postgres inside Kubernetes with EBS</strong> is like owning the building (your EKS nodes) and plugging in a standard hard drive (EBS volume) into your own rack. You get the exact same storage performance and persistence, but you only pay for the raw disc space (gp3 storage) rather than paying a premium for a managed service wrapper.</p><h3>2. How It Works Behind the Scenes (Architecture)</h3><p>It is <strong>100% real and practical</strong>. Kubernetes uses the Container Storage Interface (CSI) driver to dynamically attach EBS volumes to your Postgres pods.</p><pre>+------------------------------------------------------------------+<br>|                        Kubernetes Cluster                        |<br>|                                                                  |<br>|   +-------------------+              +-----------------------+   |<br>|   |   Postgres Pod    | ------------&gt;| PersistentVolumeClaim |   |<br>|   |   (StatefulSet)   |              |        (PVC)          |   |<br>|   +-------------------+              +-----------------------+   |<br>+------------------------------------------------------------------+<br>                                                   |<br>                                                   v<br>                                   +-------------------------------+<br>                                   |    AWS EBS Volume (gp3)       |<br>                                   |  (Persisted Raw Block Storage)|<br>                                   +-------------------------------+</pre><h3>The Workflow:</h3><ul><li><strong>StatefulSet Deployment:</strong> Postgres is deployed as a StatefulSet (not a standard Deployment) so that it maintains a sticky identity and persistent storage binding.</li><li><strong>Dynamic Provisioning via EBS CSI Driver:</strong> The PersistentVolumeClaim (PVC) requests storage from an AWS EBS StorageClass (like gp3).</li><li><strong>Volume Attachment:</strong> Kubernetes automatically provisions an AWS EBS volume and attaches it to the EC2 worker node where the Postgres pod is running.</li><li><strong>Data Persistence:</strong> Even if the Postgres pod crashes or restarts, Kubernetes re-attaches the exact same EBS volume to the new pod without any data loss.</li></ul><h3>3. Why This Saves Massive Costs (No Extra Charges)</h3><ul><li><strong>Zero Managed Service Markup:</strong> You pay strictly for the EBS gigabytes used (e.g., ~$0.08 per GB/month for gp3 in AWS) instead of paying for RDS compute instances, multi-AZ deployment fees, and management markups.</li><li><strong>Leverages Existing Infrastructure:</strong> Since your EKS worker nodes are already running, running Postgres inside the cluster consumes spare capacity without spinning up separate database instances.</li><li><strong>Declarative Infrastructure:</strong> You can manage your database manifests and storage setup right alongside your application code using IaC (Pulumi/Terraform).</li></ul><h3>4. Practical Catch: Is There Any Fine Print?</h3><p>While it is <strong>not clickbait</strong>, you must keep a few engineering considerations in mind:</p><ul><li><strong>EBS Availability Zone (AZ) Binding:</strong> An EBS volume is tied to a specific AWS Availability Zone. If your worker node fails and the pod reschedules to a node in a different AZ, the volume won’t attach automatically unless cross-AZ storage/replication or node affinity is handled.</li><li><strong>Backups are Your Responsibility:</strong> Unlike RDS (where automated snapshots are 1-click), you need to set up automated volume snapshots (using AWS Data Lifecycle Manager or tools like Velero / Zalando Postgres Operator).</li></ul><h3>Conclusion</h3><p>Connecting Postgres to cluster EBS volumes via PVCs is <strong>100% practical</strong> and widely used in production by platform engineering teams to eliminate unnecessary cloud spending. It gives you raw, high-performance database storage at baseline EBS costs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee5c73a3976c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Just Explored the Crisp of AWS Auto-Discovery: Fixing My Kubernetes Ingress]]></title>
            <link>https://medium.com/@369rnishant/just-explored-the-crisp-of-aws-auto-discovery-fixing-my-kubernetes-ingress-8f001b67043b?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f001b67043b</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[advanced-concepts]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[ingress]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Wed, 14 Oct 2026 01:11:04 GMT</pubDate>
            <atom:updated>2026-10-14T01:11:04.332Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever written a clean Kubernetes Ingress manifest, applied it to your EKS cluster, and then waited endlessly only to find ADDRESS<strong> stuck on </strong>&lt;none&gt;, you’re not alone.</p><p>Most engineers start debugging Ingress manifests, tweaking annotations, or re-deploying the AWS Load Balancer Controller. But more often than not, the issue isn’t in Kubernetes at all. It’s sitting silently down at the AWS networking layer: <strong>Missing VPC Subnet Auto-Discovery Tags.</strong></p><p>Here is a breakdown of what AWS Subnet Auto-Discovery actually is, why it breaks, and how a quick tagging fix gets your traffic flowing seamlessly.</p><h3>The Issue &amp; Context: What Actually Breaks?</h3><h3>The Context</h3><p>In an AWS EKS cluster, Kubernetes itself doesn’t spin up AWS hardware or load balancers. Instead, a background controller — the <strong>AWS Load Balancer Controller</strong> — monitors your cluster for Ingress objects or Services of type LoadBalancer.</p><p>When it sees a new Ingress resource, it makes API calls to AWS EC2 to:</p><ol><li>Provision an Application Load Balancer (ALB).</li><li>Create Target Groups pointing to your node port or pod IPs.</li><li>Bind the resulting AWS DNS back into your Ingress status.</li></ol><h3>The Issue (The Invisible Wall)</h3><p>Here is where things stall: A standard AWS VPC has multiple subnets spread across Availability Zones — some public (internet-facing) and some private (internal).</p><p>When the Load Balancer Controller attempts to create your ALB, it queries AWS:</p><blockquote>“Which subnets inside this VPC should I place this Load Balancer in?”</blockquote><p>If your subnets do not have explicit auto-discovery tags, AWS returns an empty list. The controller logs an error like Could not auto-discover subnets, gives up, and stalls.</p><h4>The Symptom</h4><p>When you run kubectl get ingress, you see this:</p><pre>NAME          CLASS   HOSTS   ADDRESS   PORTS   AGE<br>my-app-ingress  alb     *       &lt;none&gt;    80      25m</pre><p>That &lt;none&gt; means the controller never found a valid subnet to place the ALB.</p><h3>The Backstory &amp; Real-Life Analogy</h3><p>Imagine ordering food to your apartment complex.</p><p>The delivery driver (<strong>AWS Load Balancer Controller</strong>) arrives at the main gate of a massive gated society (<strong>VPC</strong>). The society has dozens of internal lanes and buildings, but <strong>none of the buildings or lanes have street signs or house numbers</strong>.</p><p>Even though your exact unit number is written on your delivery order (<strong>Ingress Manifest</strong>), the driver stands confused at the main gate because they cannot distinguish between visitor parking lanes and private resident roads.</p><ul><li><strong>The Missing Signboards:</strong> Subnet Tags.</li><li><strong>The Fix:</strong> Putting clear signboards on the roads so the driver instantly knows where to park and deliver.</li></ul><blockquote>Setting up Kubernetes Ingress without tagging your subnets is like trying to deliver pizza to “a building with a roof” — AWS has no idea which door to knock on.:)</blockquote><h3>The Technical Fix: Tags Required for Auto-Discovery</h3><p>To resolve this issue, you don’t need to change your Kubernetes manifests. You simply apply standard tags to your AWS VPC Subnets (via Pulumi, Terraform, or the AWS Console).</p><h3>1. Cluster Identification Tag (Public &amp; Private Subnets)</h3><p>Tells the controller: <em>“This subnet belongs to my EKS cluster.”</em></p><ul><li><strong>Key:</strong> kubernetes.io/cluster/&lt;your-cluster-name&gt;</li><li><strong>Value:</strong> shared or owned</li></ul><h3>2. Public / Internet-Facing Subnet Tag</h3><p>Tells the controller: <em>“Provision external/internet-facing ALBs here.”</em></p><ul><li><strong>Key:</strong> kubernetes.io/role/elb</li><li><strong>Value:</strong> 1</li></ul><p><em>(Triggered when </em>alb.ingress.kubernetes.io/scheme: internet-facing<em> is set)</em></p><h3>3. Private / Internal Subnet Tag</h3><p>Tells the controller: <em>“Provision internal-only ALBs here.”</em></p><ul><li><strong>Key:</strong> kubernetes.io/role/internal-elb</li><li><strong>Value:</strong> 1</li></ul><p><em>(Triggered when </em>alb.ingress.kubernetes.io/scheme: internal<em> is set)</em></p><h3>Summary</h3><ul><li><strong>What it is:</strong> AWS Subnet Auto-Discovery is the mechanism used by the AWS Load Balancer Controller to inspect VPC subnets and select where to deploy ALBs/NLBs dynamically.</li><li><strong>Why it fails:</strong> Omitting subnet tags prevents the controller from auto-discovering valid subnets, leaving Ingress address allocation stuck at &lt;none&gt;.</li><li><strong>Key Takeaway:</strong> Always include kubernetes.io/role/elb and kubernetes.io/role/internal-elb tags in your IaC subnet definitions from day one. Once tagged, Ingress provisioning works smoothly out of the box!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f001b67043b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Worked on K8s RBAC and It Just Amazed Me!]]></title>
            <link>https://medium.com/@369rnishant/worked-on-k8s-rbac-and-it-just-amazed-me-829635613c69?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/829635613c69</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cost-optimization]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 07:36:01 GMT</pubDate>
            <atom:updated>2026-10-12T07:36:01.435Z</atom:updated>
            <content:encoded><![CDATA[<p>Managing access controls in microservice environments can easily become a tangled web of security risks and administrative overhead. Recently, while configuring access policies on Amazon EKS using <strong>Kubernetes Role-Based Access Control (RBAC)</strong> integrated with <strong>AWS IAM</strong>, I experienced firsthand how clean, elegant, and powerful this setup is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GksJsDQoVbA4_1MKLa0lgA.png" /><figcaption>Complete k8s RBAC Flow</figcaption></figure><p>If you are looking to secure your Kubernetes environment without drowning in operational complexity, here is a breakdown of how K8s RBAC works, its architecture, and why it’s a game-changer for infrastructure engineering.</p><h3>1. The Real-Life Analogy: Why Do We Need RBAC?</h3><blockquote><em>Imagine working in a modern corporate office building. You don’t hand out master security keys to every employee, intern, or contractor who enters the building.</em></blockquote><p>If everyone had access to the server room, executive offices, and financial vaults, a single mistake could bring down the entire company’s operations. Instead, access is governed by <strong>roles</strong>:</p><ul><li><strong>Facilities Staff</strong> can enter utility areas.</li><li><strong>Engineering Teams</strong> can enter dev labs and server rooms.</li><li><strong>Visitors</strong> can only access the main lobby.</li></ul><p>In Kubernetes, giving developers or continuous integration pipelines full cluster-admin privileges is the equivalent of handing out master keys to everyone. A simple typo or unintended kubectl delete pods --all run in production could wipe out live services.</p><p><strong>RBAC (Role-Based Access Control)</strong> enforces the <strong>Principle of Least Privilege (PoLP)</strong>. It ensures that every identity — whether a human developer or an automated pipeline — is granted <em>only</em> the exact permissions needed to execute its job, and nothing more.</p><h3>2. How to Use K8s RBAC (AWS EKS Integration)</h3><p>When running Kubernetes on managed cloud providers like Amazon EKS, RBAC bridges the gap between your cloud Identity and Access Management (IAM) and native Kubernetes authorization primitives.</p><p>Here is the exact end-to-end flow of how IAM authentication connects to Kubernetes RBAC:</p><pre>+------------------------------+       +------------------------------------+       +--------------------------------+<br>|           IAM Role           | ----&gt; |         aws-auth ConfigMap         | ----&gt; |     ClusterRole &amp; Binding      |<br>|                              |       |                                    |       |                                |<br>| • Created with describe &amp;    |       | • Maps IAM Role ARN to a custom    |       | • ClusterRole: Defines powers  |<br>|   list cluster permissions   |       |   Kubernetes Group (e.g., group=x) |       | • Binding: Links group=x       |<br>+------------------------------+       +------------------------------------+       +--------------------------------+<br>                                                                                                    |<br>                                                                                                    v<br>                                                                                    +--------------------------------+<br>                                                                                    |        Target Action           |<br>                                                                                    |                                |<br>                                                                                    | • Granted: Read pod logs       |<br>                                                                                    +--------------------------------+</pre><h3>Step-by-Step Execution:</h3><p><strong>1. Create the AWS IAM Role</strong></p><p>Define an IAM role with standard policies (such as eks:DescribeCluster and eks:ListClusters) so the user or service can authenticate against the AWS EKS control plane.</p><p><strong>2. Map IAM to K8s via </strong>aws-auth<strong> ConfigMap</strong></p><p>In your EKS cluster, update the aws-auth ConfigMap to map the incoming IAM Role ARN to a specific Kubernetes group name (e.g., group = x).</p><p><strong>3. Define Kubernetes Permissions (</strong>ClusterRole<strong>)</strong></p><p>Create a ClusterRole (or Role for namespace-scoped access) specifying the exact actions (verbs) allowed on specific Kubernetes resources (apiGroups).</p><p>YAML</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  name: pod-log-reader<br>rules:<br>- apiGroups: [&quot;&quot;]<br>  resources: [&quot;pods&quot;, &quot;pods/log&quot;]<br>  verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;]</pre><p><strong>4. Bind the Group (</strong>ClusterRoleBinding<strong>)<br></strong>Attach the ClusterRole to the Kubernetes group name (group = x) using a ClusterRoleBinding.</p><p>YAML</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: read-logs-binding<br>subjects:<br>- kind: Group<br>  name: x<br>  apiGroup: rbac.authorization.k8s.io<br>roleRef:<br>  kind: ClusterRole<br>  name: pod-log-reader<br>  apiGroup: rbac.authorization.k8s.io</pre><p><strong>5. Execute Restricted Scopes<br></strong>Now, any entity assuming that IAM role is mapped to group = x and can reliably fetch pod logs without being able to modify or delete running workloads.</p><h3>3. Why K8s RBAC Is Super Cost-Effective</h3><p>While security is often viewed as an added operational cost, native K8s RBAC is actually a <strong>massive cost saver</strong> in production:</p><ul><li><strong>Zero Additional Software Cost:</strong> RBAC is built natively into the Kubernetes API server. You do not need expensive third-party identity engines or proprietary access control software to segment your cluster.</li><li><strong>Minimizes Outage Overhead:</strong> Preventing accidental downtime or rogue deployment script failures directly saves hundreds of engineering hours in incident triage, root-cause analysis, and revenue loss.</li><li><strong>Streamlined Audit &amp; Compliance:</strong> Regulatory standards (SOC2, ISO 27001, PCI-DSS) require explicit privilege isolation and audit trails. Declarative RBAC manifests allow you to verify access compliance instantly during security audits, avoiding costly compliance remediation projects.</li></ul><h3>Key Takeaway</h3><blockquote><em>Kubernetes RBAC isn’t just an administrative checklist item — it is the foundation of secure, scalable platform engineering.</em></blockquote><p>By combining IAM authentication with native K8s authorization objects, you establish tight security boundaries without sacrificing developer speed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=829635613c69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda Rollbacks Should Take Seconds, Not Minutes]]></title>
            <link>https://medium.com/@369rnishant/aws-lambda-rollbacks-should-take-seconds-not-minutes-b651acdffa8d?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/b651acdffa8d</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 10:01:03 GMT</pubDate>
            <atom:updated>2026-06-23T10:01:03.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K3XVIQQJf267qVYrx_sSxQ.png" /></figure><h3>Why Your AWS Lambda Rollback Strategy Is Slower Than It Should Be</h3><p>Modern platforms are heavily automated. We automate infrastructure, CI/CD pipelines, testing, and deployments.</p><p>Yet one pattern still appears surprisingly often in serverless environments.</p><p>When a faulty Lambda deployment reaches production and starts returning errors, many teams fall back to a familiar process: checking out the previous release, triggering another CI/CD pipeline, and waiting for the application to recover.</p><p>The approach works, but it is far from ideal. Rollbacks that should take seconds often end up taking several minutes, increasing recovery time and introducing additional deployment risks.</p><p>Fortunately, AWS already provides all the building blocks required for fast and reliable rollbacks. The key lies in understanding how Lambda Versions and Aliases work together.</p><h3>The Problem with Version-Based Rollbacks</h3><p>Every Lambda deployment can publish a new version. A version is an immutable snapshot of your code and configuration.</p><pre>Version 1<br>Version 2<br>Version 3</pre><p>At first glance, this seems sufficient for rollback scenarios. If Version 3 fails, simply go back to Version 2.</p><p>However, versions alone are not enough.</p><p>Integrations such as API Gateway, EventBridge, SQS, and other event sources need a stable entry point. If these integrations are attached directly to the Lambda function, managing production traffic becomes unnecessarily complicated.</p><p>Versions preserve code history, but they are not designed to act as the routing layer.</p><h3>Lambda Versions vs Aliases</h3><p>Think of Lambda versions as immutable releases and aliases as movable pointers.</p><ul><li><strong>Versions</strong> store the actual code.</li><li><strong>Aliases</strong> determine which version receives traffic.</li></ul><p>For example:</p><pre>Version 1<br>Version 2<br>Version 3<br>        ▲<br>        │<br>     Alias: PROD</pre><p>Instead of pointing API Gateway directly to a Lambda function, production traffic should go through an alias.</p><pre>API Gateway<br>      │<br>      ▼<br>Alias: PROD<br>      │<br>      ▼<br>Version 2</pre><p>This separation gives you a stable entry point while allowing the underlying version to change independently.</p><h3>A Rollback Without Rebuilding</h3><p>Assume Version 2 is running in production.</p><pre>API Gateway<br>      │<br>      ▼<br>Alias: PROD<br>      │<br>      ▼<br>Version 2</pre><p>A new deployment publishes Version 3, and the PROD alias is updated.</p><pre>API Gateway<br>      │<br>      ▼<br>Alias: PROD<br>      │<br>      ▼<br>Version 3</pre><p>Soon after deployment, CloudWatch alarms start showing increased errors.</p><p>Instead of rebuilding older code or rerunning the CI/CD pipeline, the only action required is moving the alias back.</p><pre>API Gateway<br>      │<br>      ▼<br>Alias: PROD<br>      │<br>      ▼<br>Version 2</pre><p>Traffic immediately returns to the last known stable version, reducing recovery time from minutes to seconds.</p><h3>Design Principles for Reliable Rollbacks</h3><h3>1. Keep More Than One Version</h3><p>A rollback strategy only works if previous versions still exist.</p><p>Avoid aggressively deleting historical versions during deployments. Maintaining at least two versions gives you something to fall back to when failures occur.</p><h3>2. Use Alias ARNs in Integrations</h3><p>Whenever possible, integrations should reference the alias instead of the function directly.</p><p><strong>Avoid</strong></p><pre>arn:aws:lambda:us-east-1:123456789012:function:my-function</pre><p><strong>Prefer</strong></p><pre>arn:aws:lambda:us-east-1:123456789012:function:my-function:PROD</pre><p>This ensures that traffic always flows through the alias rather than being tied to a specific deployment.</p><h3>3. Automate Rollbacks</h3><p>Manual alias switching is already significantly faster than rebuilding older releases.</p><p>The next level is automation.</p><p>Services such as AWS CodeDeploy, CloudWatch Alarms, and infrastructure tools like Pulumi can automatically shift traffic back to the previous version whenever error thresholds are exceeded.</p><p>This enables self-healing deployments with minimal operational intervention.</p><h3>Final Thoughts</h3><p>Git branches should not be your rollback mechanism.</p><p>By separating deployment artifacts from traffic routing, Lambda Versions and Aliases provide a safer and more resilient deployment model.</p><p>With a stable alias acting as the entry point, recovering from a bad deployment becomes a simple pointer update instead of another release cycle.</p><p>In production systems, faster recovery often matters more than faster deployments.</p><p>And in many cases, moving an alias is all it takes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b651acdffa8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Kubernetes Manages 100 Apps on One Port:A Deep Dive into K8s Networking Isolation]]></title>
            <link>https://medium.com/@369rnishant/how-kubernetes-manages-100-apps-on-one-port-a-deep-dive-into-k8s-networking-isolation-b33de5242f33?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/b33de5242f33</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 03:31:01 GMT</pubDate>
            <atom:updated>2026-04-21T03:31:01.521Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rwiIlR-NxTqnf-msZEqkyQ.png" /></figure><p>In the early stages of a DevOps journey, one of the most puzzling questions is: <strong>“How can multiple applications run on the same port (like 8080 or 3000) within the same cluster without a conflict?”</strong> On a standard Virtual Machine, this would be impossible. In Kubernetes, it is the standard.</p><p>To understand this, we must look past the “Namespace” abstraction and dive into the actual data path — from the URL hit to the Pod’s runtime.</p><h3>1. The Core Concept: Pods as Independent Servers</h3><p>When we define a port like 8080 in our application code, we are assigning that port to a <strong>Pod</strong>. In Kubernetes, a Pod is essentially an isolated mini-server. Thanks to <strong>Linux Network Namespaces</strong>, every Pod has its own dedicated network stack, meaning:</p><ul><li><strong>Unique IP Address</strong></li><li><strong>Dedicated Port Range</strong></li><li><strong>Isolated Routing Table</strong></li></ul><p>Because <strong>Pod A</strong> and <strong>Pod B</strong> have different IP addresses, they can both use port 8080 simultaneously. They are physically isolated “universes.”</p><h3>2. The End-to-End Traffic Flow</h3><p>The diagram below outlines exactly what happens when you hit a URL.</p><p><strong>URL Call → Load Balancer → Ingress → Service → Pod</strong></p><h4>Step 1: The External Entry (Load Balancer)</h4><p>When you hit orders.example.com, the request first reaches the <strong>Cloud Load Balancer</strong> (e.g., AWS ALB). At this stage, the traffic is just directed toward the cluster’s entry point.</p><h4>Step 2: The Logic Engine (Ingress)</h4><p>The Load Balancer searches the rules defined in the <strong>Ingress Controller</strong>. The Ingress acts as a “Traffic Police.” It looks at the <strong>Host Header</strong> (orders.example.com) and determines which internal Service should handle the request.</p><p><strong>Example Ingress Manifest:</strong></p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: app-ingress<br>  namespace: production<br>spec:<br>  rules:<br>  - host: orders.example.com  # The Rule: Identify by URL<br>    http:<br>      paths:<br>      - path: /<br>        pathType: Prefix<br>        backend:<br>          service:<br>            name: orders-service # Directed to this Service<br>            port:<br>              number: 80         # Service&#39;s listening port</pre><h4>Step 3: The Internal Router (Service)</h4><p>The Ingress takes the request to the <strong>Service</strong>. The Service is a stable abstraction that knows exactly which Pods are currently running for that application. It uses <strong>Selectors</strong> to find the correct Pods.</p><p><strong>Example Service Manifest:</strong></p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: orders-service<br>spec:<br>  selector:<br>    app: orders-app    # Finds Pods with this specific label<br>  ports:<br>    - protocol: TCP<br>      port: 80         # The port exposed to the Ingress<br>      targetPort: 8080 # The &quot;Real&quot; port where the App is listening</pre><h4>Step 4: The Final Destination (Pod)</h4><p>The Service takes the request to the <strong>correct port of the Pod</strong>. Even if ten other apps in the cluster are using port 8080, the Service only routes traffic to the specific IP of the Pods matching its selector.</p><h3>3. Summary of Key Components</h3><pre>+-----------+---------------------------+------------------------------------------------------------+<br>| Component |      Responsibility       |                    Port Conflict Logic                     |<br>+-----------+---------------------------+------------------------------------------------------------+<br>| Ingress   | Evaluates URL/Host rules  | Differentiates traffic at Layer 7 (HTTP) via Host Headers. |<br>| Service   | Maps traffic to Pods      | A virtual bridge connecting a port to a specific targetPort|<br>| Pod       | Runs the application      | Isolated by Network Namespace &amp; Unique IP; No collision.   |<br>+-----------+---------------------------+------------------------------------------------------------+<br></pre><h3>Conclusion</h3><p>The reason we don’t face port conflicts is that the <strong>URL determines the Service, and the Service determines the Pod IP.</strong> By the time the traffic reaches port 8080, it has already been filtered through layers of routing rules that ensure it lands in the correct container.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b33de5242f33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Wasting Money on AWS Lambda: How This One Layer Slashed My Bill]]></title>
            <link>https://medium.com/@369rnishant/stop-wasting-money-on-aws-lambda-how-this-one-layer-slashed-my-bill-bc3913fe7e67?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc3913fe7e67</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[finops]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 13:46:01 GMT</pubDate>
            <atom:updated>2026-04-16T13:46:01.381Z</atom:updated>
            <content:encoded><![CDATA[<p>When building serverless applications, managing configuration and secrets securely is a top priority. While AWS Systems Manager (SSM) Parameter Store is the go-to service for this, how you access those parameters can significantly impact your application’s <strong>performance</strong> and <strong>cloud bill</strong>.</p><p>In this article, we’ll explore why using the <strong>AWS Parameters and Secrets Lambda Extension (Layer)</strong> is superior to standard SDK calls, compare the costs, and show you how to implement it in Python and Go.</p><h3>1. The Core Benefits of Using the Lambda Extension Layer</h3><p>Most developers start by using the standard AWS SDK (like Boto3 for Python) to fetch parameters. However, moving to the managed Lambda Extension Layer offers three major advantages:</p><ul><li><strong>Automatic Caching:</strong> The layer creates a local cache within the Lambda execution environment. Instead of hitting the SSM API on every request, the Lambda fetches the value from local memory.</li><li><strong>Reduced Latency:</strong> API calls to SSM over the network take time (typically 50ms–150ms). A cache hit from the layer takes less than 1ms, making your Lambda much faster.</li><li><strong>Built-in TTL Management:</strong> You can configure a <strong>Time-to-Live (TTL)</strong> for your parameters. The layer handles refreshing the data in the background, so your code stays clean and focused on business logic.</li></ul><h3>2. Cost Comparison: API Hits vs. Layer Caching</h3><p>For high-traffic applications, the cost difference is substantial.</p><pre>| Metric         | Standard SDK (API)              | Lambda Extension (Layer)       |<br>|----------------|---------------------------------|--------------------------------|<br>| Direct Cost    | $0.05 per 10,000 transactions   | $0 (Cache hits are free)       |<br>| Execution Cost | Higher (Wait for API response)  | Lower (Local cache speed)      |<br>| Throttling Risk| High (SSM Throughput limits)    | Low (Requests stay local)      |</pre><p><strong>The Bottom Line:</strong> If your function triggers 1 million times a month, using the SDK could cost you <strong>$5.00</strong> in API fees alone, plus the extra Lambda duration costs. With the Layer, you pay almost nothing for those same lookups.</p><h3>3. How to Integrate the Layer</h3><h3>Step 1: Attach the Layer</h3><ol><li>Navigate to your <strong>AWS Lambda Function</strong> in the console.</li><li>Scroll to the <strong>Layers</strong> section and click <strong>Add a layer</strong>.</li><li>Select <strong>AWS layers</strong>.</li><li>Choose <strong>AWS-Parameters-and-Secrets-Lambda-Extension</strong>.</li><li>Pick the latest version and click <strong>Add</strong>.</li></ol><h3>Step 2: Set Permissions</h3><p>Ensure your Lambda Execution Role has the ssm:GetParameter permission for the specific parameter path you are accessing.</p><h3>4. Code Implementation</h3><p>The extension runs a local HTTP server on <strong>port 2773</strong>. To get a parameter, your code simply makes a GET request to localhost.</p><h3>Python Implementation</h3><p>This is the standard approach for Python developers looking for maximum efficiency.</p><p>Python</p><pre>import urllib.request<br>import os<br>def lambda_handler(event, context):<br>    # The extension requires the AWS_SESSION_TOKEN for authentication<br>    ssm_token = os.environ.get(&#39;AWS_SESSION_TOKEN&#39;)<br>    param_name = &quot;prod_db_url&quot;<br>    <br>    # Local URL for the extension cache<br>    url = f&quot;http://localhost:2773/systemsmanager/parameters/get?name={param_name}&quot;<br>    <br>    req = urllib.request.Request(url)<br>    req.add_header(&#39;X-Aws-Parameters-Secrets-Token&#39;, ssm_token)<br>    <br>    try:<br>        with urllib.request.urlopen(req) as response:<br>            res = response.read().decode(&#39;utf-8&#39;)<br>            # The result is a JSON string containing the parameter value<br>            return res<br>    except Exception as e:<br>        print(f&quot;Error fetching parameter: {e}&quot;)</pre><h3>Go Implementation</h3><p>Go is widely used by high-performance teams for its low footprint. Here is how you can fetch parameters using the extension:</p><p>Go</p><pre>package main<br>import (<br>	&quot;io/ioutil&quot;<br>	&quot;net/http&quot;<br>	&quot;os&quot;<br>)<br>func GetParameter(paramName string) (string, error) {<br>	client := &amp;http.Client{}<br>	url := &quot;http://localhost:2773/systemsmanager/parameters/get?name=&quot; + paramName<br>	<br>	req, _ := http.NewRequest(&quot;GET&quot;, url, nil)<br>	// Header is mandatory to communicate with the extension<br>	req.Header.Set(&quot;X-Aws-Parameters-Secrets-Token&quot;, os.Getenv(&quot;AWS_SESSION_TOKEN&quot;))<br>        resp, err := client.Do(req)<br>	if err != nil {<br>		return &quot;&quot;, err<br>	}<br>	defer resp.Body.Close()<br>        body, _ := ioutil.ReadAll(resp.Body)<br>	return string(body), nil<br>}</pre><h3>5. Summary</h3><p>Using the AWS Parameters and Secrets Lambda Extension is a professional standard for production environments. It <strong>decouples</strong> your configuration from your code, <strong>slashes your latency</strong>, and <strong>eliminates unnecessary API costs</strong>. By moving from SDK calls to local HTTP requests, you ensure your serverless architecture is both scalable and cost-efficient.</p><h3>Official Documentation</h3><p>For deeper technical details and advanced configuration (like custom TTL settings), visit the official AWS guide:</p><p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html">AWS Lambda Extension for Parameters and Secrets</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc3913fe7e67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pulumi: A Modern Way to Talk to Your Cloud]]></title>
            <link>https://medium.com/@369rnishant/pulumi-a-modern-way-to-talk-to-your-cloud-180de5241791?source=rss-8542e7b85494------2</link>
            <guid isPermaLink="false">https://medium.com/p/180de5241791</guid>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[pulumi]]></category>
            <dc:creator><![CDATA[Nishant Raj]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 23:27:08 GMT</pubDate>
            <atom:updated>2026-03-22T15:10:09.156Z</atom:updated>
            <content:encoded><![CDATA[<p>​Are you tired of working with Terraform and struggling with its HCL syntax?</p><p>Learning an “ancient classic” language just to spin up infrastructure can feel incredibly limiting — especially when you already know how to code.<br>​If you’re looking for a more developer-friendly approach, let me introduce you to Pulumi.</p><h3><strong>​What is Pulumi?</strong></h3><p><strong>​Pulumi is an Infrastructure as Code (IaC)</strong> tool that allows you to define and manage cloud resources using real programming languages like <strong>Python, TypeScript, and Go</strong>. It brings a modern approach to infrastructure by making it intuitive and aligned with how developers actually work.</p><p>​If this sounds good, let’s talk about the real strength it delivers in a <strong>multi-team setup</strong> with <strong>hundreds of resources</strong>.</p><h3><strong>​Bridging the Gap</strong></h3><p>​With Pulumi, the long-standing <strong>gap between development and cloud teams becomes much easier to bridge.</strong> It enables a more consistent, secure, and maintainable way of creating and managing infrastructure.</p><p><strong>​Automation:</strong> By automating workflows using reusable templates, managing and tagging resources becomes much simpler.<br><strong>​Control:</strong> This gives cloud teams better control during failures and significantly improves disaster recovery capabilities.</p><h3><strong>​Is Pulumi Free?</strong></h3><p>​Yes! Pulumi offers a generous free tier for individuals and small projects through its<strong> Community Edition.</strong></p><p>​While they provide paid enterprise plans for larger teams requiring advanced security and compliance, remember: <strong>If you have your own cloud, the tool itself is free to use!</strong></p><h3><strong>​What Makes Pulumi Different from Terraform?</strong></h3><p>​While Terraform is powerful, Pulumi brings some unique advantages that go beyond just “the code”:</p><p><strong>​Real Programming Languages</strong>: Use Python or TypeScript instead of learning a proprietary syntax like HCL.</p><p><strong>​True Integration:</strong> Use existing testing tools such as Jest or PyTest directly with your infrastructure code.</p><p><strong>​Native Secrets Management:</strong> Pulumi provides built-in support for managing secrets securely right out of the box.</p><p><strong>​Simplicity:</strong> It’s much easier to visualize the flow thanks to its intuitive code structure.</p><h3><strong>​The Reality Check: Pulumi Drawbacks</strong></h3><p>​No tool is perfect, and Pulumi is no exception.</p><p><strong>​Responsibility:</strong> Since Pulumi gives you the full power of a programming language, maintaining clean code is your responsibility. Without discipline, it can get messy fast.</p><p><strong>​Community Size:</strong> Compared to Terraform, Pulumi has a smaller community and fewer pre-built examples (though it is growing rapidly).</p><p><strong>​Cloud Knowledge is Mandatory:</strong> You still need the same deep understanding of cloud setups (VPC, Security Groups, Stack Management) as you do with Terraform.</p><p>​<strong>Warning: One wrong move and your whole production setup can be corrupted or erased in a minute. Power comes with a price!<br>​Final Thoughts</strong></p><p>​Pulumi is not just a tool; it’s a shift towards treating infrastructure like real software. If you enjoy coding and want more flexibility and control, Pulumi is definitely worth exploring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=180de5241791" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>