0
0
AWScloud~30 mins

Deploying workloads on EKS in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Deploying workloads on EKS
📖 Scenario: You are working as a cloud engineer for a company that wants to deploy a simple web application on Amazon Elastic Kubernetes Service (EKS). You will create the necessary Kubernetes deployment and service configuration files step-by-step to run the application on EKS.
🎯 Goal: Build a Kubernetes deployment and service manifest to deploy a web application on EKS. You will create the deployment YAML with the container image, add configuration for replicas, and expose the deployment with a service.
📋 What You'll Learn
Create a Kubernetes deployment manifest with a specific container image
Add a replica count configuration to the deployment
Define container port in the deployment
Create a Kubernetes service manifest to expose the deployment
💡 Why This Matters
🌍 Real World
Deploying containerized applications on EKS is a common task for cloud engineers to run scalable and managed workloads.
💼 Career
Understanding how to write Kubernetes manifests and deploy workloads on EKS is essential for cloud and DevOps roles.
Progress0 / 4 steps
1
Create the initial Kubernetes deployment manifest
Create a Kubernetes deployment manifest named deployment.yaml with the following exact content: apiVersion apps/v1, kind Deployment, metadata name webapp, and spec template with a container named webapp-container using the image nginx:1.21. Write the YAML content exactly as specified.
AWS
Need a hint?

Start by writing the YAML keys exactly as shown. Indentation matters in YAML.

2
Add replica count to the deployment
Add a replicas field with the value 3 under the spec section of the deployment manifest in deployment.yaml. This will run three copies of the web application.
AWS
Need a hint?

Place replicas: 3 directly under spec: at the same indentation level as selector: and template:.

3
Add container port to the deployment
Add a ports section under the container in the deployment manifest with a single port number 80. This tells Kubernetes which port the container listens on.
AWS
Need a hint?

Indent ports: under the container, then list - containerPort: 80.

4
Create a service to expose the deployment
Create a Kubernetes service manifest named service.yaml that exposes the deployment webapp on port 80 using type LoadBalancer. The service should select pods with label app: webapp. Write the YAML manifest exactly.
AWS
Need a hint?

Use selector to match pods with label app: webapp. Set service type to LoadBalancer.