<?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 Rasanpreet on Medium]]></title>
        <description><![CDATA[Stories by Rasanpreet on Medium]]></description>
        <link>https://medium.com/@rasanpreet?source=rss-c9e3d24d14f7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j-T897PhTGuasVDN_WW0cg.png</url>
            <title>Stories by Rasanpreet on Medium</title>
            <link>https://medium.com/@rasanpreet?source=rss-c9e3d24d14f7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:29:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rasanpreet/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[Building an Enterprise AI Agent for Payment Platforms on AWS]]></title>
            <link>https://aws.plainenglish.io/building-an-enterprise-ai-agent-for-payment-platforms-on-aws-692d37ad23ba?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/692d37ad23ba</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[amazon-bedrock]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 23:38:48 GMT</pubDate>
            <atom:updated>2026-06-01T23:49:27.488Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Overview</strong></p><p>Payment platforms reside at the intersection of two demanding worlds:</p><p>1) Modern consumer expectations that can reach a near-millisecond time to completion.</p><p>2) Regulatory enforcement areas digging deep into your compliance under every pore. If customers can’t quickly confirm that a refund or disputed transaction has cleared, they must contact support for assistance. When support queues grow, customer satisfaction will fall as quickly as mid-cycle cancellations, increasing operational costs.</p><p>My friend’s fintech client had done the first thing. They created an AI-powered chatbot with a retrieval-augmented generation (RAG) system to answer queries about payment policies, fee schedules, and general account information. The foundation of the bot was strong — based in actual documents, built to avoid hallucination, and faster than human beings at providing common answers.</p><p>The challenge, however, was not coverage, but rather depth. Customers want to know not only what the refund policy is, but where their refunds are at this moment in time. They expect real-time answers based on real-time data. Because the bot was built primarily on static data, it could not provide real-time answers.</p><p>Transitioning from RAG-based chatbots to production-ready AI agents is an architectural shift and not simply a technical one. It requires orchestration, security, and operational discipline — which goes beyond better prompts.</p><p>The mandate was to transition from a question-and-answer chatbot to a complete enterprise AI agent capable of real-time payment and refund status retrieval, executing secure transactions against backend systems, and doing so mass-market efficiently with the required observability and security standards expected in the financial services sector.</p><p>With the application workloads hosted on Amazon ECS and the transactional data on Amazon RDS, while the platform infrastructure was already deployed on AWS, we intended for anything we built utilizing AI technologies to be seamlessly incorporated into the existing stack as opposed to replacing it. As a result, everything we developed for the architecture was done using AWS native primitives and anchored with the new agentic services provided by Amazon Bedrock.</p><p><strong>Solution</strong></p><p>The new design transforms the original RAG chatbot into an extensive agentic framework that distributes reasoning capabilities over multiple layers involved in rationalising user intent, determining which backend APIs to call upon, accessing real-time data, and returning a structured, appropriate response from each conversation, rather than just providing the user with relevant document retrieval and summaries.</p><p>The original RAG function of allowing policy look-ups remains; however, a secure tool calling mechanism has been implemented above this layer that provides for the payment APIs to provide read-only data from the RDS instance.</p><p>The architecture establishes a strict separation of concerns throughout its three layers. The User-facing Chat Application manages the user presentation and real-time communication. The API Gateway is at the perimeter of the system and enforces authentication and rate limits prior to any request being processed at agent run-time. The Bedrock AgentCore maintains the continuity of the user session and facilitates the execution of the orchestrated lifecycle. The Strands Agent framework executes the reasoning loop, determining when a policy document needs to be retrieved or when to call a payment API for information needed to generate the final response. The overlay of Claude (running on Bedrock) is used for both language comprehension and generation across all transactions processed by the agent framework.</p><p><strong>Design principle</strong></p><p>The agent will only be able to read data from the API, which means that the agent will be able to find out what payment status is, how long it takes to refund, and how much has been spent, but cannot create, update, or delete a transaction. This restriction exists at the gateway layer and is not just implemented via the prompt.</p><p>Under AgentCore, there is a dedicated gateway layer that restricts which tools the agent is allowed to invoke, logs all invocations for compliance audit trails, and manages the credential injection so that the model never has access to unencrypted API keys. The read-only API for payments is also run as ECS microservices as per the client’s current deployment model, and will query the RDS instance using parameterized, scope-limited database roles.</p><p><strong>Design Patterns</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0QP2ZNyRdEDavM3lReImQ.png" /></figure><p>The architecture layers map to a given AWS service or an open-source framework. It is important to understand how these components integrate in order to create and maintain these systems consistently and use them effectively.</p><p><strong>Amazon API Gateway-</strong> This is used to bring in all user requests to the system; it is responsible for validating JWTs, enabling per-user rate limiting, and routing the request to the AgentCore runtime.</p><p><strong>Amazon Bedrock AgentCore-</strong> This is the managed run time for an agent; it handles multi-turn session memory management, manages the reasoning loop, and provides built-in observability using CloudWatch.</p><p><strong>Strands Agent Framework-</strong> This is an open-source Python library for creating Bedrock agents; It defines a tool registry, defines a planning algorithm, and links the RAG knowledge base to the agent.</p><p><strong>Claude on Amazon Bedrock-</strong> This provides core language model capabilities with respect to intent classification, tool call planning, response generation, and multi-turn context retention.</p><p><strong>AgentCore Gateway-</strong> This is a security boundary between the model and the backend APIs; it provides tool-level permission enforcement, credentials injection, and structured audit logging to S3.</p><p><strong>ECS Payment APIs</strong>- These are read-only microservices that run against existing ECS clusters; they expose payment and refund status endpoints that are consumed by the agent through the AgentCore Gateway.</p><p><strong>Amazon RDS-</strong> serves as the definitive resource for all transactional data; it is accessed using read replicas and IAM roles that are scoped with restrictions that ensure no write access can happen through Agent Path.</p><p><strong>Bedrock Knowledge Bases-</strong> The Policy Documentation Index, as it relates to Methods Used in RAG, is contained in the Bedrock Knowledge Base; this is directly integrated into the definitions of tools used in Strands to maintain the initial chatbot functionality.</p><p><strong>Observability &amp; compliance</strong></p><p>Every time an Agent interacts with any one of these policies, evidence of that interaction is recorded as a structured trace to AWS X-Ray via the Bedrock AgentCore. As such, the original reasoning employed by the Agent to determine which tools are called in which order and what results are returned from those calls can be reconstructed for each conversation (and this means reconstructing the entire transaction essentially). Additionally, aggregate metric data (latency, tool invocation counts, and error rates) from these interactions will flow into CloudWatch Dashboards. Additionally, the AgentCore Gateway creates an immutable record of transactions that must be maintained to comply with regulations in the financial services industry. This record can be audited via the AgentCore Gateway and queried via AWS Athena for investigative or reporting purposes.</p><p><strong>Conclusion</strong></p><p>The leap from a RAG-based Chatbot to an enterprise AI agent that can run in production is much more than just a feature enhancement; it requires fundamentally rethinking how AI fits into operational systems and processes. The architecture defined in this document establishes that this transition can occur without discarding existing functionality, without introducing unacceptable risk to back-office systems, and without adding an operational workload that will put excessive strain on the team responsible for managing it.</p><p><strong>Benefits of This Architecture</strong></p><p>With the combination of a managed orchestration from Bedrock AgentCore, a composable tools system from the Strands framework, reasoning from Claude, and a well-defined gateway layer, the payment platform has an AI agent that is not only capable but also trustworthy. It will respond to the customer’s question: Where is my money? — with an answer based on live data and written in plain language without requiring human input.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=692d37ad23ba" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/building-an-enterprise-ai-agent-for-payment-platforms-on-aws-692d37ad23ba">Building an Enterprise AI Agent for Payment Platforms on AWS</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes-Native Observability on AWS EKS: A Complete Guide with Prometheus, Grafana &…]]></title>
            <link>https://aws.plainenglish.io/kubernetes-native-observability-on-aws-eks-a-complete-guide-with-prometheus-grafana-64107b135b33?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/64107b135b33</guid>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 02:19:40 GMT</pubDate>
            <atom:updated>2026-01-19T06:39:53.083Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes-Native Observability on AWS EKS: A Complete Guide with Prometheus, Grafana &amp; Alertmanager</h3><p>Kubernetes is now the standard for container orchestration in today’s cloud-native environment. However, the complexity of tracking and preserving visibility into application performance and infrastructure health increases exponentially as businesses scale their Amazon Elastic Kubernetes Service (EKS) deployments. Finding performance bottlenecks, resolving issues, and maximising resource utilisation become a guessing game rather than a data-driven process in the absence of effective <strong>observability</strong>.<br>The Kubernetes-native observability stack is a potent blend of <strong>Alertmanager</strong> for notifications, <strong>Grafana</strong> for visualisation, and <strong>Prometheus</strong> for metrics gathering. This trio forms the foundation of the industry standard for monitoring Kubernetes environments. When deployed on AWS EKS, this stack provides comprehensive insights across all layers of your infrastructure, from the underlying nodes to individual microservices.</p><p>In this comprehensive guide, I’ll walk you through building an <strong>observability stack</strong> on AWS EKS using the <strong>`kube-prometheus-stack`</strong> Helm chart, deployed entirely with Terraform.</p><p><strong>Why kube-prometheus-stack?</strong><br>You may be asking yourself, “Why not deploy Prometheus, Grafana, and Alertmanager separately?” before we begin.</p><p>The <strong>`kube-prometheus-stack`</strong> Helm chart is a **batteries-included** solution that provides:</p><ol><li>Integrated Components: Prometheus, Grafana, and Alertmanager are already set up to cooperate.<br>2. Prometheus Operator: Uses Kubernetes CRDs to manage Prometheus instances <br>3. Pre-built Dashboards: More than twenty Grafana dashboards that are ready for production<br>4. Automatic Service Discovery: ServiceMonitors find metrics endpoints on their own.<br>5. **Production-Ready Defaults**: Battle-tested configuration used by thousands of companies</li></ol><p><strong>Architecture Overview</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyniYK6zt-6j6IuLf8xVXQ.png" /></figure><p>The kube-prometheus-stack components work together to provide complete observability. The stack consists of several integrated components:</p><ul><li><strong>Prometheus Server:</strong> This time-series database uses a pull-based model to gather metrics. It scrapes metrics from configured targets at regular intervals, evaluates rule expressions, and can trigger alerts based on defined conditions. It provides a PromQL query interface.</li><li><strong>Grafana:</strong> A powerful visualisation platform that provides rich, customizable dashboards for the metrics stored in Prometheus. The kube-prometheus-stack comes pre-loaded with a comprehensive set of Kubernetes dashboards that provide immediate visibility into cluster health.</li><li><strong>Alertmanager:</strong> This part manages Prometheus alerts, grouping and directing them to pre-configured recipients such as email, Slack, or Amazon SNS.</li><li><strong>Prometheus Node Exporter (DaemonSet):</strong> It runs on every node and gathers hardware and operating system metrics from each cluster node, including CPU, memory, disk I/O, and network statistics.</li><li><strong>Prometheus Operator: </strong>It makes Prometheus instance deployment and configuration easier. It introduces Custom Resource Definitions (CRDs), making it easier to manage monitoring configurations as code.</li><li><strong>Kube State Metrics (KSM): </strong>This service creates metrics regarding the status of different Kubernetes objects, such as deployments, pods, nodes, and services, by listening to the Kubernetes API server.</li></ul><p><strong>Prerequisites</strong></p><p>Before installing the observability stack, ensure you have:<br>* An active AWS EKS cluster with worker nodes. Please refer to <strong>[</strong><a href="https://github.com/RasanKhalsa/tf-eks-managed-nodes.git"><strong>tf-eks-managed-nodes</strong></a><strong>]</strong><br>* kubectl is configured to communicate with your cluster<br>* Helm (v3 or later) and Terraform installed locally<br>* AWS CLI configured with appropriate credentials</p><p><strong>Implementation Steps</strong></p><p>Set up the kube-prometheus-stack with Helm charts using Terraform. I’ve developed a ready-to-use Terraform configuration that streamlines the Istio setup on an existing Amazon EKS cluster.<br>*GitHub Repository:*👉 <a href="https://github.com/RasanKhalsa/tf-eks-observability-stack-prometheus-grafana.git"><strong>[tf-eks-observability-stack-prometheus-grafana]</strong></a><br>Here’s our project structure:</p><pre>├── terraform/<br>│   ├── providers.tf<br>│   ├── variables.tf<br>│   ├── terraform.tfvars<br>│   ├── monitoring-namespace.tf <br>│   ├── kube-prometheus-stack.tf<br>│   ├── outputs.tf<br>│   └── values/<br>│       └── prometheus-stack-values.yaml<br>└── testing/<br>    ├── simple-app.yaml<br>    └── prometheus-rules.yaml<br>    ├── service-monitor.yaml<br>    ├── load-generator.yaml<br>    ├── stress-test.yaml</pre><p>Clone the repository locally using:</p><pre>git clone https://github.com/RasanKhalsa/tf-eks-observability-stack-prometheus-grafana.git</pre><p>Once the repository has been cloned, initialise Terraform and install Istio by following the instructions below.</p><pre>Edit terraform.tfvars with your values<br><br>TF Initialize and apply:<br>terraform init<br>terraform plan<br>terraform apply</pre><p>Verify the kube-prometheus-stack Installation and Access the Grafana dashboard. You’ll immediately see 20+ pre-built dashboards ready to use!</p><pre># Wait for all pods to be ready <br>kubectl get pods -n monitoring<br><br># Port-forward to Grafana<br>kubectl port-forward -n monitoring svc/kube-prometheus-stack-grafana 3000:80<br><br># Open browser to http://localhost:3000<br># Username: admin<br># Password: (from terraform.tfvars)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X49BXIFgxOhXJu8ouZpTkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-kwjqrTJcvImEFakByIGg.png" /></figure><p><strong>Testing the Setup: </strong>Now, we will launch a sample application, create some test loads on those workloads, and use Grafana dashboards to track CPU and memory spikes in real time.</p><pre># Deploy sample nginx application with metrics<br>kubectl apply -f testing/sample-app.yaml<br><br># Deploy ServiceMonitor for metrics collection<br>kubectl apply -f testing/service-monitor.yaml<br><br># Deploy Prometheus alerting rules<br>kubectl apply -f testing/prometheus-rules.yaml<br><br>#### Load Testing<br># Generate HTTP traffic<br>kubectl apply -f testing/load-generator.yaml<br><br># Monitor the job<br>kubectl get jobs -n sample-workloads -w<br><br># Trigger CPU and memory alerts<br>kubectl apply -f testing/stress-test.yaml<br><br># Watch pods<br>kubectl get pods -n sample-workloads -w</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*kgaM2KKaR4mFkLekDQVXAg.png" /></figure><p><strong>Now, validate Metrics in Grafana</strong></p><pre>1. Login to Grafana (http://localhost:3000)<br>2. Navigate to Dashboards<br>3. Pre-installed dashboards:<br>   - Kubernetes / Compute Resources / Cluster<br>   - Kubernetes / Compute Resources / Namespace (Pods)<br>   - Node Exporter / Nodes<br>   - Prometheus / Overview</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qXkpMf3YzHNNSeEojibqHQ.jpeg" /></figure><p>We can also import additional dashboards using the dashboard IDs from the <a href="https://grafana.com/grafana/dashboards/">Grafana Dashboards repository</a> or by importing JSON directly.</p><p><strong>Conclusion</strong><br>Building an observability platform on Kubernetes doesn’t have to be complex. The `kube-prometheus-stack` Helm chart provides a complete, integrated solution that you can deploy in 30 minutes.<br>By using Terraform, we’ve made the entire stack reproducible, version-controlled, and easy to manage. New applications are monitored without manual configuration, thanks to automatic service discovery. The built-in dashboards offer quick insights into the condition of your cluster.</p><p>The observability journey doesn’t end with deployment. Continuously refine your dashboards, adjust alert thresholds based on historical data, and expand monitoring coverage as your applications evolve.<br>For production deployments, implementing AWS best practices such as IRSA, Multi-AZ deployments, and Secrets Manager adds only 15% to the cost but provides enterprise-grade security and availability</p><p>**Found this helpful? Give it a clap 👏 and follow for more Kubernetes and AWS content!**</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64107b135b33" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/kubernetes-native-observability-on-aws-eks-a-complete-guide-with-prometheus-grafana-64107b135b33">Kubernetes-Native Observability on AWS EKS: A Complete Guide with Prometheus, Grafana &amp;…</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Istio Service Mesh on Amazon EKS: A Complete, Practical Guide]]></title>
            <link>https://aws.plainenglish.io/deploying-istio-service-mesh-on-amazon-eks-a-complete-practical-guide-187919770f0b?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/187919770f0b</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 19:47:39 GMT</pubDate>
            <atom:updated>2026-01-19T06:48:36.313Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong><br>Managing observability, security, and service-to-service communication in today’s microservices environment can become overwhelming. The complexity of controlling traffic routing, implementing security policies, and maintaining observability increases rapidly as applications expand from a few services to dozens or even hundreds.<br> <br> <strong>**Istio**</strong> is a powerful open-source service mesh that provides a unified approach to connecting, monitoring, and securing microservices, eliminating the need for modifications to your application code, from load balancing and routing to security and observability. I’ll show you how to install Istio on an existing Amazon EKS cluster and test Istio features with sample workloads in this in-depth tutorial.</p><p><strong>Istio: Architecture and Components</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vh-qqb6G9pnu-_xMW17xpQ.png" /></figure><p><strong>Istio Architecture: Control Plane and Data Plane</strong><br>Istio follows a clean separation between the control plane (the brain) and the data plane (the workers):</p><p><strong>Istio Core Components</strong></p><p><strong>1. Istio Base (CRDs)</strong> — The Foundation<br>The first component we install is Istio Base, which provides Custom Resource Definitions (CRDs). These are like teaching Kubernetes new vocabulary — words like “VirtualService,” “Gateway,” that Kubernetes didn’t understand before.</p><p><strong>2. Istiod</strong> — The Control Plane<br>Istiod is the consolidated control plane that combines three critical functions:<br>**Pilot (Traffic Management):** Discovers all services in your cluster<br>**Citadel (Security):** Acts as a Certificate Authority (CA)<br>**Galley (Configuration):** Validates Istio configuration before applying.</p><p><strong>3. Istio Ingress Gateway</strong> — The Front Door<br>All external traffic entering your mesh is managed by the Ingress Gateway, a specialized Envoy proxy. It is intricately linked with Istio’s traffic management features, in contrast to conventional ingress controllers.</p><p><strong>4. Istio CNI</strong> — The Network Plumber<br>Istio CNI enables networking for sidecar proxies without the need for privileged init containers. For settings where security is a concern, this is essential.</p><p><strong>Prerequisites</strong><br>Before we begin, you should have:<br>- An existing EKS cluster (we used version 1.32). Please refer to <strong>[</strong><a href="https://github.com/RasanKhalsa/tf-eks-managed-nodes.git"><strong>tf-eks-managed-nodes</strong></a><strong>]</strong><br>- Basic knowledge of Kubernetes<br>- Terraform installed<br>- kubectl configured to access your cluster</p><p><strong>The Solution: Deploying Istio on EKS with Terraform</strong></p><p><strong>Step 1</strong>: Infrastructure as Code Setup<br>I’ve developed a ready-to-use Terraform configuration that streamlines the Istio setup on an existing Amazon EKS cluster.</p><ul><li>*GitHub Repository:*👉 [<a href="https://github.com/RasanKhalsa/tf-istio-on-eks">tf-istio-on-eks</a>]</li></ul><p>Here’s our project structure:</p><pre>├── main.tf                          # Provider configuration<br>├── istio.tf                         # Istio components<br>├── variables.tf                     # Input variables<br>├── outputs.tf                       # Outputs<br>├── terraform.tfvars                 # Variable values<br>├── istio-ingressgateway.yaml        # Gateway manifest<br>├── sample-app-1.yaml                # Frontend application<br>├── sample-app-2.yaml                # Backend application<br>└── istio-testing.yaml               # Istio configurations</pre><p>Clone the repository locally using:</p><pre>git clone https://github.com/RasanKhalsa/tf-istio-on-eks.git</pre><p>Once the repository has been cloned, initialize Terraform and install Istio by following the instructions below.</p><pre>Edit terraform.tfvars with your values<br><br>TF Initialize and apply:<br>terraform init<br>terraform plan<br>terraform apply</pre><p>Verify Istio Installation</p><pre># Check Istio pods<br>kubectl get pods -n istio-system<br><br># Verify Istio injection is enabled<br>kubectl get namespace sample-apps --show-labels</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*KDMVnGExNe0xIdtM2ig1Kg.png" /></figure><p><strong>Step 2</strong>: Deploying Sample Applications<br>To demonstrate Istio’s capabilities, let’s deploy a simple frontend-backend app.</p><pre># Deploy frontend application<br>kubectl apply -f sample-app-1.yaml<br><br># Deploy backend application (v1 and v2)<br>kubectl apply -f sample-app-2.yaml<br><br># Verify sidecar injection<br>kubectl get pods -n sample-apps<br># You should see 2/2 containers per pod (app + envoy sidecar)</pre><p><strong>Step 3</strong>: Apply Istio Configuration</p><pre># Apply Gateway, VirtualServices, and DestinationRules<br>kubectl apply -f istio-testing.yaml<br><br># Verify configuration<br>kubectl get gateway,virtualservice,destinationrule -n sample-apps</pre><p><strong>Step 4</strong>: Testing Istio Features</p><pre>Test 1: Basic Connectivity<br># Test frontend service<br>curl http://$INGRESS_HOST/frontend<br>#$INGRESS_HOST = your AWS NLB DNS endpoint<br># Expected output: &quot;Frontend Service v1&quot;<br><br>Test 2: Service-to-Service Communication<br><br>kubectl exec -n sample-apps &lt;frontend pod name&gt; -c istio-proxy -- curl -s http://backend:8080<br># You&#39;ll see either v1 or v2 based on traffic split (90/10)<br><br>Test 3: mTLS Verification<br># Check if mTLS is enabled (Bash)<br>kubectl exec -n sample-apps &lt;frontend pod name&gt; -c istio-proxy -- ls -la /var/run/secrets/istio/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*y6DsInHcAbgQGxe397tkUg.jpeg" /></figure><p>This way, we have tested several Istio features, including Traffic Management, Service-to-Service Communication, and MTLS for Zero Trust networking. Plus, based on your needs, you test more like a circuit breaker, Blue-Green Deployment, distributed tracing, and many more.</p><p>Remember: Istio handles all this at the infrastructure level. Your application code stays clean and simple!</p><p><strong>Conclusion</strong><br>The way we handle our microservices was completely changed by deploying Istio on Amazon EKS. Traffic splitting, mTLS, and circuit breaking, which previously required significant changes to the application code, can now be implemented at the infrastructure level with straightforward YAML configurations.<br>Istio has a learning curve, but it’s a quick return on investment. It is revolutionary to be able to implement advanced traffic management, security, and observability without having to modify application code. Istio offers the framework for a scalable, secure, and observable microservices architecture, regardless of the number of services you run.</p><p>*Useful Links:**<br>- [EKS Best Practices](<a href="https://aws.github.io/aws-eks-best-practices/">https://aws.github.io/aws-eks-best-practices/</a>)<br>- [Istio GitHub Releases](<a href="https://github.com/istio/istio/releases">https://github.com/istio/istio/releases</a>)<br>- [AWS Istio Official Documentation](<a href="https://aws-ia.github.io/terraform-aws-eks-blueprints/patterns/istio/">https://aws-ia.github.io/terraform-aws-eks-blueprints/patterns/istio/</a>)<br>- [AWS Blog on Istio](<a href="https://aws.amazon.com/blogs/opensource/getting-started-with-istio-on-amazon-eks/">https://aws.amazon.com/blogs/opensource/getting-started-with-istio-on-amazon-eks/</a>)</p><p>Drop a comment below! I’d love to hear about your Istio journey and any challenges you’ve faced.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=187919770f0b" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/deploying-istio-service-mesh-on-amazon-eks-a-complete-practical-guide-187919770f0b">Deploying Istio Service Mesh on Amazon EKS: A Complete, Practical Guide</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Dynamic Workloads Scaling Using HPA, PDB, and Karpenter on Amazon EKS]]></title>
            <link>https://aws.plainenglish.io/kubernetes-dynamic-workloads-scaling-using-hpa-pdb-and-karpenter-on-amazon-eks-b03c5f373c9b?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b03c5f373c9b</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[horizontal-pod-scaling]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 05:38:09 GMT</pubDate>
            <atom:updated>2025-11-26T16:54:22.390Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern cloud-native architectures, applications face unpredictable traffic patterns. During off-peak hours, a payment processing system may handle 100 requests per second; however, during a flash sale, that number can abruptly increase to 10,000. Conventional static infrastructure either fails unexpectedly or wastes resources that aren’t being utilized.</p><p>At this point, Kubernetes auto-scaling becomes essential. With a strong tool like Karpenter, which masterfully manages cluster scaling, you may have already automated your node provisioning. However, what about workloads within the cluster? How do they adjust to variations in traffic?</p><p>The <strong>Horizontal Pod Autoscaler (HPA)</strong> and <strong>Pod Disruption Budgets (PDB</strong>), two essential Kubernetes concepts, come into play here. A built-in Kubernetes controller called the Horizontal Pod Autoscaler (HPA) uses observed CPU utilization (or other custom metrics) to automatically scale the number of pods in a deployment, replica set, or stateful set. As a safety measure, a Pod Disruption Budget (PDB) lets you define how many pods must always be available during voluntary disruptions. It guarantees that operational actions, such as node draining, do not result in application outages, but it does not protect against node failures.</p><p>In this blog post, we’ll explain these concepts and walk through the logical journey of implementing them on an existing Amazon EKS cluster. In this post, I’ll describe how to create and test an auto-scaling system on Amazon EKS that is ready for production and can manage two different workload tiers with varying SLA requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*fC8rjvgBCre9R1BmgrslcA.png" /></figure><p><strong>Business Requirements</strong>: Two different workload types with essentially distinct needs were present in our scenario:</p><p>***<strong>Critical Workload</strong> (Payment Processing)**<br>- Requires guaranteed availability and performance.<br>- Cannot tolerate disruptions during peak hours.<br>- Needs fast scaling response (under 30 seconds).<br>- Must maintain at least 80% capacity during maintenance.<br>- Willing to pay a premium for on-demand instances.</p><p>**<strong>Standard Workload </strong>(Background Analytics)**<br>- Cost-sensitive, can tolerate occasional delays.<br>- Acceptable to scale more gradually.<br>- Can survive with 50% capacity during disruptions.<br>- Prefers cost-effective on-demand instances for cost savings.<br>- Less stringent performance requirements.</p><p>The challenge was designing a system that could handle both workload types efficiently while maintaining their respective SLAs.</p><p><strong>Prerequisites</strong></p><p>· An existing EKS Cluster running: For setup, please refer to my GitHub repository: 👉 <a href="https://github.com/RasanKhalsa/tf-eks-managed-nodes"><strong>tf-eks-managed-nodes</strong></a>.<br>· Karpenter configured for scaling nodes: For setup, please refer to my GitHub repository 👉<strong> </strong><a href="https://github.com/RasanKhalsa/tf-karpenter-for-eks"><strong>tf-karpenter-for-eks</strong></a>.<br>· kubectl and awscli configured locally.<br>· Terraform installed.</p><p><strong>The Solution</strong></p><p><strong>Install Metrics Server (Required for HPA)</strong><br>It offers CPU and memory metrics; the Metrics Server is necessary for HPA to operate. I’ve developed a ready-to-use Terraform configuration that automates the Metrics Server setup on an existing Amazon EKS cluster</p><p>The full code is available in my GitHub repository: 👉 <a href="https://github.com/RasanKhalsa/tf-hpa-pdb"><strong>tf-hpa-pdb</strong></a><br><strong>Project layout: following directory structure</strong></p><pre><br>├── README.md                    # This documentation<br>├── terraform                    # Terraform code for setting up Metric server<br>├── critical-nodepool.yaml       # Critical workload NodePool<br>├── standard-nodepool.yaml       # Standard workload NodePool<br>├── critical-nodeclass.yaml      # Critical workload EC2NodeClass<br>├── standard-nodeclass.yaml      # Standard workload EC2NodeClass<br>├── critical-workload.yaml       # Critical workload deployment + service<br>├── standard-workload.yaml       # Standard workload deployment + service<br>├── critical-hpa.yaml           # Critical workload HPA configuration<br>├── standard-hpa.yaml           # Standard workload HPA configuration<br>├── critical-pdb.yaml           # Critical workload PDB configuration<br>├── standard-pdb.yaml           # Standard workload PDB configuration<br>└── generate-cpu-load.sh        # Load testing utilities</pre><p>Once you’ve cloned the repository, follow the remaining steps below to initialize Terraform and deploy Metrics Server</p><pre>cd terraform<br>cp terraform.tfvars.example terraform.tfvars<br># Edit terraform.tfvars with your cluster details<br>terraform init &amp;&amp; terraform apply</pre><p>Verify and Metrics Server</p><pre># Check Metrics Server<br>kubectl get pods -n kube-system -l app.kubernetes.io/name=metrics-server<br><br># Test metrics collection<br>kubectl top nodes<br>kubectl top pods</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*djMvWjuPKmmeAPcs9OHoOQ.png" /></figure><p><strong>Deploy Karpenter Resources</strong><br>Deploy NodePools and EC2NodeClasses first, as workloads depend on them for node scaling. All these required configuration files are available in the root directory of the repository.</p><pre># Deploy critical tier Karpenter resources<br>echo &quot;Deploying critical NodePool...&quot;<br>kubectl apply -f critical-nodepool.yaml<br><br>echo &quot;Deploying critical EC2NodeClass...&quot;<br>kubectl apply -f critical-nodeclass.yaml<br><br># Deploy standard tier Karpenter resources<br>echo &quot;Deploying standard NodePool...&quot;<br>kubectl apply -f standard-nodepool.yaml<br><br>echo &quot;Deploying standard EC2NodeClass...&quot;<br>kubectl apply -f standard-nodeclass.yaml<br><br># Verify deployment<br>echo &quot;Verifying Karpenter resources...&quot;<br>kubectl get nodepools<br>kubectl get ec2nodeclasses</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*kMs7cY1jT1qauydFoqNCsQ.png" /></figure><p><strong>Deploy Workloads:</strong> Deploy the critical and standard workloads that will trigger node provisioning.</p><pre># Deploy critical workload<br>echo &quot;Deploying critical workload...&quot;<br>kubectl apply -f critical-workload.yaml<br><br># Deploy standard workload<br>echo &quot;Deploying standard workload...&quot;<br>kubectl apply -f standard-workload.yaml<br><br># Verify workload deployment<br>kubectl get deployments<br>kubectl get pods -o wide</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KPQaw6t_SOrq3LDRe_VhkA.png" /></figure><p>You will see new EC2 instances for critical and standard workloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hChfdfav8NZsP6w1k7wI7w.png" /></figure><p><strong>Deploy HPA Configurations</strong></p><p>The most important realization is that HPA functions at the **application layer**. It simply recognizes that your app requires more capacity and generates more pods; it doesn’t give a damn about nodes or infrastructure.</p><p><strong>HPA config for our critical workloads</strong></p><pre>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: critical-workload-hpa<br>  labels:<br>    app: critical-workload<br>    workload-tier: critical<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: critical-workload<br>    <br>  minReplicas: 3<br>  maxReplicas: 10<br>  <br>  metrics:<br>    - type: Resource<br>      resource:<br>        name: cpu<br>        target:<br>          type: Utilization<br>          averageUtilization: 70<br>    - type: Resource<br>      resource:<br>        name: memory<br>        target:<br>          type: Utilization<br>          averageUtilization: 75<br>          <br>  behavior:<br>    scaleUp:<br>      stabilizationWindowSeconds: 30<br>      policies:<br>        - type: Percent<br>          value: 100<br>          periodSeconds: 30<br>        - type: Pods<br>          value: 2<br>          periodSeconds: 30<br>      selectPolicy: Max<br>      <br>    scaleDown:<br>      stabilizationWindowSeconds: 300<br>      policies:<br>        - type: Percent<br>          value: 10<br>          periodSeconds: 60<br>        - type: Pods<br>          value: 1<br>          periodSeconds: 60<br>      selectPolicy: Min</pre><p>**<strong>HPA Configuration Parameters</strong>**<br>Scale Target Reference — Connecting to deployments<br>Replica Boundaries — minReplicas and maxReplicas decision making<br>Metrics Configuration — CPU vs Memory, target utilization calculations<br>Scaling Behavior — Scale-up policies, stabilization windows<br>Scale Down Behavior — Why it’s different, preventing flapping</p><p>Next, apply the HPA configs for both critical and standard workloads</p><pre># Deploy HPA for critical workload<br>echo &quot;Deploying critical workload HPA...&quot;<br>kubectl apply -f critical-hpa.yaml<br><br># Deploy HPA for standard workload<br>echo &quot;Deploying standard workload HPA...&quot;<br>kubectl apply -f standard-hpa.yaml<br><br># Verify HPA deployment<br>kubectl get hpa<br>kubectl describe hpa critical-workload-hpa<br>kubectl describe hpa standard-workload-hpa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eVBeNggBlXRT8yi8S78gpQ.png" /></figure><p><strong>Deploy PDB Configurations</strong></p><p>PDB serves as your disruption insurance policy. “No matter what maintenance you’re doing, always keep at least X pods running,” it instructs Kubernetes. Here’s the crucial distinction: PDB only guards against **voluntary disruptions**, which are prearranged occurrences such as Karpenter consolidation, cluster upgrades, or node drains. It is unable to force deletions or stop hardware malfunctions.</p><p>**<strong>PDB Configuration Parameters</strong>**<br>Minimum Available — Absolute vs percentage, the math behind it<br>Maximum Unavailable — Alternative approach<br>Selector — Critical importance of exact matching<br>Unhealthy Pod Eviction Policy — AlwaysAllow vs IfHealthyBudget</p><p>Apply the PDB configs for both critical and standard workloads.</p><pre># Deploy PDB for critical workload<br>echo &quot;Deploying critical workload PDB...&quot;<br>kubectl apply -f critical-pdb.yaml<br><br># Deploy PDB for standard workload<br>echo &quot;Deploying standard workload PDB...&quot;<br>kubectl apply -f standard-pdb.yaml<br><br># Verify PDB deployment<br>kubectl get pdb<br>kubectl describe pdb critical-workload-pdb<br>kubectl describe pdb standard-workload-pdb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*pHRwIx_EZFZUoULcGTF3KA.png" /></figure><p><strong>Testing HPA scaling behavior:</strong> Starting CPU load test for critical workload.</p><p>You can simulate a CPU load test by running the following command while logging into the critical workload pods.</p><pre>kubectl exec &lt;pod name&gt; -- sh -c &quot;timeout 300 sh -c &#39;while true; do :; done&#39; &amp;&quot; ; echo &quot;CPU stress started in critical pod&quot;</pre><p>This simple loop forced pods to consume CPU, triggering HPA scaling. Within seconds, we will see:</p><p>- CPU usage jumped to 100%<br>- HPA detected the threshold breach<br>- New pods were created.</p><p>You can review results with the following commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CZWEGb7GrXtj2GsITRQjA.png" /></figure><p>A scale-down event will appear after our load test is finished. Before scaling down, HPA employs a **stabilization window**, which in our case is five minutes. This avoids “flapping,” which is the term for cycles of rapid scale-up and scale-down that waste resources and lead to instability. For a few minutes, you pay more for more capacity, but you get stability and don’t thrash.</p><p><strong>Conclusion: Building a Self-Healing, Resilient System</strong></p><p>By combining Karpenter for infrastructure elasticity, the Metrics Server for observability, HPA for workload elasticity, and PDB for operational safety, we were able to build a strong, self-regulating system on EKS. The most significant insight is that these are not isolated systems, but rather complexly interconnected ones.</p><p>To get this right, a lot of testing, careful configuration, and understanding of the trade-offs between cost, performance, and availability are required. However, when properly implemented, the holy trinity of cloud-native operations is a system that optimizes costs, maintains high availability, and automatically adapts to demand.</p><p>For more information about Kubernetes automation and best practices, please get in touch with me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b03c5f373c9b" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/kubernetes-dynamic-workloads-scaling-using-hpa-pdb-and-karpenter-on-amazon-eks-b03c5f373c9b">Kubernetes Dynamic Workloads Scaling Using HPA, PDB, and Karpenter on Amazon EKS</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supercharge Your EKS Cluster: Automate Scaling with Karpenter, Helm, and Terraform]]></title>
            <link>https://aws.plainenglish.io/supercharge-your-eks-cluster-automate-scaling-with-karpenter-helm-and-terraform-e76dc07cb19f?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e76dc07cb19f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[karpenter]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 03:17:40 GMT</pubDate>
            <atom:updated>2025-11-09T15:06:01.712Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re using Amazon EKS for workloads, you’ve probably encountered the difficulty of effectively adapting your cluster capacity to the constantly shifting needs of your applications. Although it works, the native <strong>Cluster Autoscaler</strong> often appears to be a blunt tool due to its slow reaction time and limited provisioning flexibility.</p><p>What if your cluster could provision the exact compute resources your pods require in a matter of seconds rather than minutes, depending on their actual needs? <strong>Karpenter</strong> comes in.</p><p>In this guide, we’ll walk you through <strong>setting up Karpenter on an existing EKS cluster</strong> that already utilizes <strong>Managed Node Groups</strong>, using <strong>Terraform</strong> and <strong>Helm</strong>. Additionally, you will learn the fundamental ideas of <strong>EC2NodeClass</strong> and <strong>NodePool</strong>, which are essential to Karpenter’s dynamic node provisioning and management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*5xJHxVxPbYj1ZGOpWQbwUA.png" /></figure><p><strong>Architecture Overview</strong></p><p>How It Works- Before we dive in, let’s understand how Karpenter fits into your EKS architecture.</p><ol><li>A pod is made that can’t be scheduled onto any node that already exists (for example, because of a lack of CPU or memory).</li><li>The pod is marked as “unschedulable” by the Kubernetes scheduler.</li><li>Karpenter detects this pod.</li><li>Karpenter determines the optimal EC2 instance or instances to launch by analyzing the pod’s requirements (resource requests, node selectors, affinities, and tolerances).</li><li>To provision the additional node or nodes, Karpenter makes a direct API call to AWS (EC2 Fleet). It uses the IAM permissions that we will give it to accomplish this.</li><li>After booting up, the newly created EC2 instance joins the EKS cluster and registers as a node.</li><li>The pending pod is now deployed to the freshly prepared node by the Kubernetes scheduler.</li><li>To cut down on waste, Karpenter gracefully drains and terminates nodes that are not being used.</li></ol><p>The Cluster Autoscaler, on the other hand, is limited to modifying the size of pre-established Auto Scaling Groups (ASGs).</p><p><strong>Prerequisites</strong></p><p>Before you begin, ensure you have the following:</p><ul><li>An <strong>existing EKS Cluster </strong>(v1.32+ recommended) created with a base <strong>Managed Node Group</strong> to host the Karpenter controller. Plus, <strong>OIDC provider</strong> is enabled for your EKS cluster. For setup, please refer to my GitHub repository: 👉 <a href="https://github.com/RasanKhalsa/tf-eks-managed-nodes"><strong>tf-eks-managed-nodes</strong></a>.</li><li><strong>kubectl</strong> and <strong>Helm</strong> are configured to access your cluster.</li><li>The <strong>AWS CLI</strong> is configured with credentials that have permission to manage EKS and EC2 resources.</li><li><strong>Terraform</strong> (v1.5+) installed.</li></ul><p><strong>Step-by-Step Setup Guide:</strong> <strong>Deploying Karpenter, NodePool, and EC2NodeClass CRDs with Terraform</strong></p><p><strong>Clone the Terraform Code Repository</strong></p><p>I’ve created a ready-to-use Terraform configuration that automates the Karpenter setup on an existing Amazon EKS cluster, streamlining the setup process.</p><p>The full code is available in my GitHub repository: 👉 <a href="https://github.com/RasanKhalsa/tf-karpenter-for-eks"><strong>tf-karpenter-for-eks</strong></a></p><p><strong>Project layout: following directory structure</strong></p><pre><br>karpenter-eks/<br>├── main.tf                   # karpenter Security Groups<br>├── karpenter.tf              # Karpenter installation<br>├── iam.tf                    # IAM roles and policies<br>├── data.tf                   # Data sources<br>├── variables.tf              # Input variables<br>├── outputs.tf                # Output values<br>├── provider.tf               # Provider configuration<br>├── karpenter-kubectl-resources.tf    # NodePool and EC2NodeClass CRDs<br>├── aws-auth-patch.yaml               # update aws-auth ConfigMap to allow Karpenter IAM role<br>└── test-deployment-karpenter.yaml    # Test workload</pre><p>Clone the repository locally using:</p><pre>git clone https://github.com/RasanKhalsa/tf-karpenter-for-eks.git</pre><p>Once you’ve cloned the repository, follow the remaining steps below to initialize Terraform and deploy Karpenter.</p><pre>Edit terraform.tfvars with your values<br><br>TF Initialize and apply:<br>terraform init<br>terraform plan<br>terraform apply</pre><p>Verify Karpenter is running</p><pre>kubectl get pods -n karpenter<br>kubectl get nodepool<br>kubectl get ec2nodeclass</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*4_uG_67HEyMbsXtAEodHYA.png" /></figure><p>Next, apply Karpenter IAM role mapping in the EKS cluster’s `aws-auth` ConfigMap by updating your AWS account number.</p><pre>kubectl apply -f aws-auth-patch.yaml</pre><p><strong>Test the Autoscaling with Sample Workload</strong></p><p>Deploy a test application to trigger new node provisioning:</p><pre># Deploy test workload<br>kubectl apply -f test-deployment-karpenter.yaml<br><br># Watch node provisioning<br>kubectl get nodes # New Node will be listed<br>kubectl get node &lt;NAME&gt; --show-labels | grep &quot;workload-type&quot;<br>kubectl get pods -o wide # test workloads will be placed on new node</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8AP0FaC_cJvBQnWx1-JlQ.png" /></figure><p>Karpenter will automatically launch an EC2 instance with the required tags to meet the demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aX6ZS97cyi7S3bB-KveFcg.png" /></figure><p>Fast scaling in response to real-time application load is made possible by this dynamic node provisioning model.</p><p><strong>Key Concepts: NodePool and EC2NodeClass</strong></p><p>Two main Kubernetes Custom Resource Definitions (CRDs) that you use to specify Karpenter’s behavior after it has been installed.</p><p><strong>NodePool:</strong> A Karpenter Custom Resource (CRD) which specifies the types of workloads that a node group should manage, as well as the methods for controlling scaling. Consider it a Dynamic Managed Node Group.<br>“What kinds of instances are permitted? Should we Use On-Demand or Spot? What are the resource limitations of the node?</p><p><strong>Key Specs:</strong></p><p>* template.spec.requirements: A collection of node selector specifications, including architecture, zone, instance type, and capacity type (Spot/On-Demand).</p><p>* disruption: Policies for when to expire and drain nodes.</p><p>* limits: Prevents Karpenter from allocating more resources than a specific threshold (eg, CPU: 1000).</p><p><strong>Example NodePool:</strong></p><pre>apiVersion: karpenter.sh/v1<br>kind: NodePool<br>metadata:<br>  name: default<br>spec:<br>  template:<br>    metadata:<br>      labels:<br>        workload-type: karpenter-managed<br>    spec:<br>      requirements:<br>        - key: kubernetes.io/arch<br>          operator: In<br>          values: [&quot;amd64&quot;]<br>        - key: kubernetes.io/os<br>          operator: In<br>          values: [&quot;linux&quot;]<br>        - key: karpenter.sh/capacity-type<br>          operator: In<br>          values: [&quot;on-demand&quot;]<br>        - key: node.kubernetes.io/instance-type<br>          operator: In<br>          values: [&quot;t3.medium&quot;, &quot;t3.large&quot;, &quot;t3.xlarge&quot;]<br>      nodeClassRef:<br>        group: karpenter.k8s.aws<br>        kind: EC2NodeClass<br>        name: default<br>      expireAfter: 30m<br>      taints: []<br>  limits:<br>    cpu: 1000<br>  disruption:<br>    consolidationPolicy: WhenEmptyOrUnderutilized<br>    consolidateAfter: 30s</pre><p><strong>EC2NodeClass: </strong>It specifies the identity and setup of the nodes that will be launched, i.e., configurations for EC2 instances, such as subnets, security groups, and AMIs.</p><p><strong>Key Specs:</strong></p><p>* amiFamily: Pick between Ubuntu, Bottlerocket, or AL2. This determines the base OS.<br>* role: (the Karpenter Node IAM Role that we developed).<br>* subnetSelectorTerms &amp; securityGroupSelectorTerms: Karpenter uses tags to dynamically discover which subnets and security groups to use for new nodes. This is incredibly powerful as you don’t need to hardcode IDs.</p><p><strong>Example EC2NodeClass</strong></p><pre>apiVersion: karpenter.k8s.aws/v1beta1<br>kind: EC2NodeClass<br>metadata:<br>  name: default<br>spec:<br>  amiFamily: AL2<br>  subnetSelectorTerms:<br>    - tags:<br>        karpenter.sh/discovery: &quot;karpenter-eks-cluster&quot;<br>        kubernetes.io/role/internal-elb: &quot;1&quot;<br>  securityGroupSelectorTerms:<br>    - tags:<br>        karpenter.sh/discovery: &quot;karpenter-eks-cluster&quot;<br>  role: &quot;KarpenterNodeInstanceProfile-karpenter-eks-cluster&quot;<br>  tags:<br>    karpenter.sh/cluster: &quot;karpenter-eks-cluster&quot;<br>    Name: &quot;karpenter-eks-cluster-karpenter-node&quot;</pre><p><strong>Conclusion</strong><br>You’ve switched from a static, node-group-centric scaling model to a dynamic, pod-driven one by installing Karpenter. You are no longer speculating about the number of nodes or instance types you will require. Karpenter manages this in real-time, resulting in a cluster that is more responsive, resilient, and economical.<br>The operational logic and Terraform for the core AWS resources offer a clear and effective division of responsibilities. Your EKS cluster is self-optimizing and production-ready with this configuration, guaranteeing economical resource use.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e76dc07cb19f" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/supercharge-your-eks-cluster-automate-scaling-with-karpenter-helm-and-terraform-e76dc07cb19f">Supercharge Your EKS Cluster: Automate Scaling with Karpenter, Helm, and Terraform</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitOps Made Easy: Automate Kubernetes Deployments with Argo CD on AWS EKS]]></title>
            <link>https://aws.plainenglish.io/gitops-made-easy-automate-kubernetes-deployments-with-argo-cd-on-aws-eks-02dbd37b4a0b?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/02dbd37b4a0b</guid>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 04:49:38 GMT</pubDate>
            <atom:updated>2025-09-10T04:59:30.034Z</atom:updated>
            <content:encoded><![CDATA[<p>As deployments have become faster in the world of DevOps today, while maintaining reliability, automation is necessary. We have seen GitOps becoming increasingly popular, which aligns with the principle of making Git a single source of truth for deploying both infrastructure and applications. Argo CD is a declarative GitOps tool for Kubernetes that makes continuous delivery straightforward by syncing live applications with their target state declared in git.</p><p>Here’s what you’ll explore in this blog:</p><ul><li>Argo CD Installation On AWS EKS Cluster/Existing Cluster</li><li>Synchronize from a GitHub repository with Kubernetes manifests</li><li>Deploy the application to the same EKS cluster using Argo CD.</li></ul><p>By the end, you’ll have a fully automated GitOps pipeline ensuring seamless deployments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqWZcoA4jbSn3B5ua1DGtA.png" /></figure><h3>Prerequisites</h3><p>Before we begin, ensure you have:<br>✔ An AWS EKS cluster is standing up. To set up, please click this <a href="https://medium.com/@rasanpreet/amazon-kubernetes-eks-auto-mode-with-terraform-878f75e94e13">link</a><br>✔ kubectl configured to interact with an EKS cluster.<br>✔ Helm installed (this is used for the Argo CD deployment).<br>✔ A GitHub repo with k8s manifests (yaml files). You can refer to my GitHub project <a href="https://github.com/RasanKhalsa/flask-hello-world.git">link</a></p><h3>Step 1: Installing Argo CD on AWS EKS</h3><p>Argocd can be installed using Helm or by kubectl. For simplicity&#39;s sake, let&#39;s use Helm here. Create the Argo CD Helm Repository</p><h4>Add the Argo CD Helm Repository</h4><pre>helm repo add argo https://argoproj.github.io/argo-helm<br>helm repo update</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*mTHjGL5NqUeT9nZmdoXVwg.png" /></figure><h4>Install Argo CD in the argocd Namespace</h4><pre>kubectl create namespace argocd<br>helm install argocd argo/argo-cd --namespace argocd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*yfEhuPJWgJdQicNQogYMsA.png" /></figure><h4>Verify Installation</h4><p>Check if all argocd pods are running:</p><pre>kubectl get pods -n argocd</pre><p>Expected output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*25aGCbchowfCLRPRGCVaFg.png" /></figure><h4>Access Argo CD UI</h4><p>Argo CD runs on a ClusterIP service (default). To access it, expose the service type to LoadBalancer (Permanent Access) from the browser</p><pre>kubectl patch svc argocd-server -n argocd -p &#39;{&quot;spec&quot;: {&quot;type&quot;: &quot;LoadBalancer&quot;}}&#39;</pre><p>Get the LoadBalancer URL to access Argo CD UI:</p><pre>kubectl get svc argocd-server -n argocd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_zAt9SBwKUOkmDTrdb0wQ.png" /></figure><p>Log in with the default credentials:</p><ul><li>Username: admin</li><li>Password: Retrieve with the following command:</li></ul><pre>kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=&quot;{.data.password}&quot; | base64 -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lb0vRtgZDNXabV8KJ9IE5A.png" /></figure><h3>Step 2: Configuring GitHub Sync with Argo CD</h3><p>Argo CD continuously monitors a Git repository and ensures the cluster matches the desired state.</p><h4>Connect Argo CD to Your GitHub Repo</h4><ul><li>Go to Argo CD UI → “New App”.</li><li>Fill in the details:</li><li>Application Name: app-name</li><li>Project: default</li><li>Sync Policy: Automatic</li><li>Repository URL: <a href="https://github.com/your-username/your-repo.git">https://github.com/your-username/your-repo.git</a></li><li>Path: /k8 (path to Kubernetes YAML files)</li><li>Cluster: https://kubernetes.default.svc (same cluster)</li><li>Namespace: default</li></ul><h4>Click “Create.”</h4><p>Argo CD will detect the Kubernetes manifests and deploy them automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*YhtsiHXo5LEGZppZIlyttw.jpeg" /></figure><h4>Verify Sync Status</h4><p>Check the “Applications” tab in Argo CD UI. If synced, you’ll see status:<br>✅ Synced (Green)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*eAzOYWqSuyFEs9Alwoq2Sw.png" /></figure><h4>Argo CD Auto-Syncs Changes and Verifies Deployment</h4><p>Since we enabled Auto-Sync, Argo CD will detect the new manifest and deploy it, then verify the deployment</p><pre>kubectl get pods</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*diOAKm8TxEkL0KNvR1aOuw.png" /></figure><h3>Step 3: Watch the Magic: GitOps in Action</h3><p>After that, Argo CD discovers it applies the manifests to your EKS cluster for you. An automatic sync is performed every time any changes are pushed to the GitHub repo in real time and updates the resources accordingly.</p><p>Verify this by going to the Argo CD UI, and then you can find the status and health of the application.</p><h3>Installing Argo CD CLI and Server on AWS EKS</h3><h4>Install Argo CD CLI</h4><p>The tool enables you to manage, configure, and interact with Argo CD applications and resources via your terminal. First thing you need to do is to install the Argo CD CLI tool, which will be used to communicate with Argo CD.</p><pre>curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64<br>sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd<br>rm argocd-linux-amd64</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2recx4UcqHaJsszV6aWQTQ.png" /></figure><p>Log in via CLI:</p><pre>argocd login &lt;Argocd URL&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lo9KLoBknMa9qvePsqJkrg.png" /></figure><p>Verify Connection &amp; List applications:</p><pre>argocd app list<br>argocd app get &lt;app name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdSBipHZf9VcARa3Jh0y0A.png" /></figure><h3>Conclusion</h3><p>That’s it — you have a whole GitOps pipeline already implemented with Argo CD on AWS EKS. It gives you traceability, repeatability, and automated sync by managing deployments through git practically. This will not only increase the development speed, but also help in reducing human error by maintaining source controls as the single truth.</p><p>This setup allows for smooth Continuous Delivery, thus reducing human errors and making deployments faster.</p><p>Get the GitOps train rolling today and accelerate those predictable Kubernetes releases! Do you have experience with Argo CD? Share in the comments! 👇</p><p>#DevOps #GitOps #Kubernetes #ArgoCD #AWSEKS #ContinuousDelivery #CloudComputing</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02dbd37b4a0b" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/gitops-made-easy-automate-kubernetes-deployments-with-argo-cd-on-aws-eks-02dbd37b4a0b">GitOps Made Easy: Automate Kubernetes Deployments with Argo CD on AWS EKS</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration with GitHub Actions and Dynamic Kubernetes Manifest Updates]]></title>
            <link>https://aws.plainenglish.io/continuous-integration-with-github-actions-and-dynamic-kubernetes-manifest-updates-703e60a7f3eb?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/703e60a7f3eb</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 04:44:25 GMT</pubDate>
            <atom:updated>2025-08-07T00:07:38.091Z</atom:updated>
            <content:encoded><![CDATA[<p>Automation is crucial to delivering software quickly, reliably, and consistently in modern DevOps workflows. Perhaps the most potent way to do this is through Continuous Integration (CI), wherein every change made in your codebase is automatically tested, checked for quality of code, built, and prepared for deployment.</p><p>This blog post will help walk you through how to create an end-to-end CI pipeline using <strong>GitHub Actions</strong> with a specific focus on continuously updating <strong>Kubernetes manifests</strong> as well, so that your apps always carry the most recent container image. Let us take an illustrative example demonstrated in a simple <strong>‘Hello World’</strong> Flask app.</p><p>Whether you’re new to CI/CD or need to update your current processes, this guide will let you streamline your development-to-deployment pipeline with familiar tools such as <strong>GitHub, Docker</strong>, and <strong>Kubernetes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IF-ZSHeAd-UdwpPZBVQ-A.png" /></figure><h4>Understanding the CI Stages</h4><p>These are some of the basic stages covered in a typical CI pipeline:</p><ol><li><strong>Commit Stage:</strong> This is when code gets pushed to the repository.</li><li><strong>Build Stage:</strong> This stage compiles source code using defined settings and produces deployable artifacts, all of which are backed up by specified test cases for downstream consumers to verify against.</li><li><strong>Code quality:</strong> To validate the code quality checks.</li><li><strong>Artifact Generation:</strong> They can produce a deployable package (Docker, i.e.)</li><li><strong>Manifest Update: </strong>Auto-updating in the k8s manifest with the latest image tag.</li></ol><h4><strong>Prerequisites</strong></h4><p>The first things you need to take care of before the CI pipeline and Kubernetes deployment automation are the prerequisites:</p><ul><li><strong>GitHub Repository</strong> with git token and all things GitHub actions on your face.</li><li><strong>Docker Hub Container Registry</strong>: Personal access tokens in the Docker Hub account to authenticate push/pull Docker images in GitHub Actions.</li><li>Written for those who are familiar with Git and GitHub workflows, Docker fundamentals, and basic Kubernetes manifests.</li></ul><h4>Sample Microservice Application</h4><p>For this project, let’s imagine a very simple Flask microservice with the following folder structure. The source code is available to download from the: <a href="https://github.com/RasanKhalsa/flask-hello-world">link</a></p><pre>flask-hello-world/<br>├── app/<br>│   ├── main.py<br>│   └── requirements.txt <br>│<br>├── k8s/<br>│   └── deployment.yaml<br>│<br>├── .github/<br>│   └── workflows/<br>│       └── ci.yml<br>│<br>├── Dockerfile<br>└── README.md</pre><h4>GitHub Actions Workflow Configuration</h4><p>Here’s our complete .github/workflows/ci.yaml file with explanations:</p><pre>name: CI Pipeline # Continuous Integration Workflow<br><br>on:<br>  push:<br>    branches: [ main ] # Trigger on push to main branch<br>    paths-ignore:<br>        - &#39;k8s/deployment.yaml&#39; # Ignore changes to deployment file<br>  pull_request:<br>    branches: [ main ] # Trigger on pull requests to main branch<br><br>jobs:             # Define jobs in the CI pipeline<br>  build:          # Build Job<br>    runs-on: ubuntu-latest # Build job<br><br>    steps:<br>      - name: Checkout code <br>        uses: actions/checkout@v3 <br><br>      - name: Set up Python <br>        uses: actions/setup-python@v4   <br>        with:<br>          python-version: &#39;3.10&#39;<br><br>      - name: Install dependencies # Install Python dependencies<br>        run: |<br>          python -m pip install --upgrade pip <br>          pip install -r app/requirements.txt<br><br>      - name: Run application test # Run tests for the application<br>        run: |<br>          echo &quot;Hello world test passed!&quot;  # Replace with real tests<br><br>  code-quality:              # Code Quality Job<br>    runs-on: ubuntu-latest<br>    needs: build<br><br>    steps:                 # Code quality checks     <br>      - name: Checkout code<br>        uses: actions/checkout@v3<br><br>      - name: Install Flake8<br>        run: pip install flake8<br><br>      - name: Run Flake8 # Run code quality checks using Flake8<br>        run: flake8 app<br><br>  docker-build:          # Container image build &amp; publish<br>    runs-on: ubuntu-latest<br>    needs: code-quality<br><br>    steps:            # Docker build and push steps<br>      - name: Checkout code<br>        uses: actions/checkout@v3<br>      <br>      - name: Install Docker<br>        uses: docker/setup-buildx-action@v1<br><br>      - name: Log in to Docker Registry # Authenticate with Docker Hub<br>        uses: docker/login-action@v3<br>        with:<br>          username: ${{secrets.DOCKER_USERNAME}}<br>          password: ${{secrets.DOCKER_TOKEN}}<br><br>      - name: Docker Push # Build and push Docker image<br>        uses: docker/build-push-action@v6<br>        with:<br>          context: app/  <br>          file: Dockerfile <br>          push: true<br>          tags: ${{secrets.DOCKER_USERNAME}}/flaskapp:${{github.run_id}} # Use run ID as tag<br><br>  update-k8s:          # Update Kubernetes Deployment Job<br>    runs-on: ubuntu-latest   <br>    needs: docker-build<br>    steps:<br>      - name: Checkout code <br>        uses: actions/checkout@v3 <br>        with:<br>            token: ${{secrets.GIT_TOKEN}}     # Use a Git token to push changes     <br><br>      - name: Update Kubernetes manifest  # Update deployment image in k8s manifest<br>        run: |<br>          sed -i &quot;s|image:.*|image: ${{secrets.DOCKER_USERNAME}}/flaskapp:${{github.run_id}}|&quot; k8s/deployment.yaml<br>          cat k8s/deployment.yaml<br>      - name: Commit changes       # Commit updated deployment file<br>        uses: stefanzweifel/git-auto-commit-action@v5<br>        with:<br>          commit_message: &quot;[skip ci] Update deployment image to $IMAGE_NAME:${{github.run_id}}&quot; # Skip CI for this commit<br>          file_pattern: &#39;k8s/deployment.yaml&#39;<br>          run: git push<br>          token: ${{secrets.GIT_TOKEN}}    # Push changes to the repository<br><br></pre><h4>Detailed Stage Breakdown</h4><p><strong>1. Commit Stage (Trigger)</strong></p><p>The workflow triggers on:</p><ul><li>Pushes to the main branch</li><li>Pull requests targeting the main branch</li></ul><p><strong>2. Build Stage:</strong> The build stage</p><ul><li>Check out the code</li><li>Sets up a Python environment</li><li>Installs dependencies using pip(clean install)</li><li>Run the application test based on the requirement</li></ul><p><strong>3. Code quality Stage</strong></p><ul><li>Runs the code quality checks using Flake8</li></ul><p><strong>4. Docker Image Build and Push:</strong></p><ul><li>Logs in to Docker Hub using secrets</li><li>Generates appropriate tags for the Docker image</li><li>Builds and pushes the image to the Docker registry</li></ul><p><strong>5. Kubernetes Manifest Update</strong></p><p>The final stage updates the Kubernetes deployment manifest with the new image tag.</p><p>The CI pipeline will auto-replace image: With the tagged version on each successful build.</p><p>After getting the GitHub project ready, you need to configure the following variables in your repository secrets. Go to Repository &gt; Settings &gt; Security &gt; Secret and Variables &gt; Actions &gt; Repository secrets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*trzVK_KXoT46Vlj_KICiRA.png" /></figure><p>Once everything is finished, the CI workflow will be triggered in GitHub Actions whenever a new commit is made to the repository. The steps listed in the <strong>ci.yaml</strong> will then be finished one after the other. You will be able to watch the progress in repository workflow runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RVTy1Ew0NLTLrDjDeb1IYA.png" /></figure><h3>Conclusion</h3><p>This CI pipeline ensures that every code change goes through a standardized verification process before becoming deployment-ready. The automated update of the Kubernetes manifest means the deployment configuration is always in sync with the actual artifacts being produced.</p><p>The complete workflow provides:</p><ul><li>Immediate feedback on code changes</li><li>Consistent build artifacts</li><li>Up-to-date deployment configurations</li><li>A solid foundation for adding CD (Continuous Deployment)</li></ul><p>By implementing this CI pipeline, teams can significantly reduce integration issues and accelerate their delivery cycles while maintaining high-quality standards.</p><p>If you found this guide helpful or have any questions, <strong>don’t hesitate to leave</strong> a comment or <strong>reach out to</strong> me! Thanks for reading!</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 200k supporters? <strong>We do not get paid by Medium</strong>!</p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a><strong> and </strong><a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=703e60a7f3eb" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/continuous-integration-with-github-actions-and-dynamic-kubernetes-manifest-updates-703e60a7f3eb">Continuous Integration with GitHub Actions and Dynamic Kubernetes Manifest Updates</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Spot Workloads on Amazon EKS Auto Mode: A Cost-Effective Approach]]></title>
            <link>https://aws.plainenglish.io/deploying-spot-workloads-on-amazon-eks-auto-mode-a-cost-effective-approach-83d47b6641a4?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/83d47b6641a4</guid>
            <category><![CDATA[spot-instances]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-eks]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 01:28:34 GMT</pubDate>
            <atom:updated>2025-09-07T04:47:18.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Elastic Kubernetes Service (EKS) has become a popular choice for running containerized applications at scale. Using <strong>Spot Instances</strong> — short-lived, discounted compute capacity that can significantly reduce your cloud expenses — is one of the most effective methods to save costs without compromising high availability. <br> AWS makes cluster formation easier with EKS Auto Mode, which automatically configures best practices, including VPC settings and managed node groups. However, how can Auto Mode be used to effectively deploy <strong>Spot workloads</strong> on an EKS cluster?</p><p>In this guide, I’ll walk you through deploying spot workloads on EKS Auto Mode, with pod deployments and best practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlD07RNQTe4Y58ixOTGocg.png" /></figure><h3><strong>Why Use Spot Instances with EKS?</strong></h3><p>When compared to on-demand pricing, spot instances can save up to <strong>90% on costs</strong>. They are perfect for:</p><ul><li>Stateless workloads, such as CI/CD pipelines and batch processing</li><li>Fault-tolerant applications (able to withstand disruptions)</li><li>Dynamically scaling while maintaining cost effectiveness</li></ul><p>However, since AWS can reclaim Spot Instances with a <strong>2-minute warning</strong>, your applications must be resilient to interruptions.</p><h3><strong>Prerequisites</strong></h3><p>Before we begin, ensure you have:</p><ul><li>EKS Auto mode cluster running with required IAM roles. To set up, please click this <a href="https://medium.com/@rasanpreet/amazon-kubernetes-eks-auto-mode-with-terraform-878f75e94e13">link</a>.</li><li>AWS CLI installed and configured</li><li>`kubectl` installed</li><li>Basic understanding of Kubernetes concepts</li></ul><h3><strong>Step-by-Step: Deploying Spot Workloads on EKS Auto Mode</strong></h3><p><strong>Step 1: Verify Your EKS Auto Mode Cluster</strong></p><pre>eksctl get cluster --name &lt;clustername&gt; --region &lt;aws region&gt;<br>kubectl get nodes</pre><p>Verify the Custom Resource Definitions (CRDs) are Installed. If you’re using <strong>EKS v1.28 or later</strong>, AWS has native support for this</p><pre>kubectl get crds</pre><p>You should now see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*nxeRNAl9bZ4HB9u7RABwfA.png" /></figure><p><strong>Step 2:</strong> <strong>Deploy Spot-Managed Node pool</strong></p><p>An EKS Spot NodePool is a group of EC2 Spot Instances in an Amazon EKS cluster used to run cost-optimized, interruptible Kubernetes workloads. Here, we need to define a <strong>NodePool</strong> using the EKS Auto system (powered by Karpenter-style constructs) targeting a “spot” workload with a “spot” label.</p><p><strong>NodePool manifest</strong>(nodepool.yaml):</p><pre># This file defines a NodePool for Karpenter with specific requirements and taints.<br># It includes a node class for spot instances with specific CPU and architecture requirements.<br>apiVersion: karpenter.sh/v1<br>kind: NodePool<br>metadata:<br>  name: spot-nodepool<br>  labels:<br>    workload: spot-nodepool<br>spec:<br>  template:<br>    spec:<br>      nodeClassRef:<br>        group: eks.amazonaws.com<br>        kind: NodeClass<br>        name: default<br>      requirements:<br>        - key: &quot;eks.amazonaws.com/instance-category&quot;<br>          operator: In<br>          values: [&quot;c&quot;, &quot;m&quot;, &quot;r&quot;, &quot;t&quot;]<br>        - key: &quot;eks.amazonaws.com/instance-cpu&quot;<br>          operator: In<br>          values: [&quot;4&quot;, &quot;8&quot;, &quot;16&quot;, &quot;32&quot;]<br>        - key: &quot;kubernetes.io/arch&quot;<br>          operator: In<br>          values: [&quot;arm64&quot;]<br>        - key: &quot;karpenter.sh/capacity-type&quot;<br>          operator: In<br>          values: [&quot;spot&quot;]<br>      taints:<br>        - key: &quot;spot&quot;<br>          value: &quot;true&quot;<br>          effect: &quot;NoSchedule&quot;<br>  limits:<br>    cpu: 1000<br>  disruption:<br>    consolidationPolicy: WhenEmpty<br>    consolidateAfter: 30s</pre><p><strong>Key Points:</strong></p><ul><li><strong>NodePool</strong> is the main object used to configure Auto Mode pools.</li><li>The labels and taints help schedule only <strong>“sport”</strong> workloads onto this group.</li><li>Requirements define constraints such as <strong>instance types</strong> or custom topology rules.</li><li>Use <strong>“default”</strong> in nodeClassRef if you’ve created a custom NodeClass.</li></ul><p>Apply and verify it:</p><pre>kubectl apply -f nodepool.yml<br>kubectl get nodepool</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*SGtNm8zK0tsel-SzBAhL4A.png" /></figure><p><strong>Step 4: Deploy a pod workload with Spot tolerations to schedule pods on the Spot node group</strong></p><p><strong>Pod manifest</strong>(pod.yaml):</p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: nginx-app<br>  labels:<br>    name: nginx-app<br>spec:<br>  tolerations:<br>    - key: &quot;spot&quot;<br>      operator: &quot;Equal&quot;<br>      value: &quot;true&quot;<br>      effect: &quot;NoSchedule&quot;<br>  nodeSelector:<br>    name: spot-nodepool<br>  containers:<br>    - name: app<br>      image: nginx</pre><p>Apply and verify it:</p><pre>kubectl apply -f pod.yaml<br>kubect  get pods<br>kubectl get nodes<br>kubectl get nodeclaim</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*UjLCufVsurGCaXg_Qfa1XQ.jpeg" /></figure><p>Plus, you can verify the EC2 spot instance node provisioned in the AWS console dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mVsxVLIu14y8ilHBFZML_Q.png" /></figure><h3><strong>Conclusion</strong></h3><p>Deploying <strong>Spot workloads on EKS Auto Mode</strong> combines <strong>cost efficiency</strong> with <strong>ease of management.</strong></p><p><strong>AWS Further Reading links:</strong></p><p><a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-pool.html">https://docs.aws.amazon.com/eks/latest/userguide/create-node-pool.html</a><br><a href="https://docs.aws.amazon.com/eks/latest/best-practices/automode.html">https://docs.aws.amazon.com/eks/latest/best-practices/automode.html</a> <a href="https://aws.amazon.com/blogs/compute/applying-spot-to-spot-consolidation-best-practices-with-karpenter/?trk=feed-detail_main-feed-card_feed-article-content">https://aws.amazon.com/blogs/compute/applying-spot-to-spot-consolidation-best-practices-with-karpenter/?trk=feed-detail_main-feed-card_feed-article-content</a></p><p>🚀 <strong>Ready to optimize your EKS costs?</strong> Start experimenting with Spot Instances today!</p><p>If you found this guide helpful or have any questions, please feel free to leave a comment or connect with me. Thanks for reading!</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏️<strong>️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83d47b6641a4" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/deploying-spot-workloads-on-amazon-eks-auto-mode-a-cost-effective-approach-83d47b6641a4">Deploying Spot Workloads on Amazon EKS Auto Mode: A Cost-Effective Approach</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon Kubernetes EKS Auto Mode with Terraform]]></title>
            <link>https://aws.plainenglish.io/amazon-kubernetes-eks-auto-mode-with-terraform-878f75e94e13?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/878f75e94e13</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Sat, 05 Jul 2025 17:28:23 GMT</pubDate>
            <atom:updated>2025-07-09T00:42:54.817Z</atom:updated>
            <content:encoded><![CDATA[<p>Managing Kubernetes clusters on AWS can be complex, but <strong>Amazon Elastic Kubernetes Service (EKS)</strong> simplifies deployment, scaling, and operations. With <strong>EKS Auto Mode</strong>, AWS handles the control plane and default node groups, reducing manual overhead.</p><p>Pairing this with <strong>Terraform</strong> (Infrastructure as Code) ensures <strong>repeatable, scalable, and version-controlled</strong> EKS setups. In this guide, we’ll deploy an <strong>EKS cluster in Auto Mode using Terraform</strong>, covering key configurations and best practices.</p><p><strong>Why EKS Auto Mode?</strong></p><p>EKS Auto Mode provides a robust solution for teams seeking to streamline their Kubernetes management, enhance operational efficiency, and reduce costs, while maintaining a secure and reliable environment.</p><p><strong>Key Features of Amazon EKS Auto Mode</strong><br> ✅ <strong>Automated Infrastructure.</strong></p><p>✅ <strong>Node Lifecycle Management.</strong></p><p>✅ <strong>Core Add-on Management.</strong></p><p>✅<strong>Reduced Expertise Requirement.</strong></p><p>Combined with <strong>Terraform</strong>, this approach ensures <strong>consistency</strong> and <strong>automation</strong> for DevOps teams, providing a seamless workflow. To learn more, please click this <a href="https://medium.com/aws-tip/streamline-kubernetes-administration-with-amazon-eks-auto-mode-8fa4cdb73a4a">link</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOLwA0rFv-KeUkuX44znqw.png" /></figure><p><strong>Prerequisites</strong></p><p>Before starting, ensure you have:</p><ul><li><strong>AWS CLI</strong> configured with IAM permissions for EKS.</li><li><strong>Terraform</strong> (v1.0+) installed.</li><li><strong>kubectl</strong> for cluster interaction.</li><li><strong>AWS VPC</strong> created with two public and two private subnets with NAT enabled.</li></ul><p><strong>Terraform Configuration for EKS Auto Mode</strong></p><p>Let’s start by building Terraform resources for EKS’s IAM role. With the necessary IAM policies, it will use it to perform API requests to AWS services.</p><p><strong>terraform/role.tf</strong></p><pre># ---------------------------------------<br># EKS IAM Node Role<br># ---------------------------------------<br>resource &quot;aws_iam_role&quot; &quot;node&quot; {<br>  name = &quot;eks-auto-node-role&quot;<br>  assume_role_policy = jsonencode({<br>    Version = &quot;2012-10-17&quot;<br>    Statement = [<br>      {<br>        Action = [&quot;sts:AssumeRole&quot;]<br>        Effect = &quot;Allow&quot;<br>        Principal = {<br>          Service = &quot;ec2.amazonaws.com&quot;<br>        }<br>      },<br>    ]<br>  })<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;node_AmazonEKSWorkerNodeMinimalPolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSWorkerNodeMinimalPolicy&quot;<br>  role       = aws_iam_role.node.name<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;node_AmazonEC2ContainerRegistryPullOnly&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPullOnly&quot;<br>  role       = aws_iam_role.node.name<br>}<br><br># ---------------------------------------<br># EKS IAM Cluster Role<br># ---------------------------------------<br>resource &quot;aws_iam_role&quot; &quot;cluster&quot; {<br>  name = &quot;eks-auto-cluster-role&quot;<br>  assume_role_policy = jsonencode({<br>    Version = &quot;2012-10-17&quot;<br>    Statement = [<br>      {<br>        Action = [<br>          &quot;sts:AssumeRole&quot;,<br>          &quot;sts:TagSession&quot;<br>        ]<br>        Effect = &quot;Allow&quot;<br>        Principal = {<br>          Service = &quot;eks.amazonaws.com&quot;<br>        }<br>      },<br>    ]<br>  })<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;cluster_AmazonEKSClusterPolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSClusterPolicy&quot;<br>  role       = aws_iam_role.cluster.name<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;cluster_AmazonEKSComputePolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSComputePolicy&quot;<br>  role       = aws_iam_role.cluster.name<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;cluster_AmazonEKSBlockStoragePolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSBlockStoragePolicy&quot;<br>  role       = aws_iam_role.cluster.name<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;cluster_AmazonEKSLoadBalancingPolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSLoadBalancingPolicy&quot;<br>  role       = aws_iam_role.cluster.name<br>}<br><br>resource &quot;aws_iam_role_policy_attachment&quot; &quot;cluster_AmazonEKSNetworkingPolicy&quot; {<br>  policy_arn = &quot;arn:aws:iam::aws:policy/AmazonEKSNetworkingPolicy&quot;<br>  role       = aws_iam_role.cluster.name<br>}</pre><p>The terraform code for the EKS Auto mode cluster that passes the existing VPC details is therefore as follows.</p><p><strong>terraform/main.tf</strong></p><pre># ---------------------------------------<br># Create EKS Auto Cluster<br># ---------------------------------------<br>resource &quot;aws_eks_cluster&quot; &quot;cluster&quot; {<br>  name     = &quot;eks-auto-cluster&quot;<br>  role_arn = aws_iam_role.cluster.arn<br>  version  = &quot;1.31&quot;<br><br>  vpc_config {<br>    subnet_ids              = var.subnet_ids<br>    security_group_ids      = []<br>    endpoint_private_access = &quot;true&quot;<br>    endpoint_public_access  = &quot;true&quot;<br>  }<br><br>  access_config {<br>    authentication_mode                         = &quot;API&quot;<br>    bootstrap_cluster_creator_admin_permissions = false<br>  }<br><br>  bootstrap_self_managed_addons = false<br><br>  zonal_shift_config {<br>    enabled = true<br>  }<br><br>  compute_config {<br>    enabled       = true<br>    node_pools    = [&quot;general-purpose&quot;, &quot;system&quot;]<br>    node_role_arn = aws_iam_role.node.arn<br>  }<br><br>  kubernetes_network_config {<br>    elastic_load_balancing {<br>      enabled = true<br>    }<br>  }<br><br>  storage_config {<br>    block_storage {<br>      enabled = true<br>    }<br>  }<br><br>/*<br>Note: When using EKS Auto Mode compute_config.enabled, kubernetes_network_config.elastic_load_balancing.enabled, and <br>storage_config.block_storage.enabled must *ALL be set to true. Likewise for disabling EKS Auto Mode, all three <br>arguments must be set to false. Enabling EKS Auto Mode also requires that bootstrap_self_managed_addons is set to false<br>*/</pre><p>To execute Terraform, we must declare the AWS Terraform provider. In response to our needs, we wish to upgrade the AWS region and profile.</p><p><strong>terraform/provider.tf</strong></p><pre>provider &quot;aws&quot; {<br>  profile = &quot;dev&quot;<br>  region  = &quot;us-east-1&quot;<br>}<br>terraform {<br>  required_version = &quot;&gt;= 1.5.0&quot;<br><br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;&gt;= 5.40.0&quot; # Use latest AWS provider for 1.31 support<br>    }<br>  }<br>}<br><br># ---------------------------------------<br># Input your existing VPC and subnets<br># ---------------------------------------<br><br>variable &quot;subnet_ids&quot; {<br>  type        = list(string)<br>  default     = [&quot;subnet-**&quot;, &quot;subnet-**&quot;,&quot;subnet-**&quot;, &quot;subnet-**&quot;]  # At least 2 private subnets in different AZs<br>  description = &quot;A list of all subnet IDs to launch the cluster&quot;<br>}<br><br></pre><p><strong>Deploying the EKS Auto mode Cluster</strong></p><p>Then, to apply configurations, put all of the aforementioned Terraform files in a single directory and execute the Terraform commands listed below:</p><pre>terraform init<br>terraform apply</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*-0Y6VYpFDXuvImpIHTZh3w.png" /></figure><p><strong>Once applied:</strong></p><ul><li>AWS will provision the <strong>EKS control plane</strong> (~10–15 mins).</li><li>Default <strong>managed node groups</strong> will be created.</li></ul><p>You will see Cluster details over the EKS Service dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fR5IQBaGidzxE3WyzIKOPQ.png" /></figure><p><strong>To access the cluster, update kubeconfig.</strong></p><p>You must add the context of your freshly built cluster to your ~/.kube/config file to communicate with your EKS cluster and its API. This enables communication between the cluster and tools like kubectl.</p><p>To update your kubeconfig, execute the following command.</p><pre># Update the your  kubeconfig file<br>aws eks update-kubeconfig --region &lt;aws region&gt; --name &lt;clustername&gt; <br><br># <br>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIapp4DA1v988IvTNnPSYQ.png" /></figure><p>Your EKS cluster has now been successfully established and is up and running. But you may discover something surprising: your cluster has no visible nodes. Why is that?</p><p>When utilizing EKS Auto Mode, this behavior is entirely typical. Nodes are not pre-configured when in Auto Mode. Instead, they are only dynamically generated when a pod needs them.</p><p>This ensures effective resource utilization and cost efficiency, as your cluster dynamically scales its infrastructure in response to workload requirements.</p><p><strong>Conclusion</strong></p><p><strong>Amazon EKS Auto Mode + Terraform</strong> reduces Kubernetes management overhead while ensuring <strong>infrastructure-as-code</strong> best practices. By automating node provisioning and control plane management, teams can focus on <strong>deploying applications</strong> rather than cluster maintenance.</p><p>If you found this guide helpful or have any questions, feel free to drop a comment or connect with me! Thanks for reading!</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/@InPlainEnglish"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a> | <a href="https://twitch.tv/inplainenglish"><strong>Twitch</strong></a></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=878f75e94e13" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/amazon-kubernetes-eks-auto-mode-with-terraform-878f75e94e13">Amazon Kubernetes EKS Auto Mode with Terraform</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IAM Roles Anywhere to Call AWS Services from On-Premises Servers]]></title>
            <link>https://awstip.com/iam-roles-anywhere-to-call-aws-services-from-on-premises-servers-3151c6279977?source=rss-c9e3d24d14f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3151c6279977</guid>
            <category><![CDATA[iam-roles-anywhere]]></category>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[certificate-authority]]></category>
            <dc:creator><![CDATA[Rasanpreet]]></dc:creator>
            <pubDate>Sun, 15 Jun 2025 18:54:53 GMT</pubDate>
            <atom:updated>2025-06-28T18:24:17.499Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you need a safe method to access AWS resources from outside the AWS environment while managing cloud infrastructure? You’re covered by AWS IAM Roles Anywhere! This functionality removes the requirement for permanent AWS credentials by allowing you to assume IAM responsibilities using X.509 certificates. Let’s get started, step by step, on how to put this up.</p><p><strong>What is AWS IAM Roles Anywhere?</strong></p><p>Normally, AWS IAM roles are used to give permissions to AWS services (like EC2, Lambda). <strong>But what if your application runs on-prem, another cloud, or even your laptop?</strong> With <strong>IAM Roles Anywhere</strong>, you can securely grant these external systems temporary AWS access <strong>without needing long-term credentials</strong> (like access keys).</p><p>How It Works:</p><ol><li>You set up a <strong>trust anchor</strong> (like a Certificate Authority) to verify your external workloads.</li><li>Your external system requests temporary credentials by providing a certificate.</li><li>AWS verifies the certificate and issues short-lived AWS credentials (just like with IAM roles inside AWS).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*jpo-w8NnykQkYyyuz0XMmg.png" /></figure><p><strong>Setting up IAM Roles Anywhere</strong></p><p>To grant an on-premises server access to the S3 buckets in our account, let’s configure IAM Roles Anywhere. Throughout the process, we will walk through each stage of IAM Roles Anywhere.</p><p><strong>Certificate Authority and Client Certificates Requirements</strong></p><p>When using <strong>AWS IAM Anywhere</strong>, you must ensure that your <strong>Certificate Authority (CA)</strong> and <strong>client certificates</strong> meet AWS’s requirements for authentication. Below are the key requirements.</p><p><strong>Certificate Authority (CA) Requirements</strong></p><ul><li>The CA must be a <strong>private CA</strong> (not a public CA like DigiCert or Let’s Encrypt).</li><li>The CA certificate must be <strong>self-signed</strong> (root CA) or issued by another trusted private CA.</li><li>Supported algorithms: <strong>RSA (2048-bit or higher)</strong></li></ul><p><strong>Client Certificate Requirements</strong></p><ul><li>Must be an X. 509 v3 certificate.</li><li><strong>Key Usage</strong> must include <strong>Digital Signature.</strong></li><li>Supported algorithms: <strong>RSA (2048-bit or higher)</strong></li></ul><p>We need to create a <strong>Certificate Authority (CA)</strong> and <strong>client self-signed certificates (v3)</strong> using OpenSSL</p><p>Here’s a <strong>complete automated script</strong> to generate a <strong>Certificate Authority (CA)</strong>, <strong>client certificates (v3)</strong>, and verify them — all in one go.</p><p><strong>Script: </strong>generate-certs.sh</p><pre>#!/bin/bash<br><br># Config<br>COUNTRY=&quot;US&quot;<br>STATE=&quot;California&quot;<br>LOCALITY=&quot;San Francisco&quot;<br>ORG=&quot;MyOrg&quot;<br>OU=&quot;DevOps&quot;<br>CA_CN=&quot;MyRootCA&quot;<br>CLIENT_CN=&quot;client1.example.com&quot;<br>DAYS_CA=3650   # 10 years<br>DAYS_CLIENT=365 # 1 year<br>KEY_BITS=2048<br><br>echo &quot;🔐 Generating CA and client certificates...&quot;<br><br># Cleanup old files (if any)<br>rm -f ca.key ca.crt client.key client.csr client.crt ca.srl<br><br># Step 1: Generate CA Private Key<br>echo &quot;1️⃣ Creating CA private key (ca.key)...&quot;<br>openssl genpkey -algorithm RSA -out ca.key -pkeyopt rsa_keygen_bits:$KEY_BITS<br><br># Step 2: Create Self-Signed Root CA Certificate (v3)<br>echo &quot;2️⃣ Creating self-signed CA certificate (ca.crt)...&quot;<br>cat &gt; ca_config.cnf &lt;&lt;EOF<br>[req]<br>distinguished_name = req_distinguished_name<br>x509_extensions = v3_ca<br>prompt = no<br><br>[req_distinguished_name]<br>C  = $COUNTRY<br>ST = $STATE<br>L  = $LOCALITY<br>O  = $ORG<br>OU = $OU<br>CN = $CA_CN<br><br>[v3_ca]<br>subjectKeyIdentifier = hash<br>authorityKeyIdentifier = keyid:always,issuer<br>basicConstraints = critical, CA:true<br>keyUsage = critical, digitalSignature, cRLSign, keyCertSign<br>EOF<br><br>openssl req -x509 -new -nodes -key ca.key -sha256 -days $DAYS_CA -out ca.crt -config ca_config.cnf -extensions v3_ca<br><br># Step 3: Generate Client Private Key<br>echo &quot;3️⃣ Creating client private key (client.key)...&quot;<br>openssl genpkey -algorithm RSA -out client.key -pkeyopt rsa_keygen_bits:$KEY_BITS<br><br># Step 4: Create Client CSR<br>echo &quot;4️⃣ Generating client CSR (client.csr)...&quot;<br>cat &gt; client_csr.cnf &lt;&lt;EOF<br>[req]<br>distinguished_name = req_distinguished_name<br>req_extensions = v3_req<br>prompt = no<br><br>[req_distinguished_name]<br>C  = $COUNTRY<br>ST = $STATE<br>L  = $LOCALITY<br>O  = $ORG<br>OU = &quot;AppTeam&quot;<br>CN = $CLIENT_CN<br><br>[v3_req]<br>keyUsage = critical, digitalSignature, keyEncipherment<br>extendedKeyUsage = clientAuth<br>EOF<br><br>openssl req -new -key client.key -out client.csr -config client_csr.cnf<br><br># Step 5: Sign Client Certificate with CA<br>echo &quot;5️⃣ Signing client certificate (client.crt)...&quot;<br>cat &gt; client_ext.cnf &lt;&lt;EOF<br>[v3_req]<br>subjectKeyIdentifier = hash<br>authorityKeyIdentifier = keyid,issuer<br>keyUsage = critical, digitalSignature, keyEncipherment<br>extendedKeyUsage = clientAuth<br>EOF<br><br>openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days $DAYS_CLIENT -sha256 -extfile client_ext.cnf -extensions v3_req<br><br># Step 6: Verify Certificates<br>echo &quot;6️⃣ Verifying certificates...&quot;<br>echo -e &quot;\n✅ CA Certificate:&quot;<br>openssl x509 -in ca.crt -text -noout | grep -E &quot;Issuer:|Subject:|CA:|Validity&quot;<br><br>echo -e &quot;\n✅ Client Certificate:&quot;<br>openssl x509 -in client.crt -text -noout | grep -E &quot;Issuer:|Subject:|Extended Key Usage:|Validity&quot;<br><br># Cleanup temp files<br>rm -f ca_config.cnf client_csr.cnf client_ext.cnf<br><br>echo -e &quot;\n🎉 Done! Generated files:&quot;<br>ls -l ca.key ca.crt client.key client.crt</pre><p><strong>How to Run the Script</strong></p><ol><li>Save as generate-certs.sh.</li><li>Make it executable: chmod +x generate-certs.sh</li></ol><p>3. Run it: ./generate-certs.sh</p><p>4. <strong>Output files:</strong></p><p>· ca.key (CA private key)</p><p>· ca.crt (CA certificate → upload to AWS as a <strong>Trust Anchor</strong>)</p><p>· client.key (Client private key)</p><p>· client.crt (Client certificate → use with IAM Roles Anywhere)</p><p><strong>Expected Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*Ct0IuZDFvyzHDOPurZlPhg.png" /></figure><p><strong>Create Trust Anchor</strong></p><p>Let’s head over to the AWS console and the IAM section. Navigate to Roles and click on IAM Anywhere at the bottom. Next, select “<strong>Create a trust anchor</strong>”</p><p>Name the Trust Anchor and choose the External certificate bundle. Then, insert the contents from ca.crt into the External certificate bundle</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvlFKs_4kwTDRFJV3GoMOg.png" /></figure><p>Press Create a trust anchor. The trust anchor should now be created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5srJMz8w7oI0nAYDNdh1hg.png" /></figure><p><strong>Create an IAM Role that Trusts the IAM Roles Anywhere Service Principal</strong></p><p>In order to trust the IAM Roles Anywhere service, create an IAM role now. As a result, temporary AWS credentials can be provided by IAM Roles Anywhere. <br> By permitting only client certificates with “OU= AppTeam” in their topic (for instance), we can restrict access.</p><ul><li>Go to IAM, “Roles,” “<strong>Create Role</strong>”</li><li>Select “<strong>Custom Trust Policy</strong>” and paste the following policy as the “Custom trust policy”:</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;Service&quot;: &quot;rolesanywhere.amazonaws.com&quot;<br>            },<br>            &quot;Action&quot;: [<br>                &quot;sts:AssumeRole&quot;,<br>                &quot;sts:TagSession&quot;,<br>                &quot;sts:SetSourceIdentity&quot;<br>            ],<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;aws:PrincipalTag/x509Subject/OU&quot;: &quot;AppTeam&quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gxo5L97GJICkVQjOuOcAdA.png" /></figure><p>Attach the AWS managed IAM policy “<strong>AmazonS3FullAccess</strong>” and create role by providing the role name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*xByNBiR4akMSl9ylimwB4A.png" /></figure><p><strong>Create Roles Anywhere Profile to Manage Client Roles and Permissions</strong></p><p>The next step is to establish a profile that indicates which IAM roles in our account we wish to grant clients temporary access to. Additionally, a profile will enable us to restrict or limit the permissions that the initial role grants.</p><p>Go to the “Roles Anywhere” console, click “<strong>Create a profile</strong>” and provide a name for our profile. Under “Roles,” select your newly created role. Press <strong>Create a Profile</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zzZb04iqWoVFegodMLkzKg.png" /></figure><p>You will now see both the Trust Anchor and Profile in the Roles Anywhere configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z1P6onKwmtd8yv_OMbVA3w.png" /></figure><p>In this case, EVERY bucket in your account can be accessed by anyone who has your client certificate. Later on, you’ll make this the least privileged by granting access to just the resources that are required.</p><p><strong>Obtain Credentials</strong></p><p>Next, to generate credentials with IAM Roles Anywhere, first install “AWS Signing Helper utility”, which you can download <a href="https://docs.aws.amazon.com/rolesanywhere/latest/userguide/credential-helper.html"><strong>here</strong></a>.</p><p>Next, collect the ARNs for the trust anchor, profile, and role you created before, run the following command (replace &lt;anchor-arn&gt;, &lt;profile-arn&gt; and &lt;role-arn&gt; with your values):</p><pre>./aws_signing_helper.exe credential-process \<br>    --certificate client.crt \<br>    --private-key client.key \<br>    --trust-anchor-arn &lt;anchor-arn&gt; \<br>    --profile-arn &lt;profile-arn&gt; \<br>    --role-arn &lt;role-arn&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94xhwhiYy8FqutKm5XnqVw.png" /></figure><p>This output will include your temporary credentials: <em>AccessKeyId</em>, <em>SecretAccessKey</em> and <em>SessionToken</em>, with a default session duration of one hour.</p><p><strong>Test S3 access</strong></p><p>Now that you have these temporary credentials, you may test using AWS CLI commands to call an AWS S3 service. All you have to do is use these temporary credentials to set up the AWS CLI locally. Then, to confirm access, run the following AWS S3 CLI commands.</p><pre>aws s3 ls<br>aws s3 &lt;local file&gt; cp s3://&lt;S3 Bucket in our AWS Account&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*xv22BPGyOgfO68e2yRkDhQ.png" /></figure><p>Next, you can verify that the TXT file has been uploaded from the S3 Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOiVzR7sg1rHMZoZrHM3mQ.png" /></figure><p>👏 🎉 🎊Congratulations! Using the self-signed private CA, you have successfully configured and tested AWS IAM Roles Anywhere.👏 🎉 🎊. With that, we can now run CLI commands towards AWS without having long-lived credentials stored on the local machine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3151c6279977" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/iam-roles-anywhere-to-call-aws-services-from-on-premises-servers-3151c6279977">IAM Roles Anywhere to Call AWS Services from On-Premises Servers</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>