Fargate Profiles for Serverless Pods
Run Kubernetes pods on Fargate without managing EC2 nodes, configure Fargate profiles, and understand their namespace restrictions.
What Are Fargate Profiles?
AWS Fargate for EKS lets you run Kubernetes pods without provisioning or managing EC2 nodes. Instead of thinking about instance types and node groups, you define a Fargate profile that tells EKS which pods should run on Fargate based on their namespace and optional label selectors. AWS automatically provisions the right amount of compute for each pod and terminates it when the pod stops.
Fargate Profile Configuration
A Fargate profile is attached to an EKS cluster and contains one or more selectors — each selector specifies a namespace and optional Kubernetes label key-value pairs. A pod must match at least one selector to be scheduled on Fargate. The profile also specifies the pod execution role (an IAM role) and the private subnets Fargate should use to launch pods.
# Create a Fargate profile for the 'production' namespace
aws eks create-fargate-profile \
--cluster-name my-cluster \
--fargate-profile-name production-profile \
--pod-execution-role-arn arn:aws:iam::111122223333:role/EKSFargatePodExecutionRole \
--subnets subnet-aaa subnet-bbb \
--selectors '[{"namespace":"production"},{"namespace":"staging","labels":{"fargate":"true"}}]'All lessons in this course
- EKS Control Plane and Worker Nodes
- Fargate Profiles for Serverless Pods
- EKS Networking: VPC CNI and Load Balancing
- IAM Roles for Service Accounts (IRSA)