Member-only story

Deploying a Sample Nginx Application on an Amazon EKS Cluster

Nidhi
3 min readJan 26, 2025

--

In this article, we’ll walk through the steps to deploy a sample Nginx application on an Amazon Elastic Kubernetes Service (EKS) cluster. By following along, you’ll learn how to use kubectl to apply Kubernetes resource configurations, validate deployments, and set up internal communication between services using a Kubernetes Service.

Prerequisites

Before we dive into deploying the application, ensure the following prerequisites are met:

  1. EKS Cluster: A Kubernetes cluster set up on Amazon EKS with at least one worker node.
  2. Kubectl Installed: The Kubernetes CLI (kubectl) installed on your local machine. If not, refer to the official guide to install it.
  3. YAML Files: Deployment and Service YAML configuration files to define resources.
  4. Refer this Github repo

1. Understanding the Nginx Deployment

The deploy.yaml file defines the namespace, deployment, and Docker image for the Nginx application. Below is an example of its contents

---
apiVersion: v1
kind: Namespace
metadata:
name: eks-sample-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: eks-sample-linux-deployment
namespace: eks-sample-app
labels:
app: eks-sample-linux-app
spec:
replicas: 3
selector:
matchLabels:
app: eks-sample-linux-app
template:
metadata:
labels…

--

--

Nidhi
Nidhi

Written by Nidhi

Devops Automation Enginneer

No responses yet