awsekskubernetescost-optimizationcontainers

EKS Fargate vs EC2 nodes: which is cheaper for your cluster

On EKS you can run pods on EC2 nodes you manage or on Fargate serverless capacity. Fargate removes node management and bills per pod, EC2 nodes are cheaper per unit but require you to run and pack them. Here is the cost tradeoff.

The C3X Team··6 min read

Quick answer

On EKS, EC2 nodes give you managed instances that you pack pods onto and pay for per instance-hour (with Spot and commitments available), while Fargate runs each pod on serverless capacity billed per pod's requested vCPU and memory with no node management. EC2 nodes are cheaper per unit of compute and support Spot and Reserved discounts, but require you to run, patch, and pack them efficiently; Fargate costs more per unit but eliminates node management, idle node waste, and scaling toil. Well-packed EC2 nodes (especially with Spot) win on cost at scale, while Fargate wins for spiky, small, or ops-light workloads where node utilization would be poor.

EKS gives you two ways to run pods, and they have opposite cost profiles. EC2 nodes are cheaper per unit but you own the packing and the idle capacity. Fargate is more expensive per unit but you pay only for what each pod requests and manage no nodes. The right choice depends on scale, utilization, and how much operational effort you want to spend.

Two compute models

AspectEC2 nodesFargate
BillingPer instance-hourPer pod vCPU and memory requested
Node managementYou run and patch nodesNone, serverless
PackingYou pack pods onto nodesOne pod per micro-VM
DiscountsSpot, Savings Plans, ReservedFewer (Fargate Spot exists)
Idle costUnused node capacity is wastedPay only per running pod

With EC2 nodes, you pay for the whole instance and try to pack it full of pods; unused headroom is waste (covered in Kubernetes idle cost). With Fargate, you pay per pod for the vCPU and memory it requests, so there is no node-level idle, but the per-unit rate is higher and pods that over-request resources overpay directly.

Why EC2 nodes win at scale

For steady, well-utilized clusters, EC2 nodes are cheaper. You buy compute wholesale per instance, pack many pods onto each node, and apply the full range of EC2 discounts: Spot for interruptible workloads (huge savings, see Kubernetes spot nodes), and Savings Plans or Reserved for steady baseline (see how much savings plans save). A large, well-packed EC2 node cluster running mostly on Spot is typically the lowest-cost way to run Kubernetes on AWS. The price is operational: you run, patch, scale, and bin-pack the nodes.

Why Fargate wins for the right workloads

Fargate shines where node utilization would be poor or ops effort is scarce: spiky workloads that would leave EC2 nodes half-empty, small clusters where one or two nodes cannot be packed efficiently, batch and cron jobs that run briefly then stop, and teams that want zero node management. Because you pay per pod, there is no idle node waste, and no patching, scaling, or bin-packing to operate. For a bursty or small workload, Fargate can be cheaper in practice even at a higher unit rate, because EC2 nodes would sit underutilized.

The utilization crossover

The decision comes down to node utilization. If you can keep EC2 nodes well-packed (high average utilization) and use Spot, EC2 nodes are cheaper. If your workload is too spiky or small to pack nodes well, Fargate's pay-per-pod model avoids the idle waste and often wins. Many clusters use both: EC2 nodes for the steady, packable baseline and Fargate for spiky or isolated workloads. Right-sizing pod requests matters either way (see Kubernetes resource requests and cost), since over-requesting wastes money on both. For total cluster budgeting, see how much a Kubernetes cluster costs.

Don't forget the shared costs

Both models share the EKS control plane fee (a flat hourly charge per cluster) and the same data transfer, load balancer, and storage costs. Those do not change with the compute model, so compare Fargate and EC2 nodes on the compute line specifically, then add the common costs to both. The compute choice is the biggest variable, but it is not the whole cluster bill.

FAQ

Is EKS Fargate more expensive than EC2 nodes?

Per unit of compute, yes: Fargate's rate per vCPU and memory is higher than the equivalent EC2 instance capacity, and EC2 nodes support Spot and Reserved discounts that Fargate largely does not. But Fargate bills only per running pod with no idle node waste, so for spiky or poorly-packed workloads it can be cheaper in practice. Well-packed EC2 nodes on Spot win at scale.

When should I use Fargate for EKS?

Use Fargate where EC2 node utilization would be poor or ops effort is scarce: spiky workloads that leave nodes half-empty, small clusters that cannot be packed efficiently, short-lived batch and cron jobs, and teams wanting zero node management. Because you pay per pod, there is no idle node waste and no patching or bin-packing, so Fargate can be cheaper for bursty or small workloads despite its higher unit rate.

When are EC2 nodes cheaper than Fargate?

For steady, well-utilized clusters at scale. You buy compute wholesale per instance, pack many pods onto each node, and apply Spot (large savings for interruptible workloads) plus Savings Plans or Reserved discounts for steady baseline. A large, well-packed EC2 node cluster running mostly on Spot is typically the lowest-cost way to run Kubernetes on AWS, at the cost of running and patching the nodes yourself.

Does Fargate eliminate idle Kubernetes cost?

It eliminates node-level idle cost, since you pay per pod rather than per node, so there is no unused node headroom to waste. But pods that over-request vCPU and memory still overpay directly on Fargate, because you are billed for what each pod requests. Right-sizing pod resource requests remains important on Fargate, even though the node-packing form of idle waste is gone.

Can I mix Fargate and EC2 nodes in one EKS cluster?

Yes, and many clusters do. A common pattern runs the steady, packable baseline on EC2 nodes (cheapest per unit, with Spot and commitments) and spiky, isolated, or short-lived workloads on Fargate (no idle waste, no management). This captures the cost advantage of well-packed nodes for predictable load while using Fargate's pay-per-pod model where node utilization would otherwise be poor.

Do Fargate and EC2 nodes share other EKS costs?

Yes. Both share the EKS control plane fee (a flat hourly charge per cluster) and the same data transfer, load balancer, and storage costs. Those do not change with the compute model. So when comparing Fargate and EC2 nodes, compare the compute line specifically, then add the common costs to both. The compute choice is the biggest variable but not the entire cluster bill.

What to do next

Compare Fargate and EC2 node cost before you build the cluster. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.