All posts
Cost

EKS cost optimization: what Cluster Autoscaler gets wrong

October 4, 20269 min read

Cluster Autoscaler is one of the most widely deployed Kubernetes components. It scales your node groups up when pods can't be scheduled and scales them down when nodes are underutilized. Most EKS clusters have it running. Most EKS teams assume it's handling their cost optimization. It isn't.

Cluster Autoscaler is a scheduling tool that happens to affect costs. The distinction matters — because the decisions it makes are optimized for availability, not spend. Understanding where it falls short is the first step to actually controlling your EKS bill.

What Cluster Autoscaler actually optimizes for

Cluster Autoscaler has one primary goal: ensure pending pods get scheduled. When a pod can't be scheduled because no node has sufficient available CPU or memory, Cluster Autoscaler adds a node. When nodes are consistently below a utilization threshold (default: 50%), it attempts to drain and remove them.

That 50% threshold sounds reasonable until you realize it's measuring requested resources, not actual usage. A node where pods have requested 512MB of memory but are actually using 128MB counts as 25% utilized — and Cluster Autoscaler won't touch it. Kubernetes resource requests are notoriously over-provisioned, which means Cluster Autoscaler's utilization signal is largely noise.

The overprovisioning trap

Resource requests in Kubernetes are set by developers, not by performance data. The typical pattern: a developer sets requests.memory: 512Mi because that's what the service used during a load test, or because that's what the previous service requested, or because "it seemed safe." The actual P99 memory usage might be 80MB.

Across a cluster with dozens of services, this adds up to a large gap between requested resources (what Cluster Autoscaler sees) and actual consumption (what you're paying for). A cluster that looks 60% utilized by requests might be 15% utilized by actual CPU cycles.

Cluster Autoscaler cannot fix this. It doesn't know or care about actual utilization — only requests. The fix requires either right-sizing resource requests (manually, or with a tool like Vertical Pod Autoscaler) or moving to a bin-packing approach that accounts for actual usage patterns.

Scale-down is slower than you think

Cluster Autoscaler's scale-down behavior has several conservative defaults that accumulate into significant idle spend:

  • Scale-down delay after scale-up: 10 minutes. After adding a node, Cluster Autoscaler won't consider removing any node for 10 minutes. In bursty workloads, this means nodes added for a spike sit idle long after the spike passes.
  • Scale-down unneeded time: 10 minutes. A node must be below the utilization threshold for 10 minutes before it's a candidate for removal. With the scale-up delay, that's potentially 20 minutes of idle node time per burst.
  • Node group minimum size: Whatever you set. If your minimum is 3 nodes and your actual workload needs 1, you're paying for 2 idle nodes permanently.

These defaults exist for stability reasons — aggressive scale-down causes pod disruption and latency spikes. But in practice, many teams never tune them, and the defaults are calibrated for safety, not cost.

Instance type selection is left to you

Cluster Autoscaler scales node groups. It doesn't choose instance types — you do, when you create the node group. This is where significant money is left on the table.

The typical EKS setup uses a single node group with a single instance type, often chosen based on "what we used before" or "what seemed right." A cluster running m5.xlarge nodes might save 30-40% by mixing in Spot instances for stateless workloads, or by right-sizing to m5.large based on actual pod resource usage.

Cluster Autoscaler has no opinion on this. It will happily scale up expensive On-Demand m5.4xlarge instances when your pods would fit on m5.large Spot instances at a quarter of the cost.

Karpenter: what Cluster Autoscaler should have been

AWS's Karpenter (now a CNCF project) approaches the same problem differently. Instead of scaling pre-defined node groups, Karpenter provisions exactly the node type that best fits the pending pods — considering instance family, size, architecture, capacity type (On-Demand vs Spot), and zone.

The practical difference: Karpenter can provision a c6g.large Spot instance in us-east-1b for a batch job that just needs 2 vCPUs and 4GB RAM, while provisioning an r6i.xlarge On-Demand instance for a memory-intensive service that needs guaranteed capacity. Cluster Autoscaler would give both workloads whatever instance type is in the node group.

Karpenter also handles scale-down more aggressively through consolidation: it actively moves pods around to pack them onto fewer nodes and terminates the underutilized ones. This runs continuously, not on a fixed interval, and it works against actual bin-packing efficiency rather than a utilization percentage threshold.

Teams migrating from Cluster Autoscaler to Karpenter typically see 30-60% reduction in EC2 spend for variable workloads. The gap is larger for clusters with mixed workload types (batch + services) where different instance characteristics are needed.

The metrics Cluster Autoscaler doesn't expose

To know whether your Cluster Autoscaler configuration is costing you money, you need to look at things it doesn't surface by default:

Node utilization by actual usage, not requests. Use CloudWatch Container Insights or Prometheus to track node_cpu_utilization and node_memory_utilization by actual consumption. If average CPU utilization is below 20%, your nodes are oversized or your requests are over-provisioned.

Scale-up frequency and trigger cause. Cluster Autoscaler logs why it scaled up. If scale-ups are consistently triggered by the same workload at the same time each day, that's a case for scheduled scaling (cheaper, more predictable) rather than reactive autoscaling.

Node idle time before scale-down. How long do nodes sit above the utilization threshold before scale-down fires? This directly translates to waste. In CloudWatch, this is the gap between when a spike ends and when the node count drops.

Wasted reserved capacity. If you're using Reserved Instances or Savings Plans with Cluster Autoscaler, the autoscaler has no awareness of your commitment coverage. It may scale down nodes that are covered by reservations (low marginal cost) while keeping idle On-Demand nodes.

Practical steps to reduce EKS costs today

Without migrating away from Cluster Autoscaler:

  1. Audit resource requests vs actual usage. Pull VPA recommendations (kubectl describe vpa) or use kubectl top pods to find the biggest gaps. Services with requests 4× actual usage are prime targets.
  2. Add a Spot node group. Even if you keep On-Demand as primary, adding a Spot node group for stateless or fault-tolerant workloads (batch jobs, background workers, dev namespaces) can cut spending on those workloads by 60-80%.
  3. Tune scale-down delays. For non-production environments, reduce scale-down-delay-after-add to 2-3 minutes and scale-down-unneeded-time to 2-3 minutes. The stability risk is lower when you're not serving production traffic.
  4. Set realistic node group minimums. If your baseline workload fits on 2 nodes, your minimum should be 2, not 5.

Longer term, evaluate Karpenter. The migration is well-documented and the cost savings for variable workloads are substantial.

The monitoring gap

EKS cost anomalies are harder to catch than EC2 anomalies because the spend is abstracted through node groups. A sudden increase in pod resource requests — from a misconfigured deployment, a runaway HPA, or a forgotten load test — translates to Cluster Autoscaler adding nodes, which shows up as EC2 spend. By the time it appears in Cost Explorer, the root cause is in a Kubernetes event that happened hours earlier.

SpikeCatcher correlates AWS cost signals with CloudTrail activity to surface anomalies like this in under 15 minutes — including unusual EC2 scaling patterns that indicate Kubernetes autoscaler runaway. 14-day free trial, 5-min setup.

aws-costsekskubernetesfinops

Protect your AWS account — 14-day free trial

Real-time threat and cost anomaly detection. Detects credential theft, cryptomining, and runaway costs in under 15 minutes. 5-minute setup via CloudFormation.

No credit card. Cancel anytime.