<?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 BalaSubramani K on Medium]]></title>
        <description><![CDATA[Stories by BalaSubramani K on Medium]]></description>
        <link>https://medium.com/@bala-kubelancer?source=rss-2ce6e2575b1e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*R60E7ZD3pv_ZFEfX0Gsb6g.jpeg</url>
            <title>Stories by BalaSubramani K on Medium</title>
            <link>https://medium.com/@bala-kubelancer?source=rss-2ce6e2575b1e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 15:13:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bala-kubelancer/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[Recently, I faced an issue in my AWS EKS Kubernetes cluster where pods were continuously restarting…]]></title>
            <link>https://bala-kubelancer.medium.com/recently-i-faced-an-issue-in-my-aws-eks-kubernetes-cluster-where-pods-were-continuously-restarting-e0b5e61fbced?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0b5e61fbced</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Thu, 14 May 2026 10:10:58 GMT</pubDate>
            <atom:updated>2026-05-14T10:10:58.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kCaMi2u6gqbr1vUZYAfj1A.png" /></figure><p>Recently, I faced an issue in my AWS EKS Kubernetes cluster where pods were continuously restarting even though CPU and memory usage were very low.</p><p>At first, it looked like an application crash or infrastructure problem, but after debugging deeply, I found the real issue was actually caused by ArgoCD and HPA fighting with each other.</p><p>I wanted to share this real production experience because many DevOps engineers may face the same issue.</p><h3>The Problem</h3><p>My application pods were continuously getting recreated.</p><p>In ArgoCD UI:</p><ul><li>application health was changing between Healthy and Progressing</li><li>pods were getting terminated and recreated</li><li>ReplicaSets were continuously changing</li></ul><p>But resource usage was normal:</p><ul><li>CPU usage: 1%</li><li>Memory usage: 21%</li></ul><p>So clearly, this was not a resource exhaustion issue.</p><h3>Initial Assumptions</h3><p>Initially, I suspected:</p><ul><li>Liveness probe failure</li><li>Readiness probe issue</li><li>Application crash</li><li>Istio sidecar issue</li><li>Node memory pressure</li><li>OOMKilled</li><li>Database connectivity issue</li></ul><p>But none of them were the actual root cause.</p><h3>What I Observed</h3><p>While checking Kubernetes events, I noticed repeated logs like:</p><pre>Initiated automated sync<br>Updated sync status: Synced -&gt; OutOfSync<br>Stopping container<br>Deleted pod<br>Created pod</pre><p>This was a very important clue.</p><p>Pods were not crashing.</p><p>ArgoCD itself was continuously redeploying them.</p><h3>The Real Root Cause</h3><p>I was using:</p><ul><li>ArgoCD</li><li>HPA (Horizontal Pod Autoscaler)</li><li>Kubernetes Deployment</li></ul><p>My Deployment YAML had:</p><pre>spec:<br>  replicas: 1</pre><p>At the same time, HPA was automatically scaling pods to 2 replicas.</p><p>This created a conflict.</p><p>The loop looked like this:</p><ol><li>HPA scaled replicas from 1 → 2</li><li>ArgoCD detected drift</li><li>ArgoCD selfHeal reverted replicas back to 1</li><li>Kubernetes terminated one pod</li><li>HPA scaled again</li><li>Loop repeated forever</li></ol><p>This caused continuous pod recreation in production.</p><h3>How I Debugged the Issue</h3><p>I used:</p><pre>kubectl get events -A --sort-by=.metadata.creationTimestamp</pre><p>Then checked ArgoCD status:</p><pre>kubectl describe application api-dev -n argocd</pre><p>I found:</p><pre>syncPolicy:<br>  automated:<br>    prune: true<br>    selfHeal: true</pre><p>Then I ran:</p><pre>argocd app diff api-dev --grpc-web</pre><p>The output clearly showed:</p><pre>&lt; replicas: 2<br>&gt; replicas: 1</pre><p>That confirmed HPA and ArgoCD were fighting over replicas.</p><h3>The Fix</h3><h3>Step 1: Remove replicas from Deployment YAML</h3><p>I removed:</p><pre>replicas: 1</pre><p>from the Deployment manifests.</p><p>Because when using HPA, Kubernetes should fully control replicas.</p><h3>Step 2: Configure ArgoCD ignoreDifferences</h3><p>I added:</p><pre>spec:<br>  ignoreDifferences:<br>    - group: apps<br>      kind: Deployment<br>      jsonPointers:<br>        - /spec/replicas</pre><p>This tells ArgoCD to ignore replica count changes managed by HPA.</p><h3>Step 3: Clean Up Kustomize Structure</h3><p>I also cleaned up my Kubernetes manifests.</p><p>I moved:</p><ul><li>resources</li><li>image tags</li><li>environment-specific settings</li></ul><p>to overlay patches instead of duplicating them in the base Deployment YAML.</p><p>This reduced unnecessary diffs and improved GitOps stability.</p><h3>Example of the Drift Problem</h3><p>This was the actual type of difference I saw while running:</p><pre>argocd app diff api-dev --grpc-web</pre><p>Output:</p><pre>===== apps/Deployment dev/api ======</pre><pre>&lt; replicas: 2<br>&gt; replicas: 1</pre><p>This clearly showed that:</p><ul><li>HPA changed live replicas to 2</li><li>Git desired state still had 1</li><li>ArgoCD selfHeal continuously reverted it</li></ul><p>That created the endless deployment loop.</p><h3>My Kustomize Structure</h3><p>I use a clean Kustomize structure like this:</p><pre>k8s/<br>├── base/<br>│   ├── deployment.yaml<br>│   ├── service.yaml<br>│   └── kustomization.yaml<br>│<br>└── overlays/<br>    └── dev/<br>        ├── deployment-patch.yaml<br>        ├── hpa.yaml<br>        ├── ingress.yaml<br>        └── kustomization.yaml</pre><h3>Before Fix — Deployment YAML</h3><p>Initially my Deployment YAML had replicas and resources directly inside the Deployment.</p><p>This caused conflict with HPA.</p><h3>base/deployment.yaml</h3><pre>apiVersion: apps/v1<br>kind: Deployment</pre><pre>metadata:<br>  name: api</pre><pre>spec:<br>  replicas: 1</pre><pre>  strategy:<br>    type: RollingUpdate<br>    rollingUpdate:<br>      maxUnavailable: 0<br>      maxSurge: 1</pre><pre>  selector:<br>    matchLabels:<br>      app: api</pre><pre>  template:<br>    metadata:<br>      labels:<br>        app: api</pre><pre>    spec:<br>      containers:<br>        - name: api<br>          image: api</pre><pre>          ports:<br>            - containerPort: 5132</pre><pre>          resources:<br>            requests:<br>              cpu: 500m<br>              memory: 512Mi</pre><pre>            limits:<br>              cpu: 1000m<br>              memory: 1Gi</pre><h3>Before Fix — HPA YAML</h3><h3>overlays/dev/hpa.yaml</h3><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler</pre><pre>metadata:<br>  name: api</pre><pre>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: api</pre><pre>  minReplicas: 1<br>  maxReplicas: 5</pre><pre>  metrics:<br>    - type: Resource<br>      resource:<br>        name: cpu<br>        target:<br>          type: Utilization<br>          averageUtilization: 50</pre><h3>Problem Before Fix</h3><p>This created conflict:</p><ul><li>Deployment desired replicas = 1</li><li>HPA scaled live replicas = 2</li><li>ArgoCD detected drift</li><li>ArgoCD selfHeal reverted replicas</li><li>Pods continuously recreated</li></ul><p>ArgoCD diff looked like:</p><pre>&lt; replicas: 2<br>&gt; replicas: 1</pre><h3>After Fix — Clean Base Deployment</h3><p>I removed:</p><ul><li>replicas</li><li>resources</li><li>environment-specific configuration</li></ul><p>from base Deployment YAML.</p><h3>base/deployment.yaml</h3><pre>apiVersion: apps/v1<br>kind: Deployment</pre><pre>metadata:<br>  name: api</pre><pre>spec:<br>  strategy:<br>    type: RollingUpdate<br>    rollingUpdate:<br>      maxUnavailable: 0<br>      maxSurge: 1</pre><pre>  selector:<br>    matchLabels:<br>      app: api</pre><pre>  template:<br>    metadata:<br>      labels:<br>        app: api</pre><pre>    spec:<br>      containers:<br>        - name: api<br>          image: api</pre><pre>          ports:<br>            - containerPort: 5132</pre><h3>After Fix — Overlay Deployment Patch</h3><p>Environment-specific resources moved into overlay patch.</p><h3>overlays/dev/deployment-patch.yaml</h3><pre>apiVersion: apps/v1<br>kind: Deployment</pre><pre>metadata:<br>  name: api</pre><pre>spec:<br>  template:<br>    spec:<br>      containers:<br>        - name: api</pre><pre>          resources:<br>            requests:<br>              cpu: 500m<br>              memory: 512Mi</pre><pre>            limits:<br>              cpu: 1000m<br>              memory: 1Gi</pre><h3>After Fix — HPA Fully Controls Scaling</h3><p>HPA now fully manages replicas without conflict.</p><h3>overlays/dev/hpa.yaml</h3><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler</pre><pre>metadata:<br>  name: api</pre><pre>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: api</pre><pre>  minReplicas: 1<br>  maxReplicas: 5</pre><pre>  metrics:<br>    - type: Resource<br>      resource:<br>        name: cpu<br>        target:<br>          type: Utilization<br>          averageUtilization: 50</pre><h3>Final ArgoCD Fix</h3><p>I also added:</p><pre>spec:<br>  ignoreDifferences:<br>    - group: apps<br>      kind: Deployment<br>      jsonPointers:<br>        - /spec/replicas</pre><p>This prevented ArgoCD from continuously fighting with HPA.</p><h3>Result after fix</h3><p>After restructuring Kustomize manifests:</p><ul><li>ArgoCD remained Synced</li><li>HPA scaled correctly</li><li>Pods stopped recreating continuously</li><li>Deployments stabilized</li><li>GitOps workflow became much cleaner</li><li>No more endless rollout loops</li></ul><h3>Important Lessons I Learned</h3><h3>1. Low CPU and memory do not always mean infrastructure is healthy</h3><p>Sometimes the issue is purely GitOps reconciliation.</p><h3>2. ArgoCD selfHeal can create hidden deployment loops</h3><p>Especially when:</p><ul><li>HPA modifies replicas</li><li>Istio injects annotations</li><li>mutating webhooks change resources</li></ul><h3>3. Never manage replicas manually when using HPA</h3><p>Let HPA fully control scaling.</p><h3>4. Always use argocd app diff during troubleshooting</h3><p>This command quickly reveals hidden drift problems.</p><p>This issue was tricky because at first it looked like a Kubernetes or application issue.</p><p>But the real problem was configuration conflict between ArgoCD and HPA.</p><p>After fixing the GitOps drift properly, the cluster became stable again.</p><p>Hopefully this helps someone else save hours of debugging time in production Kubernetes environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0b5e61fbced" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I solved frequent Pod restart issues in Production Kubernetes]]></title>
            <link>https://bala-kubelancer.medium.com/how-i-solved-frequent-pod-restart-issues-in-production-kubernetes-baf423cc43f3?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/baf423cc43f3</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Thu, 14 May 2026 06:13:27 GMT</pubDate>
            <atom:updated>2026-05-14T06:13:27.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDFQt8Ykbp-Vh1xocT5aqg.png" /></figure><p>Recently, in one of my production projects running on Amazon Web Services EKS with Kubernetes, I encountered an annoying issue.</p><p>Pods were restarting repeatedly in production.</p><p>At first, everything looked normal.</p><ul><li>ArgoCD was showing synced</li><li>Deployment was successful</li><li>Pods were showing Running state</li><li>No major application errors</li></ul><p>But users started reporting:</p><ul><li>frontend sometimes not loading</li><li>API failing randomly</li><li>occasional 503 errors</li><li>upstream unhealthy</li></ul><p>Initially, I thought maybe application issue.</p><p>But later, I understood the actual problem was in the infrastructure</p><h3>First thing I noticed . . .</h3><p>When I checked the pods:</p><pre>kubectl get pods -n dev</pre><p>I saw restart counts increasing.</p><p>Example:</p><pre>frontend-7f5c8f9d6f-zp8xk   1/1 Running   22 (5m ago)</pre><p>Pod was still running.</p><p>That confused me.</p><p>Normally, many people only check whether the pod is running or not.</p><p>But the restart count is also very important.</p><h3>Honestly, I checked almost everything.</h3><p>I thought maybe:</p><ul><li>memory issue</li><li>CPU issue</li><li>node issue</li><li>ArgoCD issue</li><li>Istio routing problem</li><li>application bug</li><li>AWS ALB issue</li></ul><p>But none of them was the direct cause for the pod restarting.</p><h3>The real problem started during the traffic spike time</h3><p>An interesting thing was:</p><p>This issue was not happening in Dev or UAT.</p><p>Only production.</p><p>Especially during high traffic time.</p><p>That made troubleshooting difficult</p><p>Because when traffic reduced, everything became normal again.</p><h3>First real clue</h3><p>I checked pod details:</p><pre>kubectl describe pod &lt;pod-name&gt;</pre><p>Then I noticed this:</p><pre>Liveness probe failed: HTTP probe failed with statuscode: 500</pre><p>Now things became more clear.</p><p>Kubernetes itself was restarting the container.</p><p>Not because app crashed.</p><p>Because health check was failing.</p><h3>Health Probe was too aggressive</h3><p>My configuration looked like this:</p><pre>livenessProbe:<br>  httpGet:<br>    path: /health<br>    port: 3000<br>  initialDelaySeconds: 5<br>  periodSeconds: 10</pre><p>Looks normal, right?</p><p>But in production, the application startup was taking a little more time.</p><p>Especially during:</p><ul><li>heavy traffic</li><li>database connection delay</li><li>cache warmup</li><li>external API calls</li></ul><p>But Kubernetes started checking health too early.</p><p>The application was not fully ready.</p><p>Health check failed.</p><p>Then Kubernetes restarted the container.</p><p>Again, the same cycle repeated.</p><h3>Then I checked the logs carefully.</h3><pre>kubectl logs &lt;pod-name&gt;</pre><p>Application was actually starting properly.</p><p>But startup was slightly slow.</p><p>That small delay itself caused probe failure.</p><p>This was an important lesson for me.</p><p>Sometimes the application is healthy.</p><p>But Kubernetes thinks it is unhealthy.</p><h3>Then I checked resource usage.</h3><pre>kubectl top pods</pre><p>I noticed:</p><ul><li>CPU spikes</li><li>memory usage close to limit</li></ul><p>My old configuration was too small for production traffic.</p><pre>resources:<br>  requests:<br>    cpu: &quot;100m&quot;<br>    memory: &quot;128Mi&quot;<br>  limits:<br>    cpu: &quot;200m&quot;<br>    memory: &quot;256Mi&quot;</pre><p>This worked fine in lower environments.</p><p>But production traffic is completely different.</p><h3>Another Mistake I Found</h3><p>I was also using:</p><pre>image: frontend:latest</pre><p>This created unnecessary deployment confusion sometimes.</p><p>Later, I changed to Git SHA-based image tags.</p><p>Example:</p><pre>image: frontend:8f4c2d1</pre><p>Much safer and stable.</p><h3>Changes I Finally Applied</h3><p>I did multiple fixes together.</p><h3>1. Increased Initial Delay</h3><pre>initialDelaySeconds: 30</pre><p>This gave enough startup time.</p><h3>2. Added Startup Probe</h3><pre>startupProbe:<br>  httpGet:<br>    path: /health<br>    port: 3000<br>  failureThreshold: 30<br>  periodSeconds: 10</pre><p>This really helped.</p><h3>3. Increased Resource Limits</h3><pre>resources:<br>  requests:<br>    cpu: &quot;250m&quot;<br>    memory: &quot;512Mi&quot;<br>  limits:<br>    cpu: &quot;500m&quot;<br>    memory: &quot;1Gi&quot;</pre><h3>4. Improved Deployment Strategy</h3><p>I updated rolling deployment settings.</p><pre>strategy:<br>  type: RollingUpdate<br>  rollingUpdate:<br>    maxUnavailable: 0<br>    maxSurge: 1</pre><p>This reduced deployment downtime.</p><h3>After all these changes:</h3><ul><li>pod restarts stopped</li><li>deployments became stable</li><li>frontend became reliable</li><li>API downtime reduced</li><li>alerts reduced a lot</li></ul><blockquote>Production environment became much healthier.</blockquote><h4>The problem was not one big bug.</h4><p>It was combination of:</p><ul><li>aggressive health probes</li><li>low resource limits</li><li>slow startup during traffic spike</li><li>deployment tuning</li><li>image tagging practice</li></ul><p>After tuning all these properly, the platform became stable.</p><h3>One important thing I learned from this issue:</h3><p>Just because pod shows running does not mean everything is healthy.</p><p>Always check:</p><ul><li>restart count</li><li>events</li><li>probes</li><li>logs</li><li>resource usage</li></ul><p>Also, production behaves very differently compared to Dev/UAT.</p><p>Small configuration mistakes in Kubernetes can create big production problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baf423cc43f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing Istio: Why I Built Interactive Simulations for Traffic Management]]></title>
            <link>https://bala-kubelancer.medium.com/visualizing-istio-why-i-built-interactive-simulations-for-traffic-management-c366bb60b852?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c366bb60b852</guid>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Mon, 22 Dec 2025 15:07:49 GMT</pubDate>
            <atom:updated>2025-12-22T15:09:03.370Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cntFmNr0Ud5ymwm1YWz9AA.jpeg" /></figure><p>Moving beyond the terminal to master Blue/Green and Canary deployments in a Cloud-Native world.</p><h3>The “Black Box” Problem</h3><p>In the world of Kubernetes, Service Meshes like <strong>Istio</strong> are often treated as “magic.” We apply a VirtualService YAML, change a weight from 0 to 10, and trust that traffic is moving correctly behind the scenes.</p><p>But for many engineers, this remains a black box. When a Canary rollout fails or a Blue/Green switch causes a spike in 500 errors, the lack of <strong>visual intuition</strong> can lead to slow incident response times.</p><p>As the founder of <strong>Kubelancer</strong>, I’ve seen teams struggle with the “conceptual gap” of traffic shifting. Understanding the theory is one thing; seeing a packet hit a VirtualService and get routed to a specific pod version is another.</p><p>That’s why I decided to build <strong>Kubelancer Labs</strong> — a zero-setup, interactive playground to simulate Istio traffic logic.</p><h4>What can you do in the lab?</h4><p>You can visualize the traffic management</p><p>Blue/Green: Switch traffic instantly and practice emergency rollbacks.</p><p>Canary Rollouts: Incrementally shift traffic (10% → 50% → 100%) and watch the pods react.</p><p>Fault Simulation: Trigger “500 Errors” to see how Istio protects the user experience.</p><p>No terminal. No YAML. Just pure logic and visualization.</p><h4>Check it out live here:</h4><h4>👉 <a href="https://bala-kubelancer.github.io/kubelancer-labs-simulations/">https://bala-kubelancer.github.io/kubelancer-labs-simulations/</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c366bb60b852" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solution Architect! Art of Disaster Recovery (DR)]]></title>
            <link>https://bala-kubelancer.medium.com/solution-architect-art-of-disaster-recovery-dr-dc8a860f4e10?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc8a860f4e10</guid>
            <category><![CDATA[backup-and-restore]]></category>
            <category><![CDATA[disaster-recovery]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud-services]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Mon, 22 Dec 2025 11:57:01 GMT</pubDate>
            <atom:updated>2025-12-22T11:57:01.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wx_tEOyINsNH9D1mCzWLUQ.jpeg" /></figure><p>Ensuring Business Continuity in a Crisis. In today’s digital-first world, High Availability (HA) and Fault Tolerance (FT) are designed to keep applications up and running. But what if an entire region goes down due to a flood or a power grid outage, or other reasons?</p><p>This is where a Disaster Recovery (DR) strategy becomes critical for ensuring business continuity. A well-designed DR plan ensures sufficient resources are available in entirely different regions, countries, or even continents.</p><h3>RTO and RPO: The Foundation of DR Planning</h3><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>When planning DR, two key metrics must be defined:</strong><br>============================================<br>1. Recovery Time Objective (RTO): How much downtime a business can sustain without significant impact.</p><p>2. Recovery Point Objective (RPO): How much data loss a business can tolerate.</p><p>The design of RTO and RPO depends on business criticality.</p><p><strong><em>For example:</em></strong><br>A stock trading platform, railway system, or airline booking system cannot afford to lose a single data point.</p><h4><strong>DR Approaches:</strong><br>=============</h4><p>— <strong>Backup &amp; Restore:</strong></p><p>The least costly option with maximum RTO and RPO.<br>Application machine images and database snapshots should be stored in the DR site.<br>In the event of DR, systems are restored from backups.</p><p><strong>— Warm Standby:</strong></p><p>All application servers and databases exist in the DR site with low capacity.<br>Data is continuously synced from the primary.<br>In case of DR, services can be scaled up at the DR site.<br>Offers lower RTO and RPO compared to backup &amp; restore.</p><p><strong>— Multi-Site (Active-Active):</strong></p><p>Most advanced and resilient DR strategy.<br>Provides zero RTO and RPO.<br>Equal capacity is maintained at both sites.<br>Traffic is distributed across regions.<br>In case of failure, all traffic is routed locally without downtime.</p><p><strong>Final Thoughts:</strong><br>============<br>A robust Disaster Recovery plan is not just about technology — it’s about protecting your business, customers, and reputation. The choice between Backup &amp; Restore, Warm Standby, and Multi-Site depends on business needs, compliance, and cost.</p><p><strong>Ask yourself:</strong><br>============<br>How much downtime can your business afford? (RTO)<br>How much data loss can your business tolerate? (RPO)</p><h3>:) Happy Computing</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc8a860f4e10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which load balancer is best for microservices on AWS EKS?]]></title>
            <link>https://bala-kubelancer.medium.com/which-load-balancer-is-best-for-microservices-on-aws-eks-2c9f64b853eb?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c9f64b853eb</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Fri, 05 Dec 2025 05:56:10 GMT</pubDate>
            <atom:updated>2025-12-05T05:56:10.319Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLJollfy1IgkT9YqvRSS5Q.png" /></figure><h4>Short answer up front:</h4><p>* <strong>Use ALB</strong> (AWS Application Load Balancer) at the edge for almost all HTTP/HTTPS microservices workloads. <em>It gives host/path routing, TLS offload, WebACL/WAF, and better request-level features that microservices typically need.</em></p><p>* <strong>Use NLB</strong> only when you need true L4 passthrough, extremely low latency very high connection scale, UDP/TCP workloads, or when preserving source IP is critical and simpler setup is preferred.</p><p>*<strong> Hybrid (ALB at edge + internal NLB)</strong> is a great compromise when you need ALB features at the edge but want NLB performance for specific internal high-throughput services.</p><h4>Why microservices usually favour ALB ?</h4><p>Microservices architectures typically expose many small HTTP/HTTPS services, use host- and path-based routing (e.g., <a href="http://api.example.com/users">api.example.com/users</a>, <a href="http://api.example.com/payments">api.example.com/payments</a>), use TLS, and often require features like:</p><p>— per-host routing (virtual hosts)<br> — path-based routing and rewriting<br> — TLS termination with ACM and easy certificate management<br> — Web Application Firewall (WAF) protections at the edge<br> — HTTP features: websockets, HTTP/2, header manipulation, redirect rules<br>easy integration with Gateway API for Kubernetes-native routing<br><em>ALB provides all of these natively.</em></p><h4>When to pick NLB instead?</h4><p>Pick NLB when one of the following is true:</p><p>— Your services are TCP/UDP (non-HTTP) or need pure L4 passthrough. Examples: raw TCP proxies, some legacy protocols, high-volume TCP streaming.</p><p>— You need lowest possible latency and the highest concurrent connection scale (NLB is optimized for L4).</p><p>— You want simple Service annotation deployment without installing AWS Load Balancer Controller (fast setup).</p><p>— You want to preserve source client IP easily and reliably for backend services.</p><p>NLB is simpler for L4 and usually cheaper for pure throughput scenarios, but it lacks L7 routing and WAF.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c9f64b853eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Build Scalable, Secure, and Reliable Cloud Systems]]></title>
            <link>https://bala-kubelancer.medium.com/how-i-build-scalable-secure-and-reliable-cloud-systems-101af18edc21?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/101af18edc21</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-solution-architect]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Fri, 31 Oct 2025 12:33:15 GMT</pubDate>
            <atom:updated>2025-10-31T12:33:15.406Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c046O54TWqJo-5nr5AJ3dg.png" /></figure><p>Over the decades of working as a Cloud and DevOps Architect, I’ve realized that this role is not just about technology — it’s about building reliable, scalable, and secure systems that truly support business goals.</p><p>Today, organizations expect Cloud plus DevOps architects like us to balance innovation with practicality, design with delivery, and speed with stability.</p><p>Every design choice impacts how well a system performs, scales, and recovers — and how safe it keeps business data.</p><p>Some of the key habits I lean in every day professional life</p><h3>Try to understand the Business Problem, how to suit the right technology and tools</h3><p>Before choosing a tool or platform, I first try to understand the <em>why</em>.</p><p>Every technical decision — from infrastructure to automation — must align with business needs such as cost, scalability, and timelines.</p><p><em>As a Cloud Architect, my job is to provide solutions that solve real business problems while handling constraints like budget, compliance, and delivery schedules.</em></p><h3>Address Project Non-Functional Needs</h3><p>Beyond functionality, I always design for what’s <em>not visible</em> but <em>critical</em>:</p><ul><li><strong>Scalability</strong> — Can it grow seamlessly when demand spikes?</li><li><strong>High availability</strong> — Will it stay up if something fails?</li><li><strong>Performance</strong> — Does it respond fast under pressure?</li><li><strong>Security</strong> — Is data safe at every layer?</li><li><strong>Maintainability</strong> — Can teams manage it easily later?</li></ul><p><em>These non-functional aspects often define whether a system succeeds in the long run.</em></p><h3>Use Prototypes and Proofs of Concept (POCs)</h3><p>Before going full scale, I generally build prototypes to validate the design approach.</p><p><em>This helps me and my team identify risks early, test assumptions, and ensure we are choosing the right strategy before major investments are made.</em></p><h3>Don’t Just Build Systems, Also Mentor Teams</h3><p>Technology evolves fast, and so should the people behind it.</p><p><em>I work closely with developers, operations, and security engineers to ensure everyone understands the “why” behind design decisions &amp; how to maintain those systems post-launch.</em></p><h3>Balance Strategy and Operations</h3><p>Being an architect means thinking both long-term and day-to-day.</p><ul><li><strong>Strategic View:</strong> Create solutions that remain relevant as technology and business evolve.</li><li><strong>Operational View:</strong> Ensure today’s workloads run smoothly and handle current business challenges without issues.</li></ul><p><em>It’s this balance that turns architecture into value.</em></p><h3>Design with Compliance and Global Reach in Mind</h3><p>When deploying globally, every region comes with its own laws and compliance requirements.</p><p>Whether it’s <strong>PCI DSS</strong> for finance, <strong>HIPAA</strong> for healthcare, or <strong>ISO</strong> standards for manufacturing …many more, compliance has to be baked into design — not added later.</p><p>Plan for:</p><ul><li>Data locality and residency laws</li><li>Encryption (in transit and at rest)</li><li>Identity and access management (IAM)</li><li>Secure audit logging and traceability</li></ul><p><em>Compliance isn’t paperwork — it’s part of security architecture.</em></p><h3>Tighten the Security at Every Layer of infra</h3><p>Security is a continuous process, not a one-time setup.</p><p>I design with the principle of <strong>least privilege</strong>, and integrate security into every phase of development and operation.</p><p>Key practices I rely on:</p><ul><li>Enforce IAM roles and fine-grained permissions</li><li>Use secret managers and encrypted storage</li><li>Automate patching and vulnerability scanning</li><li>Implement Web Application Firewalls (WAF) and security groups</li><li>Enable audit logging, SIEM integration, and intrusion detection</li><li>Adopt shift-left security — embedding security checks in CI/CD</li></ul><p><em>Security must evolve with the application — not lag behind it.</em></p><h3>Automate Everything as much as Possible</h3><p>Automation is at the heart of both Cloud and DevOps practices.</p><p>Automation applies everywhere — infrastructure provisioning, deployments, testing, patching, and even security checks.</p><p>As a DevOps Architect, I ensure:</p><ul><li><strong>Infrastructure as Code (IaC)</strong> manages resources predictably.</li><li><strong>CI/CD pipelines</strong> are robust and reliable.</li><li><strong>Automated security scans</strong> and policy enforcement</li><li><strong>Automated rollback and self-healing</strong> mechanisms</li><li><strong>Monitoring and alerts</strong> automatically notify teams about issues or failures.</li></ul><p><em>It helps reduce human error, increase speed, and maintain consistency.</em></p><h3>Ensure End-to-End Monitoring and Observability</h3><p>A system you can’t see is a system you can’t trust.</p><p>I make sure every deployment includes:</p><ul><li><strong>Centralized logging</strong> (application + infrastructure)</li><li><strong>Metrics collection</strong> (CPU, memory, latency, request rate)</li><li><strong>Alerting and dashboards</strong> using tools like Prometheus, Grafana, and New Relic</li><li><strong>Distributed tracing</strong> for performance bottlenecks</li><li><strong>Synthetic monitoring</strong> for uptime and user experience</li></ul><p><em>Monitoring is the backbone of reliability — it helps teams act before customers notice issues.</em></p><h3>Keep an eye regularly on Cloud Cost Page</h3><p>Every solution has a cost — both upfront (CapEx) and ongoing (OpEx).</p><p><em>As part of my process, I provide clear cost estimations, help plan budgets, and continuously optimize infrastructure to reduce waste and improve efficiency.</em></p><h3>Design for Resilience and Disaster Recovery</h3><p>Downtime is never an option. From day one, I plan for failure.</p><p>Systems should recover automatically or gracefully during incidents.</p><p>I define:</p><ul><li><strong>RPO (Recovery Point Objective):</strong> How much data can we afford to lose?</li><li><strong>RTO (Recovery Time Objective):</strong> How fast can we recover?</li><li><strong>Backup and failover strategies</strong> across regions</li><li><strong>Testing DR drills</strong> regularly to validate recovery plans</li></ul><p>Because resilience isn’t proven in design — it’s proven in a disaster.</p><p>So plan for both <strong>RPO (Recovery Point Objective)</strong> and <strong>RTO (Recovery Time Objective)</strong> from day one.</p><p><em>That means preparing for data recovery, failover systems, and having tested backup strategies — ensuring the business stays operational even during outages.</em></p><h3>Continuously Optimize and Evolve</h3><p>Cloud technology changes daily.</p><p>I make it a habit to continuously explore new features from AWS, Azure, and GCP</p><p>— applying what fits best to improve cost, performance, and reliability.</p><p>— Continuous improvement isn’t just a technical habit — it’s a mindset.</p><p><em>Good architecture is invisible when it works, but invaluable when it fails.</em></p><h3>Happy Cloud Computing :)</h3><p><em>Thanks for reading!</em></p><p>Follow me on [LinkedIn] <a href="https://www.linkedin.com/in/bala-kubelancer/">https://www.linkedin.com/in/bala-kubelancer/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=101af18edc21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting credentials: exec: executable aws failed with exit code 255]]></title>
            <link>https://bala-kubelancer.medium.com/getting-credentials-exec-executable-aws-failed-with-exit-code-255-e0c15e8c081f?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0c15e8c081f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 15:56:14 GMT</pubDate>
            <atom:updated>2025-07-01T15:56:14.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bI5us0H7TVdGRgc-1MXP9Q.png" /></figure><p>Error: failed to create kubernetes rest client for read of resource: Get “https://xxxxxxx.gr7.us-east-1.eks.amazonaws.com/api?timeout=32s&quot;: getting credentials: exec: executable aws failed with exit code 255</p><p>Most Terraform users might have seen this 255 error. Suddenly, for some reason, Terraform will surprise us specifically in AWS.</p><p>Let’s <strong>break down exactly what’s happening</strong>:</p><p>The problem is mostly with Terraform; try using your local kubeconfig to connect to EKS.</p><p>What happened generally?</p><p>kubernetes/kubectl/helm provider execute aws eks get-token to get a short-lived authentication token, but it can’t get it due to a few reasons</p><p>No Kubernetes REST client could be created</p><ol><li>could be an issue on AWS credentials</li><li>If CI/CD, credential env not set correctly/wrongly</li><li>Your ~/.aws/config or ~/.aws/credentials is missing or invalid.</li></ol><p>Let’s Troubleshoot</p><p>Try this in your shell:</p><pre>aws eks get-token --cluster-name your-cluster-name</pre><p>If this fails, you’ll get a clearer error.</p><p>In my case, it worked. Next, I did If you’re using profiles, set:</p><pre>export AWS_PROFILE=your-profile</pre><p>export AWS_PROFILE=kubelancer-dev</p><p>which solved.</p><p>then try</p><pre>terraform plan<br>terraform apply</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0c15e8c081f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing AWS EKS with Karpenter: A Hybrid Instance Strategy]]></title>
            <link>https://bala-kubelancer.medium.com/optimizing-aws-eks-with-karpenter-a-hybrid-instance-strategy-5b7f9889b292?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b7f9889b292</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[autoscaling]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[karpenter]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 15:10:57 GMT</pubDate>
            <atom:updated>2025-02-24T15:10:57.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*AbM1f-rB7GULfHceKajtYg.png" /></figure><p>As Kubernetes adoption grows, so does the complexity of managing clusters efficiently. One common challenge is choosing the right EC2 instance types that balance performance, cost, and availability. Enter <strong>Karpenter</strong>, AWS’s open-source cluster autoscaler, designed to simplify and optimize Kubernetes infrastructure provisioning.</p><p>In this blog post, How Kubelancer, we implemented <strong>hybrid instance strategy</strong> using <strong>Karpenter</strong> on <strong>AWS EKS Cluster for our esteemed client</strong>, ton maximize performance while minimizing costs in production, if non-prod can think about spot fleet.</p><p><strong>Generally, Karpenter</strong> addresses these challenges:</p><p><strong>1. Rapid provisioning:</strong> Instantly launching nodes when needed.</p><p><strong>2. Cost optimization:</strong> Choosing the most cost-effective instance types.</p><p><strong>3. Workload-aware scaling:</strong> Allocating resources based on real-time workload requirements.</p><p><strong>4. Support for Spot Instances:</strong> Reducing costs further by leveraging EC2 Spot Instances.</p><blockquote><em>But how can we unlock its full potential? </em><strong><em>Hybrid instance strategies</em></strong><em> hold the key.</em></blockquote><h4>The Challenge: Cost vs. Performance in Kubernetes</h4><p>Kubernetes workloads vary in their resource requirements. Some applications are <strong>CPU-intensive</strong>, requiring high compute power, while others are <strong>memory-heavy</strong>, needing more RAM to function efficiently. If you stick to a single instance type, you may either:</p><ol><li><strong>Over-provision</strong> of resources, leading to <strong>wasted costs</strong>.</li><li><strong>Under-provision</strong> resources, resulting in <strong>performance issues</strong>.</li></ol><h4>Let us Understanding Hybrid Instance Strategies</h4><p>A <strong>hybrid instance strategy</strong> involves mixing different EC2 instance families based on workload needs. For example:</p><ul><li><strong>Compute-optimized instances (c7i.large):</strong> Ideal for CPU-heavy applications.</li><li><strong>General-purpose instances (m7i.large):</strong> Perfect for balanced workloads requiring a blend of CPU and memory.</li></ul><p>By blending these instances, you avoid over-provisioning and ensure that each workload gets precisely the resources it needs.</p><h4>Our Workload Analysis: (example 3 microservices)</h4><p>Imagine managing three critical microservices in an EKS cluster:</p><blockquote><strong><em>1. service-order</em></strong></blockquote><p><strong>CPU Usage:</strong> High (1819m per pod)</p><p><strong>Memory Usage:</strong> Low (~1.3 GiB per pod)</p><p><strong>Best Fit:</strong> c7i.large for compute efficiency.</p><blockquote><strong><em>2. service-user</em></strong></blockquote><p><strong>CPU Usage:</strong> Moderate (1830m per pod)</p><p><strong>Memory Usage:</strong> Moderate (~2.4 GiB per pod)</p><p><strong>Best Fit:</strong> c7i.large to optimize for CPU-bound processes.</p><blockquote><strong><em>3. service-search</em></strong></blockquote><p><strong>CPU Usage:</strong> High (1805m per pod)</p><p><strong>Memory Usage:</strong> Moderate (~3.7 GiB per pod)</p><p><strong>Best Fit:</strong> m7i.large for a balanced approach.</p><h4>Why did Kubelancer, chose the Hybrid Approach Works?</h4><p>By mixing <strong>c7i.large</strong> and <strong>m7i.large</strong> instances, we will:</p><ol><li><strong>Reduce Costs:</strong> Compute-optimized instances are cheaper for CPU-heavy tasks.</li><li><strong>Right-Size Resources:</strong> Memory-heavy applications get more memory-rich instances without wasting CPU capacity.</li><li><strong>Ensure High Availability:</strong> Multiple instance types provide fault tolerance and flexibility during provisioning.</li></ol><h4>Performance &amp; Cost Results</h4><p>After we implemented this hybrid strategy:</p><ul><li><strong>Resource Efficiency:</strong> Workloads are provisioned based on exact resource needs.</li><li><strong>Cost Savings:</strong> Reduced over-provisioning leads to lower monthly bills.</li><li><strong>Performance Gains:</strong> High CPU workloads get dedicated compute-optimized nodes.</li><li><strong>Flexibility:</strong> Karpenter’s dynamic scaling ensures adaptability to traffic spikes.</li></ul><h4>Karpenter, Every DevOps Engineer Infra Game Changer:</h4><p>After we implemented the Hybrid Instance Strategy for AWS EKS powered by Karpenter, it is a game-changer for our microservices cloud-native applications. we achieved cost savings, better resource utilisation, and enhanced performance.</p><p>N‍ext Blog, Let us see how to implement….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b7f9889b292" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Path Based - Simple Fanout Ingress on Kubernetes]]></title>
            <link>https://bala-kubelancer.medium.com/path-based-simple-fanout-ingress-on-kubernetes-055e87a43b45?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/055e87a43b45</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[path]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[nginx-ingress]]></category>
            <category><![CDATA[ingress]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 12:21:31 GMT</pubDate>
            <atom:updated>2025-01-10T12:21:31.119Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PS5MQde3-QEiZJhK.jpg" /></figure><h3>Simple fanout / Path Based Ingress - Demo</h3><p>Expose multiple services by using single IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KvV_R2OD4Glgj3yq.png" /></figure><h4>Create three deployment and services.</h4><pre>vi simplesite-deployment-services.yaml</pre><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: home-deployment<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: home<br>  template:<br>    metadata:<br>      labels:<br>        app: home<br>    spec:<br>      containers:<br>        - name: home-container<br>          image: kubelancer/simplehome:v1.0.0<br>          ports:<br>            - containerPort: 8080<br>          env:                  <br>            - name: HOME_SERVICE_URL<br>              value: &quot;http://home-service:8080&quot;<br>            - name: BLOG_SERVICE_URL<br>              value: &quot;http://blog-service:8081&quot;<br>            - name: SERVICES_SERVICE_URL<br>              value: &quot;http://services-service:8082&quot;<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: home-service<br>spec:<br>  selector:<br>    app: home<br>  ports:<br>    - protocol: TCP<br>      port: 8080<br>      targetPort: 8080<br>  type: ClusterIP<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: blog-deployment<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: blog<br>  template:<br>    metadata:<br>      labels:<br>        app: blog<br>    spec:<br>      containers:<br>        - name: blog-container<br>          image: kubelancer/simpleblog:v1.0.0<br>          ports:<br>            - containerPort: 8081<br>          env:<br>            - name: HOME_SERVICE_URL<br>              value: &quot;http://home-service:8080&quot;<br>            - name: BLOG_SERVICE_URL<br>              value: &quot;http://blog-service:8081&quot;<br>            - name: SERVICES_SERVICE_URL<br>              value: &quot;http://services-service:8082&quot;<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: blog-service<br>spec:<br>  selector:<br>    app: blog<br>  ports:<br>    - protocol: TCP<br>      port: 8081<br>      targetPort: 8081<br>  type: ClusterIP<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: services-deployment<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: services<br>  template:<br>    metadata:<br>      labels:<br>        app: services<br>    spec:<br>      containers:<br>        - name: services-container<br>          image: kubelancer/simpleservices:v1.0.0<br>          ports:<br>            - containerPort: 8082<br>          env:<br>            - name: HOME_SERVICE_URL<br>              value: &quot;http://home-service:8080&quot;<br>            - name: BLOG_SERVICE_URL<br>              value: &quot;http://blog-service:8081&quot;<br>            - name: SERVICES_SERVICE_URL<br>              value: &quot;http://services-service:8082&quot;<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: services-service<br>spec:<br>  selector:<br>    app: services<br>  ports:<br>    - protocol: TCP<br>      port: 8082<br>      targetPort: 8082<br>  type: ClusterIP</pre><ul><li>Apply the deployment and services</li></ul><pre>kubectl apply -f simplesite-deployment-services.yaml</pre><ul><li>List deployment,pods,svc</li></ul><pre>kubectl get deployment,pod,svc -o wide</pre><h3>Output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yPoTFoBcAttcNpHJ.png" /></figure><h3>Create ingress (path-based)</h3><pre>vi ingress-pathbased.yaml</pre><pre>---<br>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: ingress-pathbased<br>  namespace: default<br>spec:<br>  ingressClassName: nginx<br>  rules:<br>  - host: tify.kubelancer.com<br>    http:<br>      paths:<br>      - path: /<br>        pathType: Prefix<br>        backend:<br>          service:<br>            name: home-service<br>            port:<br>              number: 8080<br>      - path: /blog<br>        pathType: Prefix<br>        backend:<br>          service:<br>            name: blog-service<br>            port:<br>              number: 8081<br>      - path: /services<br>        pathType: Prefix<br>        backend:<br>          service:<br>            name: services-service<br>            port:<br>              number: 8082</pre><ul><li>Apply the ingress</li></ul><pre>kubectl apply -f ingress-pathbased.yaml</pre><ul><li>Get ingress</li></ul><pre>kubectl get ingress</pre><h3>Output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PRVRH9bd79af6iBQ.png" /></figure><h3>Validate</h3><p><strong>Home Page</strong></p><pre>curl -i  --resolve tify.kubelancer.com:80:192.168.10.0 tify.kubelancer.com</pre><p><strong>Blog Page</strong></p><pre>curl -i  --resolve tify.kubelancer.com:80:192.168.10.0 tify.kubelancer.com/blog</pre><p><strong>Services Page</strong></p><pre>curl -i  --resolve tify.kubelancer.com:80:192.168.10.0 tify.kubelancer.com/services</pre><h3>Output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YlaQIXatCVO1wFl6.png" /><figcaption>Home</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1LBy3kHoMo37NSDp.png" /><figcaption>Blog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sx01eIoGqGGWin5z.png" /><figcaption>Service</figcaption></figure><h3>Happy Computing :)</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=055e87a43b45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create AWS EKS Cluster — eksctl]]></title>
            <link>https://bala-kubelancer.medium.com/create-aws-eks-cluster-eksctl-d7f548da3b1b?source=rss-2ce6e2575b1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7f548da3b1b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[eksctl]]></category>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[create]]></category>
            <dc:creator><![CDATA[BalaSubramani K]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 12:18:39 GMT</pubDate>
            <atom:updated>2025-01-10T12:18:39.579Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create AWS EKS Cluster — eksctl</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8v3wYbI7g6dzqN5i.png" /></figure><p>Creating Kubenetes cluster in AWS have multiple options like using AWS SDK, Terraform, Cloudformation and easy and quick for new learner using AWS Console. In this blog we going see another well know method of creating AWS EKS cluster using “eksctl” command by using as YAML configuration in default VPC. ( Same can be create by CLI command).</p><h3>Let’s get start</h3><h3>Prerequisites:</h3><p>Let install these binary one by one</p><ol><li>AWS CLI</li><li>eksctl CLI</li><li>kubectl</li></ol><h3>Step 1. Install AWS CLI (Mac OS)</h3><h3>Download AWS CLI binary</h3><pre>curl &quot;https://awscli.amazonaws.com/AWSCLIV2.pkg&quot; -o &quot;AWSCLIV2.pkg&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*6J25ADnX888KRIdU" /></figure><h3>Install AWS CLI</h3><pre>sudo installer -pkg ./AWSCLIV2.pkg -target /</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*J6P6L-2OHpXfbtX5" /></figure><h3>Verify the installation</h3><pre>which aws<br>aws --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*yE2erRuy89kWl4rF" /></figure><h3>Step 2. Configure AWS CLI</h3><h4>Step 2.1. Login to AWS console as root user</h4><h4>Step 2.2. Create IAM user</h4><blockquote>username: kubedeveloper</blockquote><blockquote>No AWS console access, Only programmatic access</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*RHLvaEl4LgGfRTis" /><figcaption>Provide Username</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*y0XglW3siyhLWF-h" /><figcaption>Permission as per User Type</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*fz-rr7HCh2Qe0_PT" /></figure><h3>Create Access and SecretAccessKey</h3><h4>Step 2.3 Select the IAM user “kubedeveloper”</h4><h4>Step 2.4 Navigate to Security Credentials</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*W0FOS6LDMTBZfh_J" /></figure><h4>Step 2.5. Click Create access key</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*AZaS-aLEyZHx4rAT" /></figure><h4>Step 2.6 Select Use case :</h4><blockquote><strong>Command Line Interface (CLI) &amp; check the Confirmation</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*EsY2bE1Sk8lQZ-nq" /></figure><h4>Step 2.7. Set description tag — optional and Click create</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*2DVs1_r_ae4rSSoF" /></figure><blockquote>Now we got AccessKey and SecretAccessKey,</blockquote><h4>Next, Let configure AWS CLI on Mac OS command line</h4><p><em>Note: if multiple aws account configured, use — profile</em></p><pre>$ aws configure</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*UM7Vb_AAe_qqXXJ_" /></figure><h3>Validate AWS CLI Access</h3><p><strong>Run any aws command to list resources</strong></p><p><em>Here eg: To list s3 buckets on my AWS account</em></p><pre>bala@kubelancer Downloads % aws s3 ls</pre><h3>Getting output, which denoted AWS access has been configured correctly</h3><pre>bala@kubelancer Downloads % aws s3 ls<br>2022-12-13 21:36:02 firehose-backup-05bf6840</pre><h3>Install eksctl on Mac OS</h3><h3>To download the latest release, run on Mac OS (arm64 architecture):</h3><pre>curl -sLO &quot;https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_Darwin_arm64.tar.gz&quot;<br>tar -xzvf eksctl_Darwin_arm64.tar.gz<br>sudo mv ./eksctl /usr/local/bin</pre><p><em>Ref: </em><a href="https://www.weave.works/oss/eksctl/?ref=blog.kubelancer.com"><em>https://www.weave.works/oss/eksctl/</em></a></p><h3>Step 3: Creating an AWS EKS Kubernetes Cluster using eksctl tool</h3><h4>3.1. Create Cluster configuration yaml file</h4><pre>$ vi cluster-config.yaml</pre><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br><br>metadata:<br>  name: kubelancer-cluster-1<br>  region: us-east-1<br><br>nodeGroups:<br>  - name: ng-1<br>    instanceType: t4g.medium<br>    desiredCapacity: 2<br>    volumeSize: 20<br>    ssh:<br>      allow: false</pre><h4>3.2 Let’s create eks cluster on aws using eksctl command</h4><pre>$ eksctl create cluster -f cluster-config.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*bCHBjtkzz-9y-9zL.png" /><figcaption>Cluster created successfully</figcaption></figure><p><em>Note: if multiple aws account configured, use — profile</em></p><h3>Get the cluster name by using eksctl command</h3><p><em>eksctl interact with AWS API and get the required details from AWS cloud</em></p><pre>$ eksctl get cluster --profile kubedev</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*LdkIlcyQdjaZUq2B.png" /></figure><h3>Use the following command to get update kube-config.</h3><pre>$ aws eks update-kubeconfig --name=kubelancer-cluster-1 --region=us-east-1</pre><h3>Verify the Cluster</h3><pre>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*J5sncgvhxcyeRa4Q.png" /><figcaption>Cluster Node Status</figcaption></figure><h3>Delete Cluster</h3><pre>$ kubectl get poddisruptionbudget -A<br>$ kubectl delete poddisruptionbudget coredns -n kube-system<br>$ eksctl delete cluster -f cluster-config.yaml --profile kubedev</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*az4ZrnhDpIqJNMBZ.png" /></figure><h3>Happy Computing :)</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7f548da3b1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>