<?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 Yousaf K H on Medium]]></title>
        <description><![CDATA[Stories by Yousaf K H on Medium]]></description>
        <link>https://medium.com/@yousaf.k.hamza?source=rss-ba6c558c2660------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oZKS8-8Eo7l5MVvCIxHDlw.jpeg</url>
            <title>Stories by Yousaf K H on Medium</title>
            <link>https://medium.com/@yousaf.k.hamza?source=rss-ba6c558c2660------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:09:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yousaf.k.hamza/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[ What Happens If You Use HPA and VPA on the Same Deployment?]]></title>
            <link>https://medium.com/@yousaf.k.hamza/what-happens-if-you-use-hpa-and-vpa-on-the-same-deployment-ce7a3794674e?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce7a3794674e</guid>
            <category><![CDATA[hpa]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[vpa]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sun, 03 May 2026 16:22:38 GMT</pubDate>
            <atom:updated>2026-05-03T16:22:38.680Z</atom:updated>
            <content:encoded><![CDATA[<p>In Kubernetes, autoscaling is powerful — but combining the wrong tools can create chaos instead of stability.</p><p>One of the most common mistakes engineers make is running <strong>Horizontal Pod Autoscaler (HPA)</strong> and <strong>Vertical Pod Autoscaler (VPA)</strong> on the <strong>same Deployment</strong>.</p><p>Let’s break down what actually happens in real production scenarios.</p><h3>🔍 First — What Do HPA and VPA Do?</h3><h3>Horizontal Pod Autoscaler (HPA)</h3><ul><li>Scales <strong>number of pods</strong></li><li>Based on:<br> - CPU / Memory<br> - Custom metrics</li></ul><h3>Vertical Pod Autoscaler (VPA)</h3><ul><li>Scales <strong>resources inside the pod</strong></li><li>Adjusts:<br>- CPU requests/limits<br>- Memory requests/limits</li></ul><h3>⚠️ The Problem: Running Both Together</h3><p>They <strong>conflict</strong> because:</p><ul><li>HPA depends on <strong>CPU utilization %</strong></li><li>VPA changes <strong>CPU requests</strong></li></ul><p>👉 This creates a feedback loop</p><h3>🔥 Real Production Scenario (Quick Recap)</h3><ol><li>Traffic increases → HPA scales pods</li><li>VPA increases CPU requests</li><li>CPU % drops → HPA scales down</li><li>Load still high → CPU spikes again</li></ol><p>💥 Result: <strong>Oscillation + instability</strong></p><h3>⚙️ Real EKS YAML Example (Wrong Setup ❌)</h3><p>This is what many people accidentally deploy in EKS.</p><h3>📦 Deployment</h3><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: demo-app<br>  namespace: default<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: demo-app<br>  template:<br>    metadata:<br>      labels:<br>        app: demo-app<br>    spec:<br>      containers:<br>      - name: app<br>        image: nginx<br>        resources:<br>          requests:<br>            cpu: &quot;200m&quot;<br>            memory: &quot;256Mi&quot;<br>          limits:<br>            cpu: &quot;500m&quot;<br>            memory: &quot;512Mi&quot;</pre><h3>📈 HPA (CPU-based scaling)</h3><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: demo-app-hpa<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: demo-app<br>  minReplicas: 3<br>  maxReplicas: 10<br>  metrics:<br>  - type: Resource<br>    resource:<br>      name: cpu<br>      target:<br>        type: Utilization<br>        averageUtilization: 60</pre><h3>📊 VPA (Auto Mode — PROBLEM ⚠️)</h3><pre>apiVersion: autoscaling.k8s.io/v1<br>kind: VerticalPodAutoscaler<br>metadata:<br>  name: demo-app-vpa<br>spec:<br>  targetRef:<br>    apiVersion: &quot;apps/v1&quot;<br>    kind: Deployment<br>    name: demo-app<br>  updatePolicy:<br>    updateMode: &quot;Auto&quot;</pre><h3>❌ What Happens in EKS?</h3><ul><li>HPA scales pods based on CPU %</li><li>VPA keeps changing CPU requests</li><li>Metrics fluctuate</li><li>Pods scale up/down continuously</li><li>VPA may restart pods</li></ul><p>👉 In production, this leads to:</p><ul><li>Unstable scaling</li><li>Increased restarts</li><li>Poor performance</li></ul><h3>✅ Correct Setup (Production Safe)</h3><h3>✔️ Option 1 — HPA Only (Recommended)</h3><p>Just remove VPA:</p><pre>kubectl delete vpa demo-app-vpa</pre><h3>✔️ Option 2 — VPA Recommendation Mode (Best Practice)</h3><pre>apiVersion: autoscaling.k8s.io/v1<br>kind: VerticalPodAutoscaler<br>metadata:<br>  name: demo-app-vpa<br>spec:<br>  targetRef:<br>    apiVersion: &quot;apps/v1&quot;<br>    kind: Deployment<br>    name: demo-app<br>  updatePolicy:<br>    updateMode: &quot;Off&quot;</pre><p>👉 Now VPA will:</p><ul><li>Give recommendations</li><li>NOT restart pods</li><li>NOT conflict with HPA</li></ul><h3>✔️ Option 3 — Advanced EKS Setup (Real Production Pattern)</h3><p>👉 Use:</p><ul><li>HPA → <strong>custom metrics (Prometheus / CloudWatch)</strong></li><li>VPA → recommendation mode</li></ul><p>Example:</p><pre>metrics:<br>- type: Pods<br>  pods:<br>    metric:<br>      name: requests_per_second<br>    target:<br>      type: AverageValue<br>      averageValue: &quot;100&quot;</pre><p>👉 This avoids CPU-based conflicts completely.</p><h3>🔍 How to Check in EKS (Debugging Commands)</h3><pre>kubectl get hpa<br>kubectl get vpa<br>kubectl describe hpa demo-app-hpa<br>kubectl describe vpa demo-app-vpa</pre><h3>Check VPA Recommendations:</h3><pre>kubectl describe vpa demo-app-vpa</pre><p>Look for:</p><pre>Recommendation:<br>  Container Recommendations:<br>    Target:<br>      cpu: 300m<br>      memory: 400Mi</pre><h3>🚀 Pro Tips (From Real Production)</h3><ul><li>Never use <strong>VPA Auto + HPA CPU together</strong></li><li>Use <strong>Cluster Autoscaler / Karpenter</strong> for node scaling</li><li>Prefer <strong>custom metrics over CPU</strong></li><li>Monitor:<br>- Pod restarts<br>- CPU throttling<br>- Scaling events</li></ul><h3>🔚 Conclusion</h3><p>Running HPA and VPA together without proper configuration leads to:</p><p>❌ Scaling conflicts<br>❌ Resource instability<br>❌ Pod restarts<br>❌ Production incidents</p><p>👉 Golden Rule:</p><blockquote><strong><em>Use HPA for scaling, VPA for recommendations — not both actively controlling the same workload.</em></strong></blockquote><h3>📌 Interview Question</h3><p><strong>Q: What happens if HPA and VPA are enabled on the same deployment?</strong></p><p><strong>Answer:</strong></p><p>They conflict because VPA modifies resource requests while HPA depends on utilization metrics, causing unstable scaling behavior. Best practice is to use VPA in recommendation mode when HPA is enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2lcoy_2y-W8nFSLPKVlUAg.png" /><figcaption>cover pic</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce7a3794674e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Helm v3 vs Helm v4 - What’s Changing & Why It Matters]]></title>
            <link>https://medium.com/@yousaf.k.hamza/helm-v3-vs-helm-v4-whats-changing-why-it-matters-38950173c3ca?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/38950173c3ca</guid>
            <category><![CDATA[helm-chart]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ek]]></category>
            <category><![CDATA[ak]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 18:55:21 GMT</pubDate>
            <atom:updated>2026-04-13T18:55:21.846Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔍 Introduction</h3><p>Helm has become the <strong>standard package manager for Kubernetes</strong>.</p><p>Most production environments today run on <strong>Helm v3 - </strong>stable, widely adopted, and battle-tested.</p><p>But now, <strong>Helm v4 is on the horizon</strong>.</p><p>So the question is:</p><p>👉 What’s actually changing?<br>👉 Do you need to worry about migration?</p><h3>🧠 Quick Recap: Helm v2 → v3</h3><p>Before jumping into v4, it’s important to understand where we came from.</p><p>In <strong>Helm v2</strong>:</p><ul><li>There was a server-side component called <strong>Tiller</strong></li><li>Security risks due to cluster-wide permissions</li></ul><p>In <strong>Helm v3</strong>:</p><ul><li>❌ Tiller removed</li><li>✅ Fully client-side</li><li>✅ Uses Kubernetes RBAC directly</li></ul><p>This made Helm <strong>simpler and more secure</strong>.</p><h3>🚀 Helm v3 (Current State)</h3><p>Helm v3 is:</p><ul><li>Stable and production-ready</li><li>Widely used across EKS, AKS, GKE</li><li>Integrated with GitOps tools (ArgoCD, Flux)</li></ul><p>Typical workflow:</p><pre>helm install my-app ./chart<br>helm upgrade my-app ./chart</pre><h3>🔮 What’s Coming in Helm v4</h3><p>Helm v4 is expected to bring <strong>improvements, not a complete redesign</strong>.</p><p>Think of it as:<br>👉 Refinement over reinvention</p><h3>⚡ Key Differences: Helm v3 vs Helm v4</h3><h3>1️⃣ Improved Upgrade &amp; Diff Handling</h3><p>In Helm v3:</p><ul><li>Limited visibility before upgrade</li><li>Requires plugins like:</li></ul><pre>helm diff upgrade</pre><p>In Helm v4:</p><ul><li>Better <strong>built-in diff visibility</strong> expected</li><li>Safer upgrade previews</li></ul><p>👉 Less reliance on external plugins</p><h3>2️⃣ Better Error Handling &amp; Validation</h3><p>Helm v3:</p><ul><li>Some failures are only visible during runtime</li></ul><p>Helm v4:</p><ul><li>Improved validation before applying changes</li><li>Better error messages</li></ul><p>👉 Easier debugging</p><h3>3️⃣ Enhanced Security Model</h3><p>Helm v3:</p><ul><li>Uses Kubernetes RBAC</li></ul><p>Helm v4:</p><ul><li>Expected improvements in:</li><li>Secret handling</li><li>Release management</li><li>Safer defaults</li></ul><h3>4️⃣ Dependency &amp; Chart Management Improvements</h3><p>Helm v3:</p><pre>helm dependency update</pre><p>Helm v4:</p><ul><li>More robust dependency resolution</li><li>Improved chart lifecycle handling</li></ul><h3>5️⃣ Performance &amp; Stability</h3><p>Helm v4 aims to:</p><ul><li>Reduce upgrade failures</li><li>Improve performance in large clusters</li><li>Handle edge cases better</li></ul><h3>⚠️ What’s NOT Changing</h3><p>Important:</p><p>👉 Helm v4 is NOT a breaking redesign</p><p>Core concepts remain:</p><ul><li>Charts</li><li>Values.yaml</li><li>Releases</li><li>Templates</li></ul><p>Your existing Helm knowledge still applies.</p><h3>🛠️ Should You Upgrade Immediately?</h3><p>Not necessarily.</p><p>👉 If you’re on Helm v3:</p><ul><li>You’re already in a stable place</li><li>No urgent migration needed</li></ul><p>👉 But:</p><ul><li>Start testing Helm v4 in non-prod environments</li><li>Watch for compatibility updates</li></ul><h3>💡 Key Takeaway</h3><p>👉 Helm v4 is about <strong>making deployments safer and more predictable</strong></p><p>Not about changing how Helm works fundamentally.</p><h3>🚀 Final Thoughts</h3><p>Helm continues to evolve with Kubernetes.</p><p>If you’re managing production workloads:</p><ul><li>Keep using Helm v3 confidently</li><li>Start exploring Helm v4 early</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXiGCvbsrk3UbXjw9jsldQ.png" /><figcaption>cover pic</figcaption></figure><p>More real-world DevOps &amp; Kubernetes topics coming next week.</p><p>#Kubernetes #Helm #DevOps #GitOps #Cloud #EKS #ArgoCD</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38950173c3ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Pod-to-Pod Communication Failure in Kubernetes]]></title>
            <link>https://medium.com/@yousaf.k.hamza/pod-to-pod-communication-failure-in-kubernetes-65129e8ff422?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/65129e8ff422</guid>
            <category><![CDATA[services]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[pods]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 07:31:01 GMT</pubDate>
            <atom:updated>2026-04-02T07:31:01.410Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔍 Introduction</h3><p>One of the most confusing issues in Kubernetes is when <strong>services inside the cluster stop communicating with each other</strong>.</p><p>Everything looks healthy:</p><ul><li>Pods are running ✅</li><li>Services are created ✅</li><li>No obvious errors ❌</li></ul><p>Yet…<br>👉 Service A cannot talk to Service B</p><p>This is a very common production issue, and in most cases, it’s not a “network problem” — it’s a <strong>configuration issue inside Kubernetes</strong>.</p><h3>🧠 The Scenario</h3><p>You have two services:</p><ul><li>service-a (client)</li><li>service-b (backend API)</li></ul><p>Your application tries:</p><pre>http://service-b:8080</pre><p>But you see:</p><ul><li>Timeout errors</li><li>Connection refused</li><li>DNS failures</li></ul><h3>🛠️ Step-by-Step Debugging Approach</h3><p>Here’s the exact process I follow in production:</p><h3>1️⃣ Check if the Service Exists</h3><p>Start simple:</p><pre>kubectl get svc</pre><p>Make sure:</p><ul><li>The service name is correct</li><li>The port is exposed</li></ul><h3>2️⃣ Check Endpoints (MOST IMPORTANT STEP)</h3><pre>kubectl get endpoints service-b</pre><p>👉 If this is <strong>EMPTY</strong>, you’ve found the issue.</p><p>Why?<br>Because a Service routes traffic to Pods via Endpoints.</p><p>No endpoints = no backend = traffic failure.</p><h3>3️⃣ Verify Label Selector Matching</h3><p>Check your service:</p><pre>kubectl describe svc service-b</pre><p>Look at:</p><pre>Selector: app=backend</pre><p>Now check pods:</p><pre>kubectl get pods --show-labels</pre><p>👉 Labels must match exactly.</p><p>⚠️ Common mistake:</p><ul><li>Service selector: app=backend</li><li>Pod label: app=api</li></ul><p>Result → No endpoints</p><h3>4️⃣ Test DNS Inside the Cluster</h3><p>From another pod:</p><pre>kubectl exec -it &lt;pod&gt; -- nslookup service-b</pre><p>If DNS fails:</p><ul><li>CoreDNS issue</li><li>Wrong namespace</li><li>Typo in service name</li></ul><p>👉 Try full DNS:</p><pre>service-b.default.svc.cluster.local</pre><h3>5️⃣ Test Connectivity (Real Test)</h3><pre>kubectl exec -it &lt;pod&gt; -- curl http://service-b:8080</pre><p>This confirms:</p><ul><li>Service routing</li><li>Pod connectivity</li></ul><h3>6️⃣ Check Network Policies</h3><p>If everything looks correct but still failing:</p><pre>kubectl get networkpolicy</pre><p>You might have rules blocking traffic.</p><p>Example:</p><ul><li>Only allow traffic from specific pods</li><li>Deny all by default</li></ul><h3>7️⃣ Verify Port Configuration</h3><p>Check:</p><ul><li>Service port</li><li>targetPort</li><li>Container port</li></ul><p>⚠️ Mismatch here = silent failure</p><h3>8️⃣ Application Binding Issue</h3><p>A very common issue:</p><p>Your app is running on:</p><pre>localhost (127.0.0.1)</pre><p>Instead of:</p><pre>0.0.0.0</pre><p>👉 Inside Kubernetes:</p><ul><li>localhost = only inside container</li><li>0.0.0.0 = accessible from other pods</li></ul><h3>❗ Common Root Causes (Real-World)</h3><p>From experience, most failures come from:</p><ul><li>Label mismatch between Service and Pods</li><li>No endpoints</li><li>Wrong port mapping</li><li>App binding to localhost</li><li>NetworkPolicy blocking traffic</li><li>Wrong namespace usage</li></ul><h3>💡 Key Takeaway</h3><p>👉 Most “pod communication issues” are NOT network problems</p><p>They are:</p><ul><li>Misconfigured services</li><li>Incorrect labels</li><li>Application-level mistakes</li></ul><h3>🚀 Final Thoughts</h3><p>When debugging pod communication, always follow this order:</p><p><strong>Service → Endpoints → Labels → DNS → Network → Application</strong></p><p>This structured approach will save hours during incidents.</p><p>More real-world Kubernetes debugging scenarios coming next week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MyFXhW4TyZKFJuJg4iUL5Q.png" /></figure><p>#Kubernetes #DevOps #SRE #Cloud #EKS #Networking #Debugging</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65129e8ff422" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Kubernetes Debugging Series — Post 1: CrashLoopBackOff]]></title>
            <link>https://medium.com/@yousaf.k.hamza/kubernetes-debugging-series-post-1-crashloopbackoff-678ad5f14f2c?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/678ad5f14f2c</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[oom]]></category>
            <category><![CDATA[crashloopbackoff]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 09:17:17 GMT</pubDate>
            <atom:updated>2026-03-27T09:17:17.732Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the most common issues engineers face in Kubernetes is the dreaded <strong>CrashLoopBackOff</strong>.</p><p>You deploy your application, everything seems fine… and then suddenly your pod starts restarting repeatedly.</p><p>At first glance, it feels like a Kubernetes issue — but in reality, Kubernetes is just doing its job:<br>👉 restarting a container that keeps failing.</p><h3>🧠 What’s actually happening?</h3><p>A container inside your pod:</p><ul><li>Starts</li><li>Crashes</li><li>Gets restarted by Kubernetes</li><li>And the cycle repeats</li></ul><p>After multiple failures, Kubernetes marks it as <strong>CrashLoopBackOff</strong>.</p><h3>🛠️ Step-by-step debugging approach</h3><p>When I hit this issue in production, I usually follow this exact flow:</p><h3>1. Check pod details</h3><p>Start with:</p><pre>kubectl describe pod &lt;pod-name&gt;</pre><p>This gives you:</p><ul><li>Events (very important)</li><li>Exit codes (e.g., 137 = OOMKilled)</li><li>Restart reasons</li></ul><h3>2. Check previous logs (most important step)</h3><pre>kubectl logs &lt;pod-name&gt; --previous</pre><p>👉 This is critical.</p><p>Most people check current logs and miss the actual crash reason.<br>The --previous flag shows logs from the <strong>last failed container</strong>.</p><h3>3. Check resource usage</h3><pre>kubectl top pod &lt;pod-name&gt;</pre><p>If memory usage spikes → high chance of <strong>OOMKilled</strong>.</p><h3>4. Validate configuration</h3><p>This is where most issues come from:</p><ul><li>Wrong environment variables</li><li>Missing secrets</li><li>Incorrect ConfigMaps</li><li>Wrong startup command</li></ul><h3>5. Review probes (very underrated)</h3><p>Misconfigured probes can kill perfectly healthy pods.</p><ul><li>Liveness probe → restarts container</li><li>Readiness probe → controls traffic</li></ul><p>💡 If your app needs time to start:<br>Use a <strong>startupProbe</strong> instead of aggressive liveness checks.</p><h3>✅ Common root causes</h3><p>In real-world production environments, most CrashLoopBackOff issues come from:</p><ul><li>Application errors (bad config or code)</li><li>Memory limits too low</li><li>External dependencies not reachable (DB, APIs)</li><li>Incorrect container entrypoint</li></ul><h3>💡 Key takeaway</h3><p>From my experience:</p><p>👉 <strong>CrashLoopBackOff is rarely a Kubernetes problem</strong><br>👉 It’s usually an application or configuration issue</p><h3>🚀 Final thoughts</h3><p>If you follow a structured debugging approach:</p><ul><li>Describe → Logs → Resources → Config → Probes</li></ul><p>You can resolve most issues in minutes instead of hours.</p><p>More real-world Kubernetes debugging scenarios coming every week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ULiqvwlabzrvHzvuddAmNw.png" /><figcaption>cover pic</figcaption></figure><p>#Kubernetes #DevOps #SRE #Cloud #EKS #AWS #Debugging</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=678ad5f14f2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Kubernetes HPA Doesn’t Scale When Traffic Spikes (And Why CPU-Based Autoscaling Sometimes…]]></title>
            <link>https://medium.com/@yousaf.k.hamza/why-kubernetes-hpa-doesnt-scale-when-traffic-spikes-and-why-cpu-based-autoscaling-sometimes-1c837e42e417?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c837e42e417</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[pods]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 16:21:26 GMT</pubDate>
            <atom:updated>2026-03-14T16:21:26.230Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Kubernetes HPA Doesn’t Scale When Traffic Spikes (And Why CPU-Based Autoscaling Sometimes Fails)</h3><p>Kubernetes <strong>Horizontal Pod Autoscaler (HPA)</strong> is one of the most widely used features for automatically scaling applications. The idea is simple: when load increases, Kubernetes creates more pods to handle the traffic.</p><p>However, many engineers encounter a frustrating scenario in production:</p><blockquote><em>Traffic suddenly increases, requests start timing out, but </em><strong><em>HPA does not scale the pods as expected.</em></strong></blockquote><p>This usually happens when autoscaling is configured only with <strong>CPU metrics</strong>, which do not always reflect real application load.</p><p>In this article, we will break down:</p><ul><li>Why <strong>CPU-based HPA sometimes fails during traffic spikes</strong></li><li>Why <strong>request-based scaling can work better</strong></li><li>Real-world <strong>bottlenecks that prevent scaling</strong></li><li>Practical <strong>fixes and best practices</strong></li></ul><h3>A Typical CPU-Based HPA Configuration</h3><p>Many teams initially configure HPA using CPU utilisation.</p><p>Example:</p><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: user-api-hpa<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: user-api<br>  minReplicas: 2<br>  maxReplicas: 20<br><br>  metrics:<br>  - type: Resource<br>    resource:<br>      name: cpu<br>      target:<br>        type: Utilization<br>        averageUtilization: 70</pre><p>The expected behaviour is simple:</p><ul><li>If pod CPU usage exceeds <strong>70%</strong>, Kubernetes adds more pods.</li></ul><p>But in real-world systems, <strong>traffic may increase without CPU increasing</strong>, meaning <strong>HPA never triggers scaling</strong>.</p><h3>Why CPU-Based HPA Sometimes Doesn’t Work</h3><p>The biggest misconception is assuming <strong>CPU always represents load</strong>.</p><p>In many applications, CPU usage remains low even when traffic increases.</p><p>This happens because most applications spend time <strong>waiting for external resources</strong> rather than using CPU.</p><p>Common examples include:</p><ul><li>database queries</li><li>external API calls</li><li>disk operations</li><li>network latency</li></ul><p>Example flow:</p><pre>Client Request → API Service → Database Query → Response</pre><p>If the database query takes <strong>200–300 ms</strong>, the pod may be mostly idle while waiting for the response.</p><p>Result:</p><ul><li>Traffic increases</li><li>Response latency increases</li><li>CPU usage remains low</li><li><strong>HPA never scales</strong></li></ul><h3>A Better Approach: Scaling Based on Traffic</h3><p>Instead of relying only on CPU metrics, some teams scale based on <strong>request rate (RPS)</strong>.</p><p>Example configuration:</p><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: user-api-hpa<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: user-api<br>  minReplicas: 2<br>  maxReplicas: 20<br><br>  metrics:<br>  - type: Pods<br>    pods:<br>      metric:<br>        name: http_requests_per_second<br>      target:<br>        type: AverageValue<br>        averageValue: 50</pre><p>What this configuration means:</p><ul><li>Each pod should handle around <strong>50 requests per second</strong></li><li>If traffic increases, Kubernetes automatically creates more pods</li></ul><p>This method often reflects <strong>real application load more accurately than CPU metrics</strong>.</p><h3>How Many Requests Can One Pod Handle?</h3><p>There is no universal number. It depends on the runtime, architecture, and dependencies.</p><p>Typical rough estimates for a pod with <strong>0.5 CPU</strong>:</p><ul><li><strong>Simple Go or Node.js API</strong><br>Around <strong>500–2000 requests per second</strong></li><li><strong>Lightweight Java services (Spring WebFlux or reactive frameworks)</strong><br>Around <strong>300–1000 requests per second</strong></li><li><strong>Java Spring Boot applications connected to databases</strong><br>Around <strong>100–500 requests per second</strong></li><li><strong>Heavy processing workloads</strong><br>Around <strong>20–100 requests per second</strong></li></ul><p>These numbers are <strong>only ballpark estimates</strong>. The real capacity depends on:</p><ul><li>request complexity</li><li>database queries</li><li>caching strategies</li><li>external API calls</li><li>network latency</li></ul><p>Always validate these numbers using <strong>load testing</strong>.</p><h3>Real Bottlenecks That Break Autoscaling</h3><p>Even if traffic increases, the bottleneck may not be the application pod.</p><p>Here are some common causes.</p><h3>Database bottlenecks</h3><p>Typical issues include:</p><ul><li>connection pool limits</li><li>slow queries</li><li>lock contention</li><li>database CPU saturation</li></ul><p>In these situations, adding more application pods <strong>does not help</strong> because the database becomes the limiting factor.</p><h3>External APIs</h3><p>Many services rely on third-party APIs.</p><p>Common problems include:</p><ul><li>rate limits</li><li>high latency</li><li>unstable services</li></ul><p>Pods may wait for API responses instead of using CPU, preventing HPA from scaling.</p><h3>I/O constraints</h3><p>Applications performing heavy disk operations can slow down due to:</p><ul><li>file reads and writes</li><li>logging overhead</li><li>storage latency</li></ul><p>Again, CPU usage may remain low even though requests are queuing.</p><h3>Pod Startup and Scheduling Delays</h3><p>Even when HPA decides to scale, <strong>new pods do not start instantly</strong>.</p><p>Typical real-world timeline:</p><ul><li>Pod scheduling: <strong>1–5 seconds</strong></li><li>Image pull: <strong>5–20 seconds</strong></li><li>Container startup: <strong>5–10 seconds</strong></li><li>Readiness probes: <strong>5–20 seconds</strong></li></ul><p>Total startup time often reaches <strong>30–60 seconds</strong>.</p><p>During sudden traffic spikes, this delay can temporarily overload existing pods.</p><h3>Cluster Capacity Still Matters</h3><p>Another often overlooked factor is <strong>cluster capacity</strong>.</p><p>Even if HPA requests more pods, Kubernetes still needs <strong>available resources</strong> to schedule them.</p><p>Potential issues include:</p><ul><li>insufficient CPU or memory on nodes</li><li>node affinity or taints blocking scheduling</li><li>namespace quotas</li><li>limited node pool capacity</li></ul><p>If resources are unavailable, new pods remain in <strong>Pending</strong> state.</p><p>If <strong>Cluster Autoscaler</strong> is enabled, new nodes may be created — but this can take <strong>1–3 minutes</strong>.</p><h3>Metrics Pipeline Delay</h3><p>Autoscaling decisions rely on metrics pipelines such as:</p><ul><li>Metrics Server</li><li>Prometheus</li><li>Custom metrics adapters</li></ul><p>Metrics are usually collected at intervals.</p><p>Example:</p><ul><li>metric scrape interval: <strong>15 seconds</strong></li><li>HPA evaluation interval: <strong>15 seconds</strong></li></ul><p>This introduces a <strong>30–60 second delay</strong> before scaling begins.</p><h3>How to Debug HPA When It Doesn’t Scale</h3><p>When autoscaling does not behave as expected, start with these commands.</p><p>Check HPA status:</p><pre>kubectl describe hpa user-api-hpa</pre><p>Check current metrics:</p><pre>kubectl top pods</pre><p>Verify metrics availability:</p><pre>kubectl get --raw &quot;/apis/custom.metrics.k8s.io/v1beta1&quot;</pre><p>Check if pods are pending:</p><pre>kubectl get pods</pre><p>These commands help determine whether the issue is:</p><ul><li>missing metrics</li><li>resource limits</li><li>scheduling failures</li></ul><h3>Production Best Practices for Autoscaling</h3><p>To design reliable autoscaling systems, many teams follow these practices.</p><h3>Combine multiple metrics</h3><p>Instead of relying on a single metric, combine signals such as:</p><ul><li>CPU utilisation</li><li>request rate</li><li>latency</li><li>queue length</li></ul><h3>Perform load testing</h3><p>Before setting autoscaling thresholds, run proper load tests to determine:</p><ul><li>maximum RPS per pod</li><li>latency under load</li><li>resource usage patterns</li></ul><h3>Ensure cluster capacity</h3><p>Make sure the cluster has enough headroom to schedule new pods quickly.</p><h3>Monitor bottlenecks</h3><p>Autoscaling works best when <strong>all system components scale together</strong>, including:</p><ul><li>application pods</li><li>databases</li><li>caches</li><li>message queues</li></ul><h3>Cover Picture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qbrmUhP0aDHUPF45O2VI7Q.png" /><figcaption>cover picture</figcaption></figure><h3>Final Thoughts</h3><p>Kubernetes HPA is extremely powerful, but it is not magic.</p><p>Scaling behaviour depends on multiple factors:</p><ul><li>the <strong>metric used for scaling</strong></li><li><strong>application architecture</strong></li><li><strong>external dependencies</strong></li><li><strong>cluster capacity</strong></li><li><strong>pod startup time</strong></li></ul><p>If autoscaling is based only on CPU, it may fail to react to real traffic spikes.</p><p>Understanding these limitations helps engineers design <strong>more resilient and predictable autoscaling systems</strong> for production workloads.</p><p>Understanding these factors allows engineers to design <strong>more predictable and resilient autoscaling strategies</strong> for production workloads.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c837e42e417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[End-to-End GitOps Setup with Argo CD and Kustomize]]></title>
            <link>https://medium.com/@yousaf.k.hamza/end-to-end-gitops-setup-with-argo-cd-and-kustomize-722be5048d58?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/722be5048d58</guid>
            <category><![CDATA[kustomize]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[minikube]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 20:07:19 GMT</pubDate>
            <atom:updated>2026-02-19T20:13:23.543Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide demonstrates a complete GitOps workflow using:</p><ul><li>Kubernetes (local cluster)</li><li>Argo CD</li><li>Kustomize</li><li>A Git repository</li><li>Fully declarative YAML configuration</li></ul><p>Repository reference used in this article:</p><pre>git@github.com:yousafkhamza/gitops-lab.git</pre><p>All steps work on macOS and Linux using standard Bash.</p><h3>Architecture Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYgD-5Au6E97ix8np7GZZA.png" /><figcaption>Architecture</figcaption></figure><p>GitOps workflow:</p><pre>Git Repository<br>     ↓<br>Argo CD watches repository<br>     ↓<br>Kustomize renders manifests<br>     ↓<br>Kubernetes cluster</pre><p>Argo CD continuously reconciles the desired state defined in Git with the live state of the Kubernetes cluster.</p><h3>Prerequisites</h3><ul><li>Kubernetes cluster (Minikube, Kind, K3s, etc.)</li><li>kubectl configured</li><li>helm installed</li><li>git installed</li><li>kustomize (optional for local validation)</li></ul><h3>1. Start Kubernetes Cluster</h3><p>Using Minikube:</p><pre>minikube start --cpus=4 --memory=6g</pre><p>If using another cluster, ensure it is running and accessible via kubectl.</p><h3>2. Install Argo CD via Helm</h3><p>Add Helm repository:</p><pre>helm repo add argo https://argoproj.github.io/argo-helm<br>helm repo update</pre><p>Create namespace:</p><pre>kubectl create namespace argocd</pre><p>Install Argo CD:</p><pre>helm install argocd argo/argo-cd -n argocd</pre><p>Verify installation:</p><pre>kubectl get pods -n argocd</pre><h3>3. Access Argo CD</h3><p>Port-forward the Argo CD server:</p><pre>kubectl port-forward svc/argocd-server -n argocd 8080:443</pre><p>Access in browser:</p><pre>https://localhost:8080</pre><p>Retrieve the admin password:</p><pre>kubectl -n argocd get secret argocd-initial-admin-secret \<br>-o jsonpath=&quot;{.data.password}&quot; | base64 --decode</pre><h3>4. Repository Structure</h3><p>Repository reference:</p><pre>git@github.com:yousafkhamza/gitops-lab.git</pre><p>Directory layout:</p><pre>gitops-lab/<br>├── base/<br>│   ├── deployment.yaml<br>│   ├── service.yaml<br>│   └── kustomization.yaml<br>│<br>├── overlays/<br>│   └── dev/<br>│       └── kustomization.yaml<br>│<br>└── argocd/<br>    └── application.yaml</pre><p>The repository contains:</p><ul><li>Base Kubernetes manifests</li><li>Environment-specific overlays</li><li>Argo CD Application definition</li></ul><h3>5. Base Kubernetes Manifests</h3><h3>base/deployment.yaml</h3><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>        - name: nginx<br>          image: nginx:1.25<br>          ports:<br>            - containerPort: 80</pre><p>Explanation:</p><ul><li>apiVersion: API group for Deployments</li><li>kind: Resource type</li><li>replicas: Desired number of pods</li><li>selector: Must match pod labels</li><li>template: Defines pod specification</li><li>image: Container image version</li></ul><h3>base/service.yaml</h3><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx<br>spec:<br>  type: ClusterIP<br>  selector:<br>    app: nginx<br>  ports:<br>    - port: 80<br>      targetPort: 80</pre><p>Explanation:</p><ul><li>ClusterIP exposes the service internally</li><li>selector connects the Service to pods</li><li>port and targetPort define traffic routing</li></ul><h3>base/kustomization.yaml</h3><pre>resources:<br>  - deployment.yaml<br>  - service.yaml</pre><p>This file tells Kustomize which base resources to include.</p><h3>6. Environment Overlay (Dev)</h3><h3>overlays/dev/kustomization.yaml</h3><pre>resources:<br>  - ../../base</pre><pre>namePrefix: dev-</pre><pre>replicas:<br>  - name: nginx<br>    count: 2</pre><pre>commonLabels:<br>  env: dev</pre><p>Explanation:</p><ul><li>resources: References base manifests</li><li>namePrefix: Adds dev- to resource names</li><li>replicas: Overrides replica count</li><li>commonLabels: Adds environment label</li></ul><p>Optional validation:</p><pre>kustomize build overlays/dev</pre><h3>7. Version Control</h3><p>The repository is pushed to:</p><pre>git@github.com:yousafkhamza/gitops-lab.git</pre><p>All changes to manifests are committed and pushed to this repository. Argo CD continuously watches the repository for updates.</p><h3>8. Argo CD Application Definition</h3><p>Location inside repository:</p><pre>gitops-lab/argocd/application.yaml</pre><p>In production environments, this file is often stored in a separate infrastructure repository. For this setup, it is stored within the same repository for simplicity.</p><h3>argocd/application.yaml</h3><pre>apiVersion: argoproj.io/v1alpha1<br>kind: Application<br>metadata:<br>  name: nginx-dev<br>  namespace: argocd<br>spec:<br>  project: default<br>  source:<br>    repoURL: git@github.com:yousafkhamza/gitops-lab.git<br>    targetRevision: main<br>    path: overlays/dev<br>  destination:<br>    server: https://kubernetes.default.svc<br>    namespace: default<br> syncPolicy:<br>    automated:<br>      prune: true<br>      selfHeal: true<br>    syncOptions:<br>      - CreateNamespace=true</pre><h3>Explanation of Application Manifest</h3><h3>source</h3><ul><li>repoURL: Git repository URL</li><li>targetRevision: Branch, tag, or commit</li><li>path: Directory containing the Kustomize overlay</li></ul><p>Argo CD pulls this path and runs Kustomize internally.</p><h3>destination</h3><ul><li>server: Kubernetes API server (in-cluster reference)</li><li>namespace: Target namespace for deployment</li></ul><h3>syncPolicy</h3><pre>automated:<br>  prune: true<br>  selfHeal: true</pre><ul><li>automated: Enables auto-sync</li><li>prune: Removes resources deleted from Git</li><li>selfHeal: Reconciles manual drift</li><li>CreateNamespace=true: Creates namespace if it does not exist</li></ul><h3>9. Apply the Application</h3><p>Apply the Application manifest to the cluster:</p><pre>kubectl apply -f argocd/application.yaml</pre><p>Verify:</p><pre>kubectl get applications -n argocd<br>kubectl get pods</pre><p>Deployment result:</p><pre>dev-nginx-xxxxx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7v8HiZkhUb-4-pZmbkmktg.png" /><figcaption>Argo Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lbw5O-57Ecgc0EL0tBHXBw.png" /><figcaption>kubernetes k9s view</figcaption></figure><h3>10. GitOps Workflow in Action</h3><p>When changes are made to:</p><pre>overlays/dev/kustomization.yaml</pre><p>For example, modifying replica count, the change is committed and pushed to:</p><pre>git@github.com:yousafkhamza/gitops-lab.git</pre><p>Argo CD:</p><ol><li>Detects repository changes</li><li>Pulls latest revision</li><li>Runs Kustomize</li><li>Compares desired vs live state</li><li>Applies updates</li><li>Prunes removed resources</li><li>Self-heals drift</li></ol><p>Monitoring:</p><pre>kubectl get deploy -w</pre><p>The deployment updates automatically without manual kubectl apply.</p><h3>Final Outcome</h3><p>This setup provides:</p><ul><li>Declarative Kubernetes configuration</li><li>Environment overlays with Kustomize</li><li>Fully automated GitOps workflow</li><li>Continuous reconciliation</li><li>Drift detection and correction</li><li>Production-aligned Argo CD configuration</li></ul><p>Repository reference:</p><pre>git@github.com:yousafkhamza/gitops-lab.git</pre><p>This completes a fully functional GitOps implementation using Argo CD and Kustomize.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=722be5048d58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Critical Fluent Bit Vulnerabilities Expose Cloud Environments to Remote Takeover]]></title>
            <link>https://medium.com/@yousaf.k.hamza/critical-fluent-bit-vulnerabilities-expose-cloud-environments-to-remote-takeover-3c13d8728295?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c13d8728295</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[fluentbit]]></category>
            <category><![CDATA[sidecar]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sat, 29 Nov 2025 07:21:08 GMT</pubDate>
            <atom:updated>2025-11-29T07:22:59.819Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Published on: November 24, 2025</strong></p><p>A major security disclosure by <strong>Oligo Security</strong> has revealed <strong>five critical vulnerabilities</strong> in <strong>Fluent Bit</strong>, the lightweight log processor used across AWS, Azure, GCP, Kubernetes, and billions of Docker containers. These flaws allow attackers to <strong>overwrite files, bypass authentication, inject malicious logs, manipulate tag routing, and potentially achieve remote code execution</strong>.</p><p>📌 <strong>Reference:</strong><br> <a href="https://www.oligo.security/blog/critical-vulnerabilities-in-fluent-bit-expose-cloud-environments-to-remote-takeover">https://www.oligo.security/blog/critical-vulnerabilities-in-fluent-bit-expose-cloud-environments-to-remote-takeover</a></p><h3>🔍 Summary of the Vulnerabilities</h3><h3>1. Path Traversal &amp; Arbitrary File Write</h3><p>Flaws in how Fluent Bit generates filenames from tags allow malicious tags containing ../ to overwrite arbitrary files.<br> → Possible RCE and system compromise.</p><h3>2. Stack Buffer Overflow</h3><p>The Docker input plugin fails with long container names, leading to potential memory corruption and code execution.</p><h3>3. Tag-Matching Bypass</h3><p>Fluent Bit incorrectly matches only the <em>first character</em> of tags, allowing spoofed or malicious tag routing.</p><h3>4. Improper Input Sanitization</h3><p>Attackers can inject newlines, escape sequences, and traversal patterns into tags and records.</p><h3>5. Authentication Bypass</h3><p>Forward input does not enforce authentication when users are configured without a shared key.</p><h3>🚨 Why It Matters</h3><p>Fluent Bit is embedded <strong>everywhere</strong> — Kubernetes DaemonSets, VM agents, serverless logging, container sidecars, and cloud-native observability stacks.</p><p>A compromise in Fluent Bit can:</p><ul><li>overwrite host system files</li><li>modify or erase logs</li><li>inject malicious events into SIEM/SOX/PCI pipelines</li><li>break audit trails</li><li>hide attacker activity</li><li>disrupt or take over cloud environments</li></ul><p>This is a <strong>high-impact, wide-blast-radius</strong> vulnerability for DevOps, SRE, and security teams.</p><h3>✔ Recommended Immediate Actions</h3><h3>1. Upgrade Fluent Bit NOW</h3><p>Use the patched versions:</p><ul><li><strong>v4.1.1 (recommended)</strong></li><li>or <strong>v4.0.12</strong></li></ul><h3>2. Hardening Tips</h3><ul><li>Use <strong>static tags only</strong>; avoid dynamic user-generated tags.</li><li>Never rely on tag-derived filenames.</li><li>Restrict filesystem permissions &amp; mount sensitive paths read-only.</li><li>Don’t expose Fluent Bit inputs (HTTP, Forward, Docker) to public networks.</li><li>Run Fluent Bit as a <strong>non-root</strong> user wherever possible.</li></ul><h3>🛡 Safest Production-Ready fluent-bit.conf</h3><p>This config is tuned to <strong>prevent path traversal, tag spoofing, and unauthorized writes</strong>, while still providing typical Kubernetes/ECS log ingestion.</p><pre>[SERVICE]<br>    Flush           5<br>    Daemon          Off<br>    Log_Level       info<br>    Parsers_File    parsers.conf<br>    HTTP_Server     Off<br>    storage.path    /var/log/flb-storage<br>    storage.sync    normal<br>    storage.checksum  on<br>    storage.backlog.mem_limit 100M<br><br># ---- INPUT (Safe) ----<br>[INPUT]<br>    Name            tail<br>    Path            /var/log/containers/*.log<br>    Tag             kube.*<br>    Refresh_Interval 5<br>    DB              /var/log/flb-kube.db<br>    DB.Sync         Normal<br>    Mem_Buf_Limit   10MB<br>    Skip_Long_Lines On      # Prevent buffer overflow attempts<br>    Ignore_Older    5h<br><br># Disable auto tag creation and restrict what tag patterns are accepted<br>[FILTER]<br>    Name            modify<br>    Match           kube.*<br>    Rename          tag kube.safe<br><br># Prevent unknown tags from being routed<br>[FILTER]<br>    Name            grep<br>    Match           kube.safe<br>    Regex           tag ^kube.safe$<br><br># ---- KUBERNETES FILTER (Safe) ----<br>[FILTER]<br>    Name            kubernetes<br>    Match           kube.safe<br>    Merge_Log       On<br>    Keep_Log        Off<br>    K8S-Logging.Parser Off<br>    K8S-Logging.Exclude Off<br><br># ---- OUTPUT (Safe) ----<br>[OUTPUT]<br>    Name            cloudwatch_logs<br>    Match           kube.safe<br>    region          me-central-1<br>    log_group_name  /ecs/safe/fluentbit<br>    log_stream_prefix node-<br>    auto_create_group true<br><br># Force static path &amp; file names (prevents path traversal)<br>[OUTPUT]<br>    Name            file<br>    Match           kube.safe<br>    Path            /var/log/flb-out<br>    File            fluentbit.log<br>    Format          json_lines<br>    Gzip            Off</pre><p>Dockerfile (recommended)</p><pre>FROM public.ecr.aws/aws-observability/aws-for-fluent-bit:latest<br><br># Create a non-root user<br>RUN adduser --uid 1000 --disabled-password --gecos &quot;&quot; flbuser<br><br>USER flbuser<br>COPY fluent-bit.conf /fluent-bit/etc/fluent-bit.conf</pre><h3>✔ Why This Config Is Safe</h3><ul><li><strong>Tags are rewritten</strong> to kube.safe → prevents tag injection &amp; traversal.</li><li><strong>Tag matching is strictly validated</strong> (exact match only).</li><li><strong>Static output filenames</strong> remove path traversal risk.</li><li><strong>Long log line skipping</strong> prevents buffer overflow.</li><li><strong>HTTP server disabled</strong> to reduce the attack surface.</li><li><strong>Storage enabled with checksum</strong> adds tamper detection.</li></ul><h3>🐳 If You Use Fluent Bit With Docker</h3><h3>Checklist for secure container usage:</h3><p>✅ Use the <strong>latest patched image</strong></p><pre>public.ecr.aws/aws-observability/aws-for-fluent-bit:latest</pre><p>✅ Never mount host root (/) or sensitive directories into the container.</p><p>✅ Run Fluent Bit as non-root:</p><pre># Kubernetes Manifest: <br>securityContext:<br>  runAsUser: 1000<br>  readOnlyRootFilesystem: true<br><br># ECS Task Definition<br>&quot;user&quot;: &quot;1000&quot;</pre><p>✅ Avoid auto_tag or dynamic tag expansion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ao9aGQRuo4Z6u1zvx6hzpA.png" /><figcaption>Credit: OLIGO</figcaption></figure><h3>🔚 Conclusion</h3><p>The November 2025 Fluent Bit vulnerabilities show how deeply embedded logging agents can create massive security risk across cloud infrastructure. Updating immediately and adopting hardened configurations is essential for Kubernetes, ECS, and Docker environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c13d8728295" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing the Fully-Managed Amazon EKS MCP Server (Preview): Conversational Cluster Management…]]></title>
            <link>https://medium.com/@yousaf.k.hamza/introducing-the-fully-managed-amazon-eks-mcp-server-preview-conversational-cluster-management-91eff4ac4daa?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/91eff4ac4daa</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sun, 23 Nov 2025 11:54:09 GMT</pubDate>
            <atom:updated>2025-11-23T11:55:14.890Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing the Fully-Managed Amazon EKS MCP Server (Preview): Conversational Cluster Management Comes to the Cloud 🚀</h3><p>Amazon now offers a fully-managed EKS MCP Server in preview, enabling teams to interact with their Kubernetes clusters via natural-language prompts (using the Model Context Protocol standard), for tasks such as cluster upgrades, manifest generation, and troubleshooting — no deep kubectl or manual orchestration required.</p><h3>🔍 What is the EKS MCP Server (Preview)</h3><p>The Amazon EKS MCP Server (currently in preview) is a hosted, fully-managed version of the server-side component for the MCP protocol. Previously, users had to deploy a locally-installed MCP server themselves; now AWS hosts the MCP Server endpoint, removing operational burden.</p><p>The key motivations for building it:</p><ul><li><strong>No local installation or maintenance</strong>: You don’t have to install or manage a private MCP server yourself. AWS automatically handles updates, bug fixes, and availability.</li><li><strong>Centralized access management</strong>: Integrates with IAM, with requests signed via AWS SigV4, enabling secure and controlled access to cluster data and management operations.</li><li><strong>Enhanced troubleshooting &amp; auditing</strong>: Built-in knowledge base derived from AWS’s operational experience, plus integration with AWS CloudTrail for audit trails of tool calls.</li></ul><h3>🧩 Architecture &amp; How It Works</h3><p><strong>ARCH DIAGRAM PLACEHOLDER</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVfLIXRU5xzEZw2_R9G_YQ.png" /><figcaption>official architecture</figcaption></figure><h3>Overview of the flow</h3><ol><li><strong>AI client or agent connects to hosted MCP server</strong> via a lightweight proxy setup configured with AWS credentials and SigV4 authentication.</li><li><strong>Client sends natural-language prompts or instructions</strong> (“assess my EKS cluster upgrade readiness”, “deploy this web application”, etc.) to the MCP server endpoint. The MCP server tools process the request by connecting securely to your live EKS clusters and other AWS data sources.</li><li><strong>Tool execution &amp; response</strong> — The server runs the necessary “tools” (cluster management, resource inspection/generation, troubleshooting, etc.), returning structured results and guidance. These tools can generate Kubernetes manifests, list clusters, evaluate upgrade readiness, debug stuck resources, and so on.</li><li><strong>Console integration with Amazon Q</strong> — You also get enhanced integration in the EKS console. When there are cluster health issues or upgrade warnings in the EKS observability dashboard, you can click “Inspect with Amazon Q” to get contextual AI-powered diagnostics and remediation suggestions.</li></ol><h3>🧪 Use Cases: How You’ll Benefit as a DevOps / SRE</h3><p>Here are the scenarios where this preview feature can be a game-changer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZR08fP_YgaMmtk18aItWQ.png" /></figure><h3>✅ How to Get Started (Preview)</h3><p><strong>Prerequisites</strong></p><ul><li>Install and configure the AWS CLI (with appropriate IAM permissions, including eks-mcp:InvokeMcp, eks-mcp:CallReadOnlyTool, etc.).</li><li>Choose an MCP client or “agentic tool” that supports MCP; the blog post demonstrates using <strong>Kiro CLI</strong> as the client.</li></ul><p><strong>Configuration</strong></p><ul><li>Configure your mcpServers in the client config, pointing to the hosted endpoint (e.g. https://eks-mcp.{AWS_REGION}.api.aws/mcp) for the “eks-mcp” server. The proxy utility (mcp-proxy-for-aws) helps connect securely with SigV4 authentication.</li><li>Optionally start in <em>read-only mode</em> (--read-only) to explore capabilities safely before granting full write access.</li></ul><p><strong>Start interacting conversationally</strong></p><ul><li>Send prompts like: <em>“Assess my cluster upgrade readiness for cluster-X”</em>, or <em>“Deploy a simple web app with a load balancer to cluster-Y”</em>. The MCP server responds with results, manifests, or remediation steps.</li></ul><h3>🔭 Looking Ahead &amp; Considerations</h3><ul><li><strong>Preview limitations &amp; region availability</strong> — As of now, the EKS MCP Server is in <strong>preview</strong> across AWS Commercial regions (excluding certain regions). Ask your AWS contact or review the preview documentation for supported regions and limitations.</li><li><strong>Security posture &amp; IAM controls</strong> — Make sure to enforce least-privilege IAM policies for the roles/profiles used to connect to the MCP Server, especially if enabling full-access for write operations. Audit CloudTrail logs generated by the service.</li><li><strong>Agent compatibility and customization</strong> — Although the blog demonstrates usage via Kiro CLI and related tools, you can integrate custom MCP-compatible agents or internal tooling to automate workflows in your organization.</li><li><strong>Adoption inside organizations</strong> — For teams heavily invested in CI/CD, GitOps, and custom tooling (similar to what I work on), this opens new avenues: automating manifest generation, upgrade planning, incident resolution through conversational/agent interfaces tied into existing pipelines.</li></ul><h3>🔗 References</h3><ul><li>Original AWS blog: <em>Introducing the fully managed Amazon EKS MCP Server </em>(<a href="https://aws.amazon.com/blogs/containers/introducing-the-fully-managed-amazon-eks-mcp-server-preview/">Amazon Web Services</a>)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91eff4ac4daa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[⚡ Getting Started with Codex CLI — A Quick Hands-On Experience]]></title>
            <link>https://medium.com/@yousaf.k.hamza/getting-started-with-codex-cli-a-quick-hands-on-experience-fe912d422e84?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe912d422e84</guid>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sat, 15 Nov 2025 04:32:08 GMT</pubDate>
            <atom:updated>2025-11-15T04:33:07.262Z</atom:updated>
            <content:encoded><![CDATA[<h3>⚡ Getting Started with Codex CLI — A Quick Hands-On Experience</h3><p>As engineers, we often appreciate tools that simplify everyday tasks without unnecessary overhead. Recently, I explored <strong>Codex CLI</strong>, and I was pleasantly surprised by how smooth and intuitive the setup process was.</p><p>Whether you’re managing directories, automating repetitive tasks, or simply experimenting with new tools, Codex provides a clean and efficient experience from the terminal.</p><h3>⚙️ Prerequisites</h3><p>Before installing Codex CLI, make sure your environment meets the following requirements:</p><ul><li><strong>Node.js</strong> (v14 or later)</li><li><strong>npm</strong> (v6 or later)</li><li>A terminal or command-line interface (Linux, macOS, or Windows)</li></ul><p>You can verify your setup with:</p><pre>node -v<br>npm -v</pre><h3>🧩 Step 1: Install and Configure Codex</h3><p>Installing Codex is straightforward. You can set it up globally using npm:</p><pre>npm install -g codex-cli</pre><p>After installation, configure it with your desired settings to get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vksx5LwLhUlKUd2CiDHvw.png" /><figcaption>Initial start</figcaption></figure><h3>📁 Step 2: Create and Remove a Directory</h3><p>Once configured, I tested it with a few quick commands — creating and removing a directory. Both operations were smooth and instant, demonstrating how responsive the tool is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y6nRlSRmtnxu-_px6UQl1A.png" /><figcaption>Test run</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*eAEIkuxcRacMShuzQIHVsg.png" /><figcaption>BTS</figcaption></figure><h3>💡 Final Thoughts</h3><p>Codex CLI stands out for its simplicity and usability. It doesn’t try to do everything — it just focuses on doing the basics right, which makes it perfect for developers who value efficiency and clarity.</p><p>If you’re looking to streamline your command-line workflow, Codex is definitely worth trying out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLUX_HqKKlZvXeu3GiA3fw.png" /><figcaption>cover pic</figcaption></figure><p><strong>#Codex #CLI #DevTools #Automation #DevOps #Productivity</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe912d422e84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Learn AWS DevOps Locally with LocalStack + Terraform + AWS CLI + Python Lambda]]></title>
            <link>https://medium.com/@yousaf.k.hamza/learn-aws-devops-locally-with-localstack-terraform-aws-cli-python-lambda-6c8eb590936a?source=rss-ba6c558c2660------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c8eb590936a</guid>
            <category><![CDATA[localhost]]></category>
            <category><![CDATA[aws-cli]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[localstack]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Yousaf K H]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 04:56:30 GMT</pubDate>
            <atom:updated>2025-10-05T04:56:30.232Z</atom:updated>
            <content:encoded><![CDATA[<p>When you’re starting your DevOps journey, one of the biggest challenges is <strong>practising AWS services without racking up unexpected cloud bills</strong>.<br> That’s where <a href="https://localstack.cloud/"><strong>LocalStack</strong></a> comes in — it emulates AWS services locally using Docker, so you can practice Infrastructure as Code (IaC), automation, and cloud-native development <strong>right from your laptop</strong>.</p><p>I recently created a public repo 👉 <a href="https://github.com/yousafkhamza/localstack-terraform-learning">localstack-terraform-learning</a>, which provides a <strong>hands-on AWS learning lab</strong> powered by LocalStack, Terraform, AWS CLI, and Python Lambda functions.</p><p>If you’re a student or beginner in DevOps, this project will help you build confidence with <strong>cloud-native workflows</strong> — without logging in to the AWS Console even once!</p><h3>🎯 What You’ll Learn</h3><p>With this setup, you can practice:</p><ul><li>🏗️ <strong>Infrastructure as Code</strong> with Terraform</li><li>⚡ Deploying <strong>AWS Lambda</strong> functions locally</li><li>📦 Managing <strong>S3 Buckets</strong> and objects</li><li>🔐 Working with <strong>IAM Roles &amp; Policies</strong></li><li>📊 Setting up <strong>CloudWatch Logs</strong></li><li>🖥️ Using <strong>AWS CLI</strong> effectively</li><li>🐍 Writing Python scripts with <strong>boto3 SDK</strong></li><li>🎓 A <strong>Console-free workflow</strong> — everything through code</li></ul><h3>🏗️ Project Overview</h3><p>Here’s what the repo includes:</p><p>📂 Project Structure:</p><pre>localstack-terraform-learning/<br>├── env.sh                 # Environment setup<br>├── setup.sh               # Automated setup script<br>├── validate-env.sh        # Validation checks<br>├── test_lambda.sh         # Test AWS Lambda locally<br>├── aws_demo.py            # Python boto3 example<br>├── aws_commands_reference.sh<br>│<br>├── Terraform Config:<br>│   ├── provider.tf<br>│   ├── lambda.tf<br>│   ├── variables.tf<br>│   ├── output.tf<br>│   └── backend.conf<br>│<br>└── Lambda Function:<br>    ├── lambda_function.py<br>    └── lambda_function.zip</pre><p>This setup simulates a <strong>real-world AWS project</strong> — from provisioning infra with Terraform to testing Lambda functions.</p><h3>🚀 Quick Start Guide</h3><p>1️⃣ <strong>Start LocalStack</strong></p><pre>docker run \<br>  --rm -it \<br>  -p 127.0.0.1:4566:4566 \<br>  -p 127.0.0.1:4510-4559:4510-4559 \<br>  -v /var/run/docker.sock:/var/run/docker.sock \<br>  localstack/localstack</pre><p>2️⃣ <strong>Configure AWS CLI for LocalStack</strong></p><pre>aws configure set aws_access_key_id test --profile localstack<br>aws configure set aws_secret_access_key test --profile localstack<br>aws configure set region us-east-1 --profile localstack</pre><p>3️⃣ <strong>Deploy Infrastructure with Terraform</strong></p><pre>source env.sh<br>terraform init -backend-config=backend.conf<br>terraform apply</pre><p>4️⃣ <strong>Test Lambda Function</strong></p><pre>aws lambda invoke \<br>  --endpoint-url=http://localhost:4566 \<br>  --function-name localstack-demo-lambda \<br>  --profile localstack \<br>  response.json</pre><pre>cat response.json</pre><h3>🎓 Learning Exercises</h3><p>To deepen your DevOps skills, try:</p><ul><li>✨ Modify the Lambda function &amp; redeploy</li><li>📂 Add DynamoDB, SQS, or API Gateway in lambda.tf</li><li>📜 Explore AWS CLI commands (aws s3 ls, aws iam list-roles)</li><li>🐍 Write Python scripts with boto3 to interact with LocalStack</li></ul><h3>🔧 Why This Matters for DevOps Students</h3><ul><li>✅ <strong>Zero cost</strong> AWS learning</li><li>✅ <strong>Real-world DevOps workflow</strong> (IaC + automation + coding)</li><li>✅ <strong>Safe playground</strong> for experimentation</li><li>✅ <strong>Build portfolio projects</strong> to showcase in interviews</li></ul><p>Instead of just reading about AWS, you’ll <strong>deploy real infra</strong>, debug Lambda logs, write Python automation, and feel like you’re working in production — all on your laptop!</p><h3>🧹 Cleanup</h3><p>Destroy everything with:</p><pre>terraform destroy</pre><p>And stop LocalStack with Ctrl+C.</p><h3>📚 Resources</h3><ul><li><a href="https://docs.localstack.cloud/">LocalStack Docs</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs">Terraform AWS Provider</a></li><li><a href="https://docs.aws.amazon.com/cli/latest/reference/">AWS CLI Reference</a></li><li><a href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html">Boto3 Docs</a></li></ul><p>💡 If you’re starting out in DevOps and AWS, check out my repo here:<br> 👉 <a href="https://github.com/yousafkhamza/localstack-terraform-learning"><strong>GitHub: localstack-terraform-learning</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fUNnejWwnSSqf8rgWyWX5w.jpeg" /><figcaption>cover pic</figcaption></figure><p>Happy learning, and may your infra always terraform apply without errors! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c8eb590936a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>