Karpenter vs Cluster Autoscaler: How to Choose and Migrate Safely
Compare Karpenter and Cluster Autoscaler on instance selection, consolidation, Spot and operations, with a production NodePool example and a step-by-step migration plan.
Cluster Autoscaler and Karpenter answer the same question, which is how many nodes a cluster should have right now, but they start from different assumptions. Cluster Autoscaler scales node groups you designed in advance. Karpenter looks at the pods that cannot be scheduled and chooses the nodes itself. That difference decides how much capacity you pay for, how many node groups you maintain, and how much disruption your workloads have to tolerate.
The short version: on EKS, Karpenter is the better default for clusters with varied or changing workloads, and Cluster Autoscaler remains a sound choice for small, stable clusters and for platforms where no Karpenter provider exists. The rest of this guide explains why, and how to migrate without an outage.
How each one makes a decision
Cluster Autoscaler watches for pods that cannot be scheduled and simulates whether adding a node to one of your node groups would let them run. On AWS each node group is an Auto Scaling group, and the autoscaler changes its desired count. It assumes every node in a group is interchangeable, which is why mixed instance sizes inside one group cause poor decisions. It removes a node when the node's requested utilization stays below a threshold and its pods can move elsewhere.
Karpenter also starts from unschedulable pods, but it has no node groups. It batches pending pods, reads their requests, node selectors, affinities and topology constraints, and asks the cloud provider for capacity that fits, choosing from every instance type its NodePool allows. After nodes are running, it keeps evaluating whether workloads could run on fewer or cheaper nodes and replaces nodes when they can. That ongoing process is called consolidation.
| Area | Cluster Autoscaler | Karpenter |
|---|---|---|
| Unit of scaling | Node group, such as an Auto Scaling group | Individual nodes |
| Instance selection | Fixed by you, per node group | Chosen per batch of pending pods, within your constraints |
| Scale-down | Removes underused nodes after a delay | Removes empty nodes and replaces nodes with cheaper or fewer ones |
| Spot handling | One or more Spot node groups you design | Chooses across many instance types and falls back to on-demand if allowed |
| Configuration | Flags on the autoscaler plus node group definitions | NodePool and node class resources in the cluster |
| Node lifecycle | Upgrades handled by node group tooling | Drift detection and node expiry replace nodes automatically |
| Provider coverage | Many cloud providers | AWS and Azure providers are the mature ones |
Where the cost difference comes from
Neither tool is cheaper by itself. The difference is in three behaviors.
Bin packing at launch. With node groups, a pod that needs 3 vCPU lands on whatever size the group uses. If that is an 8 vCPU instance and nothing else is pending, 5 vCPU sits idle until other pods arrive. Karpenter can launch a 4 vCPU instance for the same pod, or one larger instance for a batch of pods.
Consolidation after launch. Clusters fragment over time. Deployments scale down and leave half-empty nodes that are each just busy enough to stay. Cluster Autoscaler removes a node only when it falls under the utilization threshold. Karpenter also asks whether the pods on several nodes could fit on fewer nodes, or on a cheaper instance type, and acts on it.
Spot breadth. Spot savings depend on drawing from many capacity pools so one interruption wave does not take everything. A NodePool that allows dozens of instance types gets that breadth without a node group for each one.
All three depend on accurate pod requests. Both autoscalers work from requests, not usage. If requests are double what pods use, Karpenter will efficiently pack capacity you did not need. Fix requests first. The EKS cost optimization guide covers that step.
When Cluster Autoscaler is still the right call
- The cluster is small and steady. A few node groups running a predictable workload gain little from consolidation, and the autoscaler you have already works.
- Your platform has no Karpenter provider. GKE uses its own cluster autoscaler and node auto-provisioning. Many on-premises and smaller cloud platforms are supported by Cluster Autoscaler only.
- You depend on Auto Scaling group features. Warm pools, lifecycle hooks, instance refresh and some compliance tooling attach to the group. Karpenter launches instances directly and does not use them.
- Change control requires fixed instance types. Some regulated environments must certify an exact instance type and image. Node groups make that explicit. Karpenter can be constrained to the same list, but then most of its advantage is gone.
Managed variants worth knowing
On AWS, EKS Auto Mode runs Karpenter-based node management as part of the EKS service, along with other cluster components. AWS prices it with a management charge on top of the instance cost, so confirm the current rate on the EKS pricing page. It suits teams that want the behavior without operating the controller. On Azure, node auto-provisioning is the AKS implementation of Karpenter and uses the same NodePool API. The trade-offs in this guide apply to both. See the AKS cost optimization guide for the Azure specifics.
A production-shaped NodePool
This example targets AWS with the karpenter.sh/v1 API. Treat it as a starting point and check field names against the Karpenter version you run.
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: general
spec:
template:
spec:
nodeClassRef:
group: karpenter.k8s.aws
kind: EC2NodeClass
name: default
expireAfter: 720h
requirements:
- key: karpenter.sh/capacity-type
operator: In
values: ["spot", "on-demand"]
- key: kubernetes.io/arch
operator: In
values: ["amd64", "arm64"]
- key: karpenter.k8s.aws/instance-category
operator: In
values: ["c", "m", "r"]
- key: karpenter.k8s.aws/instance-generation
operator: Gt
values: ["5"]
limits:
cpu: "400"
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 5m
budgets:
- nodes: "10%"
- nodes: "0"
schedule: "0 13 * * mon-fri"
duration: 8h
reasons: ["Underutilized"]
What each part is doing:
- Requirements stay broad. Category and generation filters keep out unsuitable instances while leaving many types available. Listing three specific instance types recreates a node group and invites capacity errors.
limitsis the spending guardrail. Karpenter will not create capacity beyond it. Without a limit, a misconfigured deployment can scale the bill as fast as it scales pods.expireAfterrecycles nodes after 30 days so they pick up new images and do not accumulate drift.consolidationPolicychooses how aggressive scale-down is.WhenEmptyonly removes empty nodes.WhenEmptyOrUnderutilizedalso repacks running workloads. Recent Karpenter releases document aBalancedpolicy that weighs the saving from a consolidation against the pod disruption it causes. Check whether your version supports it.budgetsrate-limit disruption. The first budget allows 10 percent of nodes to be disrupted at a time, which is also the default. The second blocks consolidation of underutilized nodes for eight hours from 13:00 UTC on weekdays, so repacking happens outside peak traffic. Empty nodes are still removed.
Protecting workloads from consolidation
Consolidation saves money by moving pods. Workloads have to be ready for that.
- PodDisruptionBudgets on every service with more than one replica. Karpenter respects them when it drains nodes. A budget that allows zero disruptions blocks consolidation for that node indefinitely.
- Topology spread constraints across zones and hosts, so a single node replacement cannot take out every replica.
- The
karpenter.sh/do-not-disrupt: "true"annotation for pods that must not be moved voluntarily, such as long batch jobs. Use it sparingly. Every annotated pod pins its node. - Graceful shutdown. Handle SIGTERM, finish in-flight work and set
terminationGracePeriodSecondsto match. - Pin the node image. In the
EC2NodeClass, select a specific AMI version instead of the latest alias in production. Otherwise a new image release counts as drift and Karpenter starts replacing nodes on its own schedule.
Migrating from Cluster Autoscaler
A cut-over does not need a maintenance window if the two are never competing for the same nodes.
- Prepare workloads. Set requests from measured usage, add PodDisruptionBudgets and spread constraints, and confirm services handle a node drain. Test by draining one node by hand.
- Give the controller a stable home. Run Karpenter on a small managed node group or on Fargate. It should not run on nodes it manages.
- Install Karpenter with interruption handling. Configure the interruption queue so Spot interruption notices and rebalance recommendations trigger a graceful drain.
- Create one NodePool with a low limit. Start with a CPU limit that covers a single team's workloads. Nothing changes yet, because existing node groups still have room.
- Move workloads group by group. Cordon the nodes in one Cluster Autoscaler group and drain them gradually. Displaced pods become pending and Karpenter provisions for them. Watch pending time, restarts and error rates before the next group.
- Shrink the old groups. Set the drained group's minimum and desired size to zero. Cluster Autoscaler only acts on its own groups, so the two tools coexist during this phase.
- Retire Cluster Autoscaler. When the last workload group has moved, scale its deployment to zero, keep it for a rollback window, then remove it along with the empty groups.
- Raise limits and enable Spot once on-demand behavior is stable. Changing one variable at a time keeps incidents easy to diagnose.
Review commitments afterward. Karpenter changes your instance mix week to week. Compute Savings Plans, which apply across instance families, tolerate that. Commitments tied to one instance family may end up underused.
Failure modes to expect
| Symptom | Likely cause | Fix |
|---|---|---|
| Nodes replaced constantly | consolidateAfter too short, or image drift on an unpinned AMI | Lengthen the window, pin the AMI version, add a schedule budget |
| Pods pending while capacity exists in the Region | Requirements too narrow, or the pool limit reached | Allow more instance types and zones, raise the limit |
| Consolidation never happens | Zero-disruption PodDisruptionBudgets or do-not-disrupt annotations | Audit budgets and annotations |
| Bill rose after migration | Requests still inflated, or limit set far above need | Right-size requests, lower limits |
| Outage during a Spot wave | All replicas on Spot with no spread | Keep an on-demand base and spread across zones |
A short decision checklist
Choose Karpenter if most of these are true: you run on EKS or AKS, workloads vary in size or schedule, you maintain more than a handful of node groups, you want meaningful Spot usage, and your services tolerate being rescheduled.
Stay on Cluster Autoscaler if most of these are true: the cluster is small and stable, your platform has no Karpenter provider, you rely on Auto Scaling group features, or instance types must be fixed for compliance.
In both cases the saving comes from the same place: accurate requests, workloads that can move, and a node layer allowed to shrink. If that groundwork is the hard part, it is what CloudForge's Kubernetes cost optimization work covers.
Sources
- Karpenter documentation: Disruption
- Karpenter documentation: NodePools
- Karpenter best practices, Amazon EKS Best Practices Guide
- Cluster Autoscaler best practices, Amazon EKS Best Practices Guide
- Cluster Autoscaler FAQ
- EKS Auto Mode, Amazon EKS User Guide
- Node auto-provisioning in AKS
Want this applied to your clusters?
CloudForge measures where cluster spend goes, right-sizes workloads and tunes autoscaling so nodes actually leave when load drops.
See Kubernetes cost optimization