Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Error’d: Pickup Sticklers

      September 27, 2025

      From Prompt To Partner: Designing Your Custom AI Assistant

      September 27, 2025

      Microsoft unveils reimagined Marketplace for cloud solutions, AI apps, and more

      September 27, 2025

      Design Dialects: Breaking the Rules, Not the System

      September 27, 2025

      Building personal apps with open source and AI

      September 12, 2025

      What Can We Actually Do With corner-shape?

      September 12, 2025

      Craft, Clarity, and Care: The Story and Work of Mengchu Yao

      September 12, 2025

      Cailabs secures €57M to accelerate growth and industrial scale-up

      September 12, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025
      Recent

      Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

      September 28, 2025

      Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

      September 28, 2025

      The first browser with JavaScript landed 30 years ago

      September 27, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured
      Recent
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»How to Deploy a Kubernetes App on AWS EKS

    How to Deploy a Kubernetes App on AWS EKS

    August 23, 2025

    AWS makes it much easier to deploy containerized applications, and running Kubernetes in the cloud is a powerful way to scale and manage these applications.

    Among the many managed Kubernetes services AWS offers, Amazon EKS (Elastic Kubernetes Service) stands out for its seamless integration with the AWS ecosystem, strong reliability, and excellent support.

    If you’re ready to move beyond local setups and want to deploy a real-world Kubernetes app on AWS EKS, this guide will walk you through the entire process. Whether you’re working on a microservice, a full-stack app, or just experimenting with Kubernetes in an environment that mimics production, you’ll find this walkthrough useful.

    In this article, I’ll guide you through the process of creating your EKS cluster, deploying your application, and making it accessible over the internet, step by step.

    What We’ll Cover:

    • Prerequisites

    • What is a Kubernetes Cluster?

    • What is Amazon Elastic Kubernetes Service?

    • Why Use Amazon EKS for Kubernetes?

    • How to Create a Kubernetes Cluster Using AWS

    • Conclusion

    • Resources

    Prerequisites

    To get started, make sure you have the following installed on your local machine:

    • Have a basic understanding of cloud services.

    • Have a basic understanding of the Linux command line.

    • Have an AWS account.

    • Install eksctl, a simple CLI tool to create and manage EKS clusters.

    • Install kubectl, the standard Kubernetes command-line tool.

    • Install Docker to build and package your app into a container.

    Before setting up a Kubernetes cluster for our application, it’s essential to understand a few basic concepts.

    What is a Kubernetes Cluster?

    A Kubernetes (also called K8S) cluster consists of machines (called nodes) that run containerized applications. It works alongside container engines like CRI-O or containerd to help you deploy and manage your apps more efficiently.

    Kubernetes nodes come in two main types:

    • Master nodes (control plane): These handle the brainwork, such as scheduling, scaling, and managing the cluster’s overall state.

    • Worker nodes (data plane): They run the actual applications inside the containers.

    If you’re new to Kubernetes or want to brush up, check out the free course Introduction to Kubernetes (LFS158) from the Linux Foundation.

    What is Amazon Elastic Kubernetes Service?

    Amazon Elastic Kubernetes Service (EKS) is a managed service that enables easy Kubernetes deployment on AWS, eliminating the need to set up and maintain your own Kubernetes control plane node.

    AWS EKS takes care of the heavy lifting by managing the control plane, handling upgrades, and installing core components, such as the container runtime and essential Kubernetes processes. It also offers built-in tools for scaling, high availability, and backup.

    With EKS, you or your team can focus on building and running applications, while AWS handles the underlying infrastructure.

    Why Use Amazon EKS for Kubernetes?

    Here are some key benefits of using AWS EKS:

    • EKS handles upgrades, patching, and high availability for you, giving you a fully managed control plane with minimal manual effort.

    • You can easily scale your applications, and the infrastructure grows as your needs evolve.

    • It has built-in support for IAM roles, private networking, and encryption.

    • AWS EKS runs on highly available infrastructure across multiple AWS Availability Zones, making your application available globally.

    • With Amazon EKS, you get the power of Kubernetes without managing the underlying setup. So you can stay focused on building and running your apps.

    How to Create a Kubernetes Cluster Using AWS

    Now let’s walk through the process of getting a Kubernetes cluster up and running.

    lets get started

    Step 1: How to Install the Tools Needed to Create a Cluster

    The easiest and most developer-friendly way to spin up an Elastic Kubernetes Service that you can use at the production level is by using eksctl. It takes care of the manual setup and automatically provisions the necessary AWS resources.

    Before we begin, we need to install two essential tools:

    • eksctl – This is used to create and manage your EKS cluster.

    • kubectl – This allows you to interact with your cluster, deploy apps, and manage Kubernetes resources.

    These tools will make it easy to set up your Kubernetes cluster and work with it directly from your terminal.

    How to Install eksctl

    Open your browser and go to the official eksctl documentation. Scroll down to the Installation section.

    Scroll to the Unix instructions if you’re using Ubuntu or a similar system. Then copy the installation command and paste it into your terminal.

    Installing eksctl tool

    Once it’s done, run eksctl version to confirm that the installation was successful.

    checking the version

    How to Install kubectl

    The next step is to install kubectl. You can find the installation instructions in the official Kubernetes documentation, which provides steps based on your operating system.

    Installing kubectl

    Step 2: How to Create the Elastic Kubernetes Service (EKS) Cluster

    Now that you’ve installed the tools needed to create and interact with a Kubernetes cluster on AWS, it’s time to launch the cluster.

    To get started, open your terminal and run the following command:

    <span class="hljs-comment"># Create an EKS cluster named "k8s-example" in eu-west-2 (London)</span>
    eksctl create cluster --name k8s-example --region eu-west-2
    

    Creating a terminal in your cluster

    One great thing about using AWS EKS is that once your Kubernetes cluster is created, it automatically updates your ~/.kube/config file. This means you can start interacting with your cluster right away, using kubectl – no extra setup needed.

    Cluster ready on AWS

    After running the command (as shown in the GIF above), your Kubernetes cluster is successfully created.

    Kubernetes cluster created

    Head over to the AWS console, and you’ll see your new cluster listed with a status of Active.

    With your cluster up and running, it’s time to test the connection. You can do this by running a few kubectl commands in your terminal to list the nodes, pods and namespaces in your cluster.

    To test the connection:

    kubectl get nodes
    

    This command lists all the nodes in your cluster.

    kubectl get pods
    

    This command lists all the pods currently running.

    kubectl get namespaces
    

    This command lists all the namespaces currently running.

    testing the cluster

    If each command returns a list of resources, congratulations! Your connection to the Kubernetes cluster is successful.

    Step 3: How to Create Kubernetes Manifests

    Let’s define the application using a YAML file. In this file, you’ll create two key resources: a Deployment and a Service.

    • The Deployment ensures your application runs reliably by specifying how many replicas to run, which container image to use, and how to manage updates.

    • The Service makes your application accessible — both within the Kubernetes cluster and, if needed, from the internet, even if the underlying pods change or restart.

    Together, these resources orchestrate your application so it can run consistently in different environments and be accessed by others.

    <span class="hljs-comment">#deployment-example.yaml</span>
    
    <span class="hljs-attr">apiVersion:</span> <span class="hljs-string">apps/v1</span>
    <span class="hljs-attr">kind:</span> <span class="hljs-string">Deployment</span>
    <span class="hljs-attr">metadata:</span>
      <span class="hljs-attr">name:</span> <span class="hljs-string">amazon-deployment</span>
      <span class="hljs-attr">namespace:</span> <span class="hljs-string">default</span>
      <span class="hljs-attr">labels:</span>
        <span class="hljs-attr">app:</span> <span class="hljs-string">amazon-app</span>
    <span class="hljs-attr">spec:</span>
      <span class="hljs-attr">replicas:</span> <span class="hljs-number">5</span>
      <span class="hljs-attr">selector:</span>
        <span class="hljs-attr">matchLabels:</span>
          <span class="hljs-attr">app:</span> <span class="hljs-string">amazon-app</span>
          <span class="hljs-attr">tier:</span> <span class="hljs-string">frontend</span>
          <span class="hljs-attr">version:</span> <span class="hljs-number">1.0</span><span class="hljs-number">.0</span>
      <span class="hljs-attr">template:</span>
        <span class="hljs-attr">metadata:</span>
          <span class="hljs-attr">labels:</span>
            <span class="hljs-attr">app:</span> <span class="hljs-string">amazon-app</span>
            <span class="hljs-attr">tier:</span> <span class="hljs-string">frontend</span>
            <span class="hljs-attr">version:</span> <span class="hljs-number">1.0</span><span class="hljs-number">.0</span>
        <span class="hljs-attr">spec:</span>
          <span class="hljs-attr">containers:</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">amazon-container</span>
              <span class="hljs-attr">image:</span> <span class="hljs-string">ooghenekaro/amazon:2</span>
              <span class="hljs-attr">ports:</span>
                <span class="hljs-bullet">-</span> <span class="hljs-attr">containerPort:</span> <span class="hljs-number">3000</span>
    <span class="hljs-meta">---</span>
    <span class="hljs-attr">apiVersion:</span> <span class="hljs-string">v1</span>
    <span class="hljs-attr">kind:</span> <span class="hljs-string">Service</span>
    <span class="hljs-attr">metadata:</span>
      <span class="hljs-attr">name:</span> <span class="hljs-string">amazon-service</span>
      <span class="hljs-attr">labels:</span>
        <span class="hljs-attr">app:</span> <span class="hljs-string">amazon-app</span>
    <span class="hljs-attr">spec:</span>
      <span class="hljs-attr">type:</span> <span class="hljs-string">LoadBalancer</span>
      <span class="hljs-attr">ports:</span>
        <span class="hljs-bullet">-</span> <span class="hljs-attr">port:</span> <span class="hljs-number">80</span>
          <span class="hljs-attr">targetPort:</span> <span class="hljs-number">3000</span>
      <span class="hljs-attr">selector:</span>
        <span class="hljs-attr">app:</span> <span class="hljs-string">amazon-app</span>
    

    The service uses a LoadBalancer type, which tells AWS to provision an Elastic Load Balancer (ELB) and route traffic to the pods.

    Step 4: How to Deploy the App to EKS

    Now that your YAML file is defined and the Kubernetes cluster on AWS EKS is ready, it’s time to deploy your application.

    To do this, run the following command in your terminal to apply the configuration defined in your manifest file:

    kubectl apply -f deployment-example.yaml
    

    This command tells Kubernetes to create the necessary pods and services based on what’s specified in the manifest file.

    Next, you can check the status of your pods and services:

    kubectl get pods
    kubectl get svc or service
    kubectl get all
    

    checking to see if our application is deployed properly

    Step 5: How to Access Your Application

    To view your application in the browser, run the following command to list your services:

    <span class="hljs-string">kubectl</span> <span class="hljs-string">get</span> <span class="hljs-string">svc</span>
    

    Look for the EXTERNAL-IP of your service.

    Display of the External IP on the browser

    Copy the IP address and paste it into your browser. Your app should now be live!

    live site

    Conclusion

    Deploying a Kubernetes app on AWS EKS may seem complex at first, but with tools like eksctl and kubectl, the process is surprisingly approachable.

    Whether you’re a developer experimenting with Kubernetes or a team looking to scale production workloads, EKS provides a strong, scalable foundation that supports your applications as they grow.

    Resources

    • Play with Kubernetes

    • Docker 101 Tutorial

    • How to Create a CI/CD Pipeline Using AWS Elastic Beanstalk

    Thanks for reading!

    Source: freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleFrom Hospital Janitor to Developer with Emmett Naughton [Podcast #185]
    Next Article Enhance Geospatial Analysis and GIS Workflows with Amazon Bedrock Capabilities

    Related Posts

    Development

    Using phpinfo() to Debug Common and Not-so-Common PHP Errors and Warnings

    September 28, 2025
    Development

    Mastering PHP File Uploads: A Guide to php.ini Settings and Code Examples

    September 28, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Why React Native Is the Best Choice for Startups on a Budget💡

    Web Development
    Universal Design in Pharmacies – WCAG  – Perceivable

    Universal Design in Pharmacies – WCAG – Perceivable

    Development

    My Cursor Rules for Laravel Projects

    Development

    LWiAI Podcast #214 – Gemini CLI, io drama, AlphaGenome

    Artificial Intelligence

    Highlights

    Timeline Expectations: How Long Does It Really Take to Build an AI Solution?

    May 5, 2025

    Artificial Intelligence (AI) is no longer just a buzzword-it’s a practical tool that businesses are…

    Self-Serve Advertising Platform Architecture: A Developer’s Roadmap

    May 22, 2025

    Inside the Mind of the Adversary: Why More Security Leaders Are Selecting AEV

    June 6, 2025

    The Ecommerce Trust Checklist: What Every Website Needs to Win Buyers

    June 17, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.