Fargate Profiles
Run pods on AWS Fargate — serverless compute where you manage no EC2 nodes at all.
AWS Fargate runs your pods without any EC2 instances to manage. You define a Fargate profile that matches pods by namespace and labels; matching pods each launch on their own right-sized, isolated micro-VM.
Limits to know
- No DaemonSets, no privileged pods, and no persistent EBS volumes (use EFS instead).
- Each pod gets its own kernel, so there is no bin-packing across pods.
Example
# Create a Fargate profile: pods in the 'prod' namespace run on Fargate
eksctl create fargateprofile \
--cluster demo \
--name fp-prod \
--namespace prod \
--labels compute=fargateWhen to use it
- A small team runs batch report-generation jobs on Fargate so they pay only for the seconds each pod runs, with no idle EC2 nodes.
- A startup uses a Fargate profile to run the kube-system namespace pods without managing any EC2 infrastructure for the system components.
- A security team prefers Fargate for sensitive workloads because each pod gets its own isolated Firecracker VM with no shared kernel.
More examples
Create a Fargate profile
Creates a Fargate profile that routes all pods in the 'batch' namespace to serverless Fargate compute.
aws eks create-fargate-profile \
--cluster-name prod \
--fargate-profile-name batch-profile \
--pod-execution-role-arn arn:aws:iam::123456789012:role/EKSFargatePodRole \
--subnets subnet-aaa subnet-bbb \
--selectors namespace=batchFargate profile in eksctl config
Defines Fargate profiles in eksctl ClusterConfig that match pods by namespace, running them on serverless compute.
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: prod
region: us-east-1
fargateProfiles:
- name: batch
selectors:
- namespace: batch
- namespace: kube-systemDeploy a pod to Fargate
A pod in the 'batch' namespace is automatically scheduled on Fargate because the profile selector matches; no node selector needed.
apiVersion: v1
kind: Pod
metadata:
name: report-generator
namespace: batch
spec:
containers:
- name: report
image: my-reports:latest
resources:
requests:
cpu: "1"
memory: "2Gi"
Discussion