Fargate vs EC2 for EKS

EKS pods run either on EC2 instances that you (or Auto Mode) manage, or on Fargate, where each pod gets its own AWS-managed micro-VM. The choice is per workload, not per cluster: both can coexist, and most clusters that use Fargate use it for a subset.

Side by side

EC2 nodesFargate
Unit you pay forThe instance, used or notThe pod’s requested vCPU and memory, per second
IsolationPods share a kernelOne micro-VM per pod
Node operationsPatch, scale, right-size (or let Auto Mode do it)None
Pod start-upSeconds on a warm nodeTypically 30–90 seconds: a VM boots first
DaemonSetsYesNo — use sidecars
Privileged, host accessYesNo
GPUs, Arm, WindowsYesNo
StorageEBS, EFS, FSx, instance storeEphemeral storage and EFS only
Pod IAMPod Identity or IRSAIRSA only
SpotYesNo Fargate Spot on EKS
Bin-packingYours to optimiseNot applicable; each pod is rounded up to a fixed size
Max pod sizeThe instance size16 vCPU and 120 GiB

Cost: where each wins

Fargate’s per-vCPU-hour price is noticeably higher than On-Demand EC2. That comparison is misleading on its own, because on EC2 you also pay for capacity that sits idle.

break-even utilisation ≈ EC2 price per vCPU-hour ÷ Fargate price per vCPU-hour

If Fargate costs roughly 1.3–1.5 times EC2 per unit, EC2 is cheaper once nodes are more than about 65–75% utilised, and Fargate is cheaper below that. In practice:

SituationCheaper option
Large, steady workloads on well-packed nodesEC2
Anything that can run on SpotEC2
A handful of small services that would leave nodes mostly emptyFargate
Bursty jobs that run for minutes a few times a dayFargate
Workloads on GravitonEC2

Two details shift the numbers. Fargate rounds each pod up to the next supported size and adds 256 MiB for Kubernetes components, so many tiny pods are disproportionately expensive. And on EC2, DaemonSets (CNI, logging, monitoring agents) consume part of every node; on Fargate that overhead moves into per-pod sidecars. Count the engineering time for node operations too — unless Auto Mode already removes it. See EKS cost optimization and pricing models.

Operational differences that matter

  • Scaling speed. With HPA, a new replica on a warm EC2 node is serving in seconds; on Fargate it takes most of a minute. Keep more headroom, or scale on a leading indicator.
  • Observability. No DaemonSets means the log router is built in (pod logging) and metrics agents run as sidecars or scrape remotely.
  • Security. A VM boundary per pod is a stronger isolation story for untrusted or regulated workloads, and there are no nodes to harden or patch — see runtime sandboxing.
  • Limits. Fargate pods must run in private subnets, and quotas apply per account on concurrent Fargate vCPUs.

Mixing them in one cluster

A Fargate profile selects pods by namespace and labels, so the split is declarative:

PatternHow
Add-ons on Fargate, workloads on EC2Run Karpenter and CoreDNS on Fargate so nothing depends on the nodes they manage
Batch on FargateA profile for the batch namespace; Jobs get capacity on demand and cost nothing when idle
Isolation tierSensitive tenants’ namespaces on Fargate, everything else on shared nodes
Burst overflowLabel-selected pods go to Fargate when node capacity is tight

Decision guide

  1. Does the pod need a DaemonSet, privileged mode, a GPU, EBS or Arm? → EC2.
  2. Is strong per-pod isolation a requirement? → Fargate.
  3. Is the workload steady and large? → EC2, ideally with Karpenter or Auto Mode, Spot and Savings Plans.
  4. Is it small, spiky or occasional, and is nobody available to run nodes? → Fargate.
  5. Do you mainly want to stop operating nodes? → consider Auto Mode first: it removes most of the toil without Fargate’s restrictions.