This repository contains a demo project created as part of my DevOps studies in the TechWorld with Nana – DevOps Bootcamp.
Demo Project: Create EKS cluster with Fargate profile
Technologies used: Kubernetes, AWS EKS, AWS Fargate
Project Description:
- Create Fargate IAM Role
- Create Fargate Profile
- Deploy an example application to EKS cluster using Fargate profile
- Complete all steps from the previous demo project to create an EKS cluster: eks-module-11.1
- Ensure
kubectlis configured and connected to the cluster (kubectl cluster-info)
-
Navigate to IAM → Roles → Create role
-
Select trusted entity type:
AWS Service -
Select use case:
EKS - Fargate pod -
Click Next
-
Verify the attached permissions policy:
AmazonEKSFargatePodExecutionRolePolicy -
Click Next
-
Set role name:
eks-fargate-role -
Click Create role
-
Navigate to Amazon EKS → Clusters →
eks-cluster→ Compute -
In the Fargate profiles section, click Add Fargate profile
-
Configure the profile:
- Name:
dev-profile - Pod execution role:
eks-fargate-role
- Name:
-
Click Next
-
Configure pod selection:
- Namespace:
dev - Labels:
profile=fargate
- Namespace:
-
Click Next, then Create
-
Create the
devnamespace:kubectl create ns dev
-
Deploy the Nginx application (3 replicas with a LoadBalancer service):
kubectl apply -f nginx.yaml
How Fargate scaling works: Unlike EC2-based node groups, Fargate does not use a Cluster Autoscaler. Each pod is scheduled on its own dedicated micro-VM, so scaling is driven entirely by the number of pod replicas — Fargate provisions and deprovisions compute automatically.
-
Watch the 3 pods come up and observe the corresponding Fargate nodes:
kubectl get pods -n dev -o wide -w
kubectl get nodes
-
Scale the deployment back down to 1 replica and verify:
kubectl scale deployment nginx -n dev --replicas=1 kubectl get pods -n dev -o wide kubectl get nodes
Delete all resources in the following order to avoid dependency errors:








