<?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 Shrinivasa A L on Medium]]></title>
        <description><![CDATA[Stories by Shrinivasa A L on Medium]]></description>
        <link>https://medium.com/@shrini-devsecops?source=rss-b11230d19d31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Wkr8WYmSEMDcG9PybxFgbQ.jpeg</url>
            <title>Stories by Shrinivasa A L on Medium</title>
            <link>https://medium.com/@shrini-devsecops?source=rss-b11230d19d31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:37:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shrini-devsecops/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[Naukri.com Just Went Down for 45 Minutes to Deploy an Update — Here’s How Canary Deployments Would…]]></title>
            <link>https://medium.com/@shrini-devsecops/naukri-com-just-went-down-for-45-minutes-to-deploy-an-update-heres-how-canary-deployments-would-1c344743b417?source=rss-b11230d19d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c344743b417</guid>
            <category><![CDATA[canary-deployments]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[zero-downtime]]></category>
            <category><![CDATA[argo-rollouts]]></category>
            <dc:creator><![CDATA[Shrinivasa A L]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 13:56:30 GMT</pubDate>
            <atom:updated>2026-06-28T13:56:30.399Z</atom:updated>
            <content:encoded><![CDATA[<h3>Naukri.com Just Went Down for 45 Minutes to Deploy an Update — Here’s How Canary Deployments Would Have Prevented It</h3><p><em>A hands-on guide to zero-downtime deployments with Argo Rollouts on Kubernetes</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mp1fdmeA0JGQEE8ZI19cIQ.png" /><figcaption>Naukri.com — India’s №1 job site — showing a maintenance page during a system upgrade, June 2026</figcaption></figure><p>Today, while updating my profile on Naukri.com — India’s №1 job site — I was greeted by a “We’ll be back soon” page. The site was completely unavailable for over 45 minutes due to a system upgrade.</p><p>Millions of job seekers couldn’t search for jobs. Recruiters couldn’t search for candidates. A platform that thousands of people depend on every hour of every working day was simply gone — because someone needed to deploy a software update.</p><p>In 2026, this shouldn’t happen.</p><p>Zero-downtime deployments are not a luxury reserved for Google and Netflix. They are achievable by any team running Kubernetes — using tools that are free, open source, and battle-tested in production. One of those tools is <strong>Argo Rollouts</strong>, and the deployment strategy is called <strong>Canary Deployment</strong>.</p><p>I’ve implemented this exact pattern on production EKS clusters at ResolveTech, running 15+ microservices with zero-downtime releases. In this article, I’ll show you exactly how it works — and how Naukri’s deployment today could have gone very differently.</p><h3>The Real Cost of Downtime</h3><p>Before we get technical, let’s talk about what happened today in business terms.</p><p>Naukri.com has approximately <strong>10 million active users</strong>. 45 minutes of complete downtime during peak business hours means:</p><ul><li>Millions of job searches blocked mid-session</li><li>Recruiters unable to access candidate pipelines</li><li>Job applications that couldn’t be submitted</li><li>Notifications and emails going unanswered</li><li>Lost revenue from premium subscriptions and recruiter plans</li><li>Damage to user trust — especially painful for a platform whose entire value is being reliably available when someone needs a job</li></ul><p>And the worst part? <strong>All of this was preventable.</strong> Not through more servers or more budget — but through a smarter deployment strategy.</p><h3>Why Teams Still Do Big-Bang Deployments</h3><p>If zero-downtime deployment is achievable, why do large platforms still take their entire site offline to deploy updates?</p><p>The honest answers:</p><p><strong>Legacy deployment pipelines</strong> — Many large platforms were built before Kubernetes was mainstream. Their deployment process was designed around “stop the world, update, restart” — and that pattern is still in place years later.</p><p><strong>Fear of complexity</strong> — “Canary sounds complicated” is something I hear often. It sounds like a pattern for hyperscalers, not regular engineering teams.</p><p><strong>No traffic management layer</strong> — Without a service mesh or traffic controller, you can’t split traffic between old and new versions. You have to go all-or-nothing.</p><p><strong>The 2am maintenance window mentality</strong> — “We’ll do it when traffic is low.” But traffic is never zero, and low-traffic deployments still cause downtime for the users who are there.</p><p><strong>No automated rollback</strong> — If something goes wrong mid-deployment, teams need time to manually roll back. Taking the whole site down “just in case” feels safer.</p><p>The good news: every one of these problems is solved by Canary deployments with Argo Rollouts on Kubernetes.</p><h3>What is a Canary Deployment?</h3><p>A Canary deployment progressively shifts traffic from the old version to the new version — while monitoring error rates and latency in real time. If metrics look healthy, the rollout continues automatically. If something goes wrong, it rolls back automatically. At no point is the entire platform unavailable.</p><p>The name comes from the old mining practice of using canaries to detect toxic gas — a small signal that warns you before the danger becomes catastrophic. In software, a small percentage of users on the new version is your canary.</p><p>Here’s the contrast:</p><pre>❌ Traditional (Big-Bang) Deployment:</pre><pre>ALL users → v1 (100%)<br>    ↓ take site down<br>    ↓ deploy v2<br>    ↓ restart everything<br>ALL users → v2 (100%)</pre><pre>Result: Minutes to hours of downtime.<br>        If v2 has a bug — all users are affected.</pre><pre>✅ Canary Deployment:</pre><pre>ALL users → v1 (100%)<br>    ↓ deploy v2 alongside v1<br>10% users → v2  |  90% users → v1    ← watch metrics<br>    ↓ error rate looks good<br>30% users → v2  |  70% users → v1    ← still watching<br>    ↓ latency normal, no errors<br>50% users → v2  |  50% users → v1<br>    ↓ all metrics healthy<br>100% users → v2  ← v1 scaled down</pre><pre>Result: Zero downtime.<br>        If v2 has a bug — only 10% of users see it,<br>        and automated rollback fires before it gets worse.</pre><h3>The Stack We’ll Use</h3><ul><li><strong>Kubernetes</strong> (Amazon EKS) — container orchestration</li><li><strong>Argo Rollouts</strong> — progressive delivery controller</li><li><strong>Istio</strong> — service mesh for traffic splitting (optional but powerful)</li><li><strong>Prometheus</strong> — metrics collection for automated analysis</li><li><strong>Grafana</strong> — visualising the rollout in real time</li></ul><p>I use this exact stack in production. Everything here is open source and free.</p><h3>Step 1 — Install Argo Rollouts</h3><pre># Create namespace<br>kubectl create namespace argo-rollouts</pre><pre># Install Argo Rollouts controller<br>kubectl apply -n argo-rollouts \<br>  -f <a href="https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml">https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml</a></pre><pre># Install kubectl plugin for rollouts<br>curl -LO <a href="https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64">https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64</a><br>chmod +x kubectl-argo-rollouts-linux-amd64<br>sudo mv kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts</pre><pre># Verify installation<br>kubectl argo rollouts version</pre><h3>Step 2 — Define the Rollout Resource</h3><p>Argo Rollouts replaces your standard Kubernetes Deployment with a Rollout resource. Here&#39;s a production-ready canary rollout configuration:</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: Rollout<br>metadata:<br>  name: web-app<br>  namespace: production<br>spec:<br>  replicas: 10<br>  revisionHistoryLimit: 3<br>  selector:<br>    matchLabels:<br>      app: web-app<br>  template:<br>    metadata:<br>      labels:<br>        app: web-app<br>    spec:<br>      containers:<br>      - name: web<br>        image: myregistry/web-app:v2.1.0   # ← update this to trigger rollout<br>        ports:<br>        - containerPort: 8080<br>        resources:<br>          requests:<br>            memory: &quot;256Mi&quot;<br>            cpu: &quot;250m&quot;<br>          limits:<br>            memory: &quot;512Mi&quot;<br>            cpu: &quot;500m&quot;<br>        readinessProbe:<br>          httpGet:<br>            path: /health<br>            port: 8080<br>          initialDelaySeconds: 10<br>          periodSeconds: 5<br>  strategy:<br>    canary:<br>      # Traffic weights — step through progressively<br>      steps:<br>      - setWeight: 10          # Step 1: 10% traffic to new version<br>      - pause: {duration: 5m}  # Wait 5 minutes, watch metrics<br>      - setWeight: 30          # Step 2: 30% traffic to new version<br>      - pause: {duration: 5m}  # Wait 5 minutes<br>      - setWeight: 50          # Step 3: 50% traffic to new version<br>      - pause: {duration: 10m} # Wait 10 minutes at halfway point<br>      - setWeight: 80          # Step 4: 80% traffic to new version<br>      - pause: {duration: 5m}  # Final check<br>      # Step 5: 100% automatic — old version scaled down</pre><pre>      # Metadata labels for Prometheus to distinguish canary vs stable<br>      canaryMetadata:<br>        labels:<br>          deployment: canary<br>      stableMetadata:<br>        labels:<br>          deployment: stable</pre><pre>      # Automated analysis — rolls back if error rate spikes<br>      analysis:<br>        templates:<br>        - templateName: error-rate-check<br>        startingStep: 2   # Start analysis from step 2 onwards</pre><h3>Step 3 — Define the Service</h3><p>You need two Services — one for stable traffic, one for canary. Argo Rollouts manages the weight split automatically.</p><pre># Stable service — points to current production pods<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: web-app-stable<br>  namespace: production<br>spec:<br>  selector:<br>    app: web-app<br>  ports:<br>  - port: 80<br>    targetPort: 8080<br>---<br># Canary service — points to new version pods only<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: web-app-canary<br>  namespace: production<br>spec:<br>  selector:<br>    app: web-app<br>  ports:<br>  - port: 80<br>    targetPort: 8080</pre><h3>Step 4 — Automated Rollback with AnalysisTemplate</h3><p>This is the part that makes Canary deployment genuinely safe — <strong>automated analysis</strong>. If the new version’s error rate exceeds your threshold, Argo Rollouts rolls back automatically. No human intervention required at 3am.</p><pre>apiVersion: argoproj.io/v1alpha1<br>kind: AnalysisTemplate<br>metadata:<br>  name: error-rate-check<br>  namespace: production<br>spec:<br>  metrics:<br>  - name: error-rate<br>    interval: 1m               # Check every 1 minute<br>    successCondition: result[0] &lt; 0.05   # Pass if error rate &lt; 5%<br>    failureLimit: 3            # Allow 3 consecutive failures before rollback<br>    provider:<br>      prometheus:<br>        address: http://prometheus-server.monitoring:9090<br>        query: |<br>          sum(rate(http_requests_total{<br>            status=~&quot;5..&quot;,<br>            app=&quot;web-app&quot;,<br>            deployment=&quot;canary&quot;<br>          }[2m]))<br>          /<br>          sum(rate(http_requests_total{<br>            app=&quot;web-app&quot;,<br>            deployment=&quot;canary&quot;<br>          }[2m]))</pre><pre>  - name: latency-p99<br>    interval: 2m<br>    successCondition: result[0] &lt; 0.5   # Pass if p99 latency &lt; 500ms<br>    failureLimit: 2<br>    provider:<br>      prometheus:<br>        address: <a href="http://prometheus-server.monitoring:9090/">http://prometheus-server.monitoring:9090</a><br>        query: |<br>          histogram_quantile(0.99,<br>            sum(rate(http_request_duration_seconds_bucket{<br>              app=&quot;web-app&quot;,<br>              deployment=&quot;canary&quot;<br>            }[2m])) by (le)<br>          )</pre><p>What this does:</p><ul><li>Every <strong>1 minute</strong>, queries Prometheus for the canary pods’ error rate</li><li>If error rate exceeds <strong>5%</strong> for 3 consecutive checks → <strong>automatic rollback to stable version</strong></li><li>Simultaneously monitors <strong>p99 latency</strong> — rolls back if responses slow down</li><li>All of this happens without anyone touching a keyboard</li></ul><h3>Step 5 — Trigger a Rollout</h3><p>To deploy a new version, simply update the image tag in your Rollout manifest:</p><pre># Update image to trigger canary rollout<br>kubectl argo rollouts set image web-app \<br>  web=myregistry/web-app:v2.1.0 \<br>  -n production</pre><pre># Watch the rollout progress in real time<br>kubectl argo rollouts get rollout web-app \<br>  -n production --watch</pre><p><strong>What you’ll see:</strong></p><pre>Name:            web-app<br>Namespace:       production<br>Status:          ॐ Progressing<br>Message:         more replicas need to be updated<br>Strategy:        Canary<br>  Step:          1/8<br>  SetWeight:     10<br>  ActualWeight:  10</pre><pre>REVISION  STATUS     STABLE  CANARY  WEIGHT  INFO<br>2         ॐ Running  ✔       ✔       10      canary<br>1         ✔ Healthy  ✔                       stable</pre><p>After 5 minutes with healthy metrics:</p><pre>Name:            web-app<br>Namespace:       production<br>Status:          ॐ Progressing<br>Strategy:        Canary<br>  Step:          3/8<br>  SetWeight:     30<br>  ActualWeight:  30</pre><pre>REVISION  STATUS     STABLE  CANARY  WEIGHT<br>2         ॐ Running  ✔       ✔       30<br>1         ✔ Healthy  ✔</pre><p>After all steps complete successfully:</p><pre>Name:            web-app<br>Namespace:       production<br>Status:          ✔ Healthy<br>Strategy:        Canary<br>  Step:          8/8<br>  SetWeight:     100<br>  ActualWeight:  100</pre><pre>REVISION  STATUS     STABLE  CANARY  WEIGHT<br>2         ✔ Healthy  ✔               100<br>1         • ScaledDown</pre><p><strong>New version deployed. Zero downtime. Zero manual steps.</strong></p><h3>Step 6 — What Automatic Rollback Looks Like</h3><p>If your new version has a bug — Argo Rollouts catches it and rolls back before most users are affected:</p><pre># Simulate a bad deployment — watch what happens<br>kubectl argo rollouts get rollout web-app -n production --watch</pre><pre>Name:            web-app<br>Status:          ✖ Degraded<br>Message:         RolloutAborted: Rollout aborted update to revision 2:<br>                 Metric &quot;error-rate&quot; assessed Failed at least 3 times</pre><pre>Strategy:        Canary<br>  Step:          2/8           ← stopped at step 2 (30% weight)<br>  SetWeight:     0             ← traffic shifted back to 0% canary<br>  ActualWeight:  0</pre><pre>REVISION  STATUS    STABLE  CANARY  WEIGHT<br>2         ✖ Failed          ✔       0      ← canary rolled back<br>1         ✔ Healthy  ✔              100    ← stable serving 100%</pre><p>Only <strong>30% of users</strong> ever saw the broken version. The rollback was fully automated. The on-call engineer woke up to a Slack alert and a system that had already healed itself.</p><h3>What Naukri’s Deployment Would Have Looked Like With Canary</h3><p>Let’s replay today’s events with Canary deployment:</p><pre>10:00 AM — Engineering team triggers deployment of new version<br>           10% of Naukri users routed to new version<br>           90% still on stable version — completely unaffected</pre><pre>10:05 AM — Prometheus: error rate 0.3% on canary. Healthy ✅<br>           Argo Rollouts auto-promotes to 30%</pre><pre>10:10 AM — Prometheus: p99 latency 180ms on canary. Healthy ✅<br>           Argo Rollouts auto-promotes to 50%</pre><pre>10:20 AM — Both versions running at 50/50. All metrics green ✅<br>           Argo Rollouts auto-promotes to 80%</pre><pre>10:30 AM — 100% traffic on new version<br>           Old version scaled down</pre><pre>10:30 AM — Deployment complete ✅</pre><p><strong>Total deployment time: 30 minutes. Downtime: 0 seconds. Users affected by any issues: 0.</strong></p><p>Compare that to what actually happened today — 45+ minutes of complete unavailability for every single user.</p><h3>Troubleshooting — Real Issues I Hit in Production</h3><p>No tutorial is complete without the things that actually go wrong. Here are three issues I encountered implementing this at ResolveTech on EKS:</p><h3>Issue 1 — AnalysisRun fires before canary pods are ready</h3><p><strong>Symptom:</strong> Rollout immediately degrades at step 2 even though there’s no real error.</p><p><strong>Cause:</strong> The startingStep was set to 1, so analysis fires before the canary pods have finished warming up. Prometheus returns no data, which counts as a failure.</p><p><strong>Fix:</strong></p><pre>analysis:<br>  templates:<br>  - templateName: error-rate-check<br>  startingStep: 2   # Start analysis from step 2, not step 1<br>  args:<br>  - name: service-name<br>    value: web-app</pre><p>Also add initialDelay to give pods time to receive traffic:</p><pre>metrics:<br>- name: error-rate<br>  initialDelay: 2m   # Wait 2 minutes before first check<br>  interval: 1m</pre><h3>Issue 2 — Traffic weight not splitting correctly without Istio</h3><p><strong>Symptom:</strong> Even with 10% weight set, Kubernetes sends traffic roughly 50/50 because pods are split evenly between old and new ReplicaSets.</p><p><strong>Cause:</strong> Native Kubernetes Services load-balance by pod count, not by traffic weight. 1 canary pod + 9 stable pods = 10% traffic naturally — but only if replica counts match the weight. Without a service mesh, weight-based splitting doesn’t work precisely.</p><p><strong>Fix:</strong> Either use Istio (recommended for production) or let Argo Rollouts manage replica counts to approximate the weight:</p><pre>strategy:<br>  canary:<br>    # Without Istio — weight approximated by pod count<br>    maxSurge: &quot;20%&quot;<br>    maxUnavailable: 0</pre><p>With Istio, you get exact traffic percentages regardless of replica count.</p><h3>Issue 3 — Prometheus query returns NaN during low-traffic periods</h3><p><strong>Symptom:</strong> Rollback fires at off-peak hours even when the canary is healthy.</p><p><strong>Cause:</strong> When request rate is very low, the Prometheus rate query returns NaN (no data), which fails the success condition.</p><p><strong>Fix:</strong> Add a guard clause to the query:</p><pre>query: |<br>  (<br>    sum(rate(http_requests_total{status=~&quot;5..&quot;,app=&quot;web-app&quot;,deployment=&quot;canary&quot;}[2m]))<br>    /<br>    sum(rate(http_requests_total{app=&quot;web-app&quot;,deployment=&quot;canary&quot;}[2m]))<br>  ) or on() vector(0)</pre><p>The or on() vector(0) returns 0 (healthy) when there&#39;s no data — preventing false rollbacks during quiet periods.</p><h3>Canary vs Blue-Green — Which Should You Use?</h3><p>Both achieve zero downtime. The choice depends on your use case:</p><p>Scenario Use Canary Use Blue-Green User-facing feature rollout ✅ — Validate with real traffic first ✅ — Database schema changes — ✅ Breaking API changes — ✅ High-risk releases needing instant rollback — ✅ Cost-sensitive (can’t double infrastructure) ✅ — Need to test with real production load ✅ —</p><p>For a platform like Naukri — serving search results, job listings, and user profiles — Canary is the right choice. Each component can be rolled out progressively, validated with real user traffic, and rolled back independently if needed.</p><h3>Monitoring the Rollout in Grafana</h3><p>While your rollout is progressing, you want real-time visibility. Here’s what to watch in Grafana:</p><p><strong>Key dashboards to have:</strong></p><ul><li>HTTP error rate: canary vs stable (side by side)</li><li>p50/p95/p99 latency: canary vs stable</li><li>Request rate: canary traffic weight vs target weight</li><li>Pod restart count: canary pods</li></ul><p>If you see canary error rate climbing while stable stays flat — your new version has a bug. Argo Rollouts will catch it automatically, but the Grafana dashboard tells you exactly what’s wrong before you even open the alert.</p><h3>The Bottom Line</h3><p>The “We’ll be back soon” page is a choice — not a necessity.</p><p>Every major platform upgrade, every database migration, every feature release can be done without taking your site offline. The tools exist, they’re free, and they’re production-proven. Argo Rollouts, Kubernetes, and Prometheus are running at companies of every size — from 10-person startups to Fortune 500 enterprises.</p><p>What Naukri experienced today — and what thousands of other platforms experience every time they deploy — is a solvable problem. The solution isn’t more servers or bigger maintenance windows. It’s progressive delivery: ship small, validate with real traffic, roll back automatically when things go wrong.</p><p>Your users don’t need to see a maintenance page. <strong>Ship it with a canary.</strong></p><h3>What’s Next</h3><p>This article is part of a series on building production-grade DevSecOps platforms on Kubernetes:</p><ul><li><strong>Part 1:</strong> <a href="https://medium.com/@shrini-devsecops/building-an-end-to-end-devsecops-gitops-pipeline-with-gitlab-argo-cd-argo-rollouts-and-aws-eks-8d6fa32f6173">Building an End-to-End DevSecOps GitOps Pipeline with GitLab, Argo CD, Argo Rollouts and AWS EKS</a></li><li><strong>Part 2:</strong> Zero Trust on Kubernetes — mTLS with Istio, IRSA, and HashiCorp Vault <em>(coming soon)</em></li><li><strong>Part 3:</strong> This article — Zero Downtime Deployments with Argo Rollouts</li></ul><p>The full code for this Canary deployment setup is available in my GitHub repo: 👉 <a href="https://github.com/shrini-devsecops">github.com/shrini-devsecops</a></p><p><em>If you found this useful, follow me for more practical DevSecOps and Kubernetes content.</em></p><p><em>Have you implemented Canary deployments in production? What was your biggest challenge? Drop a comment below — I’d love to hear about it.</em></p><p><strong>Tags:</strong> Kubernetes · DevOps · Canary Deployment · Argo Rollouts · Zero Downtime</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c344743b417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an End-to-End DevSecOps GitOps Pipeline with GitLab, Argo CD, Argo Rollouts and AWS EKS]]></title>
            <link>https://medium.com/@shrini-devsecops/building-an-end-to-end-devsecops-gitops-pipeline-with-gitlab-argo-cd-argo-rollouts-and-aws-eks-8d6fa32f6173?source=rss-b11230d19d31------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d6fa32f6173</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gitops-with-argocd]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[gitlab-cicd]]></category>
            <dc:creator><![CDATA[Shrinivasa A L]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 05:54:57 GMT</pubDate>
            <atom:updated>2026-06-06T05:54:57.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*Qpx8-Fg13ICvVl1nwkeDow.png" /></figure><h3>Introduction</h3><p>Modern software delivery requires more than just CI/CD. Organizations are increasingly adopting DevSecOps and GitOps practices to improve deployment reliability, security, and operational efficiency.</p><p>In this article, I demonstrate how I built an end-to-end DevSecOps platform using GitLab CI/CD, SonarQube, Gitleaks, Trivy, Checkov, Argo CD, Argo Rollouts, and Amazon EKS.</p><p>The objective was to create a secure, automated, and production-ready deployment pipeline capable of supporting GitOps workflows and Blue-Green deployments.</p><h3>Solution Architecture</h3><p>Developer Commit<br>↓<br>GitLab Repository<br>↓<br>GitLab CI/CD Pipeline<br>↓<br>Gitleaks → SonarQube → Checkov → Trivy<br>↓<br>Docker Build &amp; Push to Amazon ECR<br>↓<br>GitOps Manifest Update<br>↓<br>Argo CD<br>↓<br>Argo Rollouts<br>↓<br>Blue-Green Deployment<br>↓<br>Amazon EKS</p><h3>Technology Stack</h3><ul><li>GitLab Community Edition</li><li>Docker</li><li>Amazon ECR</li><li>Amazon EKS</li><li>Kubernetes</li><li>Argo CD</li><li>Argo Rollouts</li><li>SonarQube</li><li>Gitleaks</li><li>Checkov</li><li>Trivy</li><li>Terraform</li></ul><h3>CI/CD Pipeline Execution</h3><p>The GitLab CI/CD pipeline was configured with multiple stages to enforce security and deployment automation.</p><h3>Pipeline Stages</h3><ol><li><strong>Gitleaks</strong></li></ol><ul><li>Detects hardcoded secrets and credentials.</li></ul><p><strong>2. SonarQube</strong></p><ul><li>Performs static code analysis and security scanning.</li></ul><p><strong>3. Checkov</strong></p><ul><li>Scans Terraform and Kubernetes manifests for security misconfigurations.</li></ul><p><strong>4. Trivy</strong></p><ul><li>Performs container vulnerability scanning.</li></ul><p><strong>5. Docker Build</strong></p><ul><li>Builds the application container image.</li></ul><p><strong>6. GitOps Manifest Update</strong></p><ul><li>Automatically updates the Kubernetes deployment manifest with the newly generated image tag.</li></ul><h3>Pipeline Execution</h3><p>The screenshot below demonstrates the successful execution of the GitLab pipeline, including security scanning, image build, and GitOps manifest update stages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iF126giHCGz-_B9v3_tmCA.png" /></figure><p>Figure 1: GitLab CI/CD pipeline execution showing security scanning, Docker image build, and automated GitOps manifest update stages.</p><h3>Observations</h3><ul><li>Security scanning is integrated directly into the CI/CD workflow.</li><li>Docker image build is automated.</li><li>GitOps manifests are updated automatically after image creation.</li><li>Argo CD detects the manifest change and synchronizes the deployment to Amazon EKS.</li><li>Security findings are visible immediately within the pipeline execution results.</li></ul><p>This approach ensures that security validation occurs before application deployment while maintaining a fully automated GitOps workflow.</p><h3>Implementing Shift-Left Security</h3><p>Security validation was integrated directly into the CI/CD pipeline.</p><h3>Gitleaks</h3><p>Used to detect:</p><ul><li>Hardcoded AWS credentials</li><li>API tokens</li><li>Passwords</li><li>Secrets</li></ul><h3>SonarQube</h3><p>Used for:</p><ul><li>Static Application Security Testing (SAST)</li><li>Code quality analysis</li><li>Security hotspot detection</li></ul><h3>Checkov</h3><p>Used to scan:</p><ul><li>Terraform configurations</li><li>Kubernetes manifests</li><li>Infrastructure security policies</li></ul><h3>Trivy</h3><p>Used to identify:</p><ul><li>Container vulnerabilities</li><li>Operating system package vulnerabilities</li><li>Dependency vulnerabilities</li></ul><h3>GitOps with Argo CD</h3><p>Instead of allowing CI pipelines to directly deploy to Kubernetes, I adopted a GitOps model.</p><p>Benefits:</p><ul><li>Git as the single source of truth</li><li>Automated synchronization</li><li>Drift detection</li><li>Self-healing deployments</li><li>Improved auditability</li></ul><p>Argo CD continuously monitors the Git repository and synchronizes Kubernetes resources whenever changes are detected.</p><h3>Implementing Blue-Green Deployments using Argo Rollouts</h3><p>To minimize deployment risks, I implemented Blue-Green deployments using Argo Rollouts.</p><p>Deployment flow:</p><ol><li>New version deployed to Preview Environment</li><li>Validation and testing performed</li><li>Manual promotion executed</li><li>Traffic switched to new version</li><li>Previous version retained for rollback</li></ol><p>Benefits:</p><ul><li>Zero downtime deployments</li><li>Controlled production releases</li><li>Fast rollback capabilities</li><li>Improved deployment confidence</li></ul><h3>Automated Image Tag Updates</h3><p>To fully automate the deployment process:</p><ol><li>GitLab builds container images</li><li>Images are pushed to Amazon ECR</li><li>GitLab updates Kubernetes rollout manifests</li><li>Changes are committed back to Git</li><li>Argo CD detects the change</li><li>Argo Rollouts performs deployment</li></ol><p>This enables a complete GitOps workflow without manual intervention.</p><h3>Challenges Encountered</h3><p>During implementation I encountered several real-world issues:</p><ul><li>Argo CD synchronization delays</li><li>ECR authentication failures</li><li>ImagePullBackOff troubleshooting</li><li>GitLab pipeline recursion during manifest updates</li><li>Argo Rollouts installation and validation</li><li>Blue-Green deployment testing and promotion</li></ul><p>Each challenge provided valuable hands-on experience in troubleshooting Kubernetes and GitOps environments.</p><h3>Key Takeaways</h3><p>This project demonstrates how DevSecOps and GitOps can be combined to create a secure and scalable software delivery platform.</p><p>Key outcomes:</p><ul><li>Shift-left security implementation</li><li>Automated CI/CD pipeline</li><li>GitOps-based deployments</li><li>Blue-Green deployment strategy</li><li>Amazon EKS integration</li><li>Secure container delivery</li></ul><p>The combination of GitLab, Argo CD, Argo Rollouts, and AWS EKS provides a powerful platform for modern cloud-native application delivery.</p><h3>GitHub Repository</h3><p>GitHub:<br><a href="https://github.com/shrini-devsecops/gitlab-devsecops-pipeline">https://github.com/shrini-devsecops/gitlab-devsecops-pipeline</a></p><p>Feel free to explore the repository and provide feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d6fa32f6173" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>