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

      A Week In The Life Of An AI-Augmented Designer

      August 22, 2025

      This week in AI updates: Gemini Code Assist Agent Mode, GitHub’s Agents panel, and more (August 22, 2025)

      August 22, 2025

      Microsoft adds Copilot-powered debugging features for .NET in Visual Studio

      August 21, 2025

      Blackstone portfolio company R Systems Acquires Novigo Solutions, Strengthening its Product Engineering and Full-Stack Agentic-AI Capabilities

      August 21, 2025

      I found the ultimate MacBook Air alternative for Windows users – and it’s priced well

      August 23, 2025

      Outdated IT help desks are holding businesses back – but there is a solution

      August 23, 2025

      Android’s latest update can force apps into dark mode – how to see it now

      August 23, 2025

      I tried the Google Pixel Watch 4 – and these key features made it feel indispensable

      August 23, 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

      Building Cross-Platform Alerts with Laravel’s Notification Framework

      August 23, 2025
      Recent

      Building Cross-Platform Alerts with Laravel’s Notification Framework

      August 23, 2025

      Add Notes Functionality to Eloquent Models With the Notable Package

      August 23, 2025

      How to install OpenPlatform — IoT platform

      August 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Basics of Digital Forensics

      August 22, 2025
      Recent

      Basics of Digital Forensics

      August 22, 2025

      Top Linux Server Automation Tools: Simplifying System Administration

      August 22, 2025

      Rising from the Ashes: How AlmaLinux and Rocky Linux Redefined the Post-CentOS Landscape

      August 22, 2025
    • 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:

    # Create an EKS cluster named "k8s-example" in eu-west-2 (London)
    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.

    #deployment-example.yaml
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: amazon-deployment
      namespace: default
      labels:
        app: amazon-app
    spec:
      replicas: 5
      selector:
        matchLabels:
          app: amazon-app
          tier: frontend
          version: 1.0.0
      template:
        metadata:
          labels:
            app: amazon-app
            tier: frontend
            version: 1.0.0
        spec:
          containers:
            - name: amazon-container
              image: ooghenekaro/amazon:2
              ports:
                - containerPort: 3000
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: amazon-service
      labels:
        app: amazon-app
    spec:
      type: LoadBalancer
      ports:
        - port: 80
          targetPort: 3000
      selector:
        app: amazon-app
    

    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:

    kubectl get svc
    

    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

    Building Cross-Platform Alerts with Laravel’s Notification Framework

    August 23, 2025
    Development

    Add Notes Functionality to Eloquent Models With the Notable Package

    August 23, 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

    Bungie reveals Marathon gameplay, sets release date for later this year across Xbox, PC, and PlayStation

    News & Updates

    This AI Paper from Anthropic Introduces Attribution Graphs: A New Interpretability Method to Trace Internal Reasoning in Claude 3.5 Haiku

    Machine Learning

    CVE-2025-49821 – Dropbox Authentication Bypass

    Common Vulnerabilities and Exposures (CVEs)

    Gray Duck Mail – modern group email discussion lists

    Linux

    Highlights

    Machine Learning

    FEEDER: A Pre-Selection Framework for Efficient Demonstration Selection in LLMs

    July 25, 2025

    LLMs have demonstrated exceptional performance across multiple tasks by utilizing few-shot inference, also known as…

    Want a free VPN? How to use ProtonVPN on Android without having to pay

    June 24, 2025

    As Nintendo Switch 2 breaks records, game subscription spending hits another all-time high in the US — boding well for Xbox Game Pass?

    July 23, 2025

    CVE-2025-40596 – SMA100 Series Web Interface Stack-based Buffer Overflow Vulnerability

    July 23, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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