Amazon EKS — EKS on Fargate
EKS on Fargate
AWS Fargate is a serverless compute engine for containers. With EKS on Fargate, each pod runs in its own isolated microVM — you never see or manage worker nodes.
How Fargate Works
EKS on Fargate
┌──────────────────────────────────────────────────┐
│ EKS Cluster │
│ │
│ EC2 Node (traditional): │
│ ┌────────────────────────┐ │
│ │ Node │ │
│ │ ┌──────┐ ┌──────┐ │ Shared kernel, │
│ │ │ Pod1 │ │ Pod2 │ │ shared resources │
│ │ └──────┘ └──────┘ │ │
│ └────────────────────────┘ │
│ │
│ Fargate (serverless): │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ microVM │ │ microVM │ │ microVM │ │
│ │ ┌──────┐ │ │ ┌──────┐ │ │ ┌──────┐ │ │
│ │ │ Pod1 │ │ │ │ Pod2 │ │ │ │ Pod3 │ │ │
│ │ └──────┘ │ │ └──────┘ │ │ └──────┘ │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ Each pod has its own kernel and resources │
└──────────────────────────────────────────────────┘
Create a Fargate Cluster
$ eksctl create cluster \
--name fargate-demo \
--region us-east-1 \
--fargate
Or with config file:
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: fargate-demo
region: us-east-1
fargateProfiles:
- name: default
selectors:
- namespace: default
- namespace: kube-system
Deploy a Pod on Fargate
# Deploy (pods matching Fargate profile run on Fargate)
$ kubectl create deployment web --image=nginx --replicas=2
# Check — nodes show as "fargate-ip-xxx"
$ kubectl get pods -o wide
NAME READY STATUS NODE
web-7854ff8877-abc12 1/1 Running fargate-ip-192-168-100-5.ec2.internal
web-7854ff8877-def34 1/1 Running fargate-ip-192-168-101-8.ec2.internal
Notice: each pod runs on its own Fargate “node” — there’s a 1:1 mapping.
When to Use Fargate
| Use Case | Why Fargate? |
|---|---|
| Batch jobs / cron | Pay only when running |
| Dev/test environments | No idle node costs |
| Bursty workloads | Scales instantly |
| Security-sensitive | Pod-level VM isolation |
| Small teams | No node management |
Quick Reference
# Create Fargate-only cluster
$ eksctl create cluster --name demo --fargate
# Check Fargate profiles
$ eksctl get fargateprofile --cluster demo
# Deploy to Fargate
$ kubectl create deployment web --image=nginx
What’s Next?
Learn how Fargate selects pods: Fargate Profiles.