Load on a Kubernetes cluster is rarely flat, so something has to decide when nodes get added and when they go away. On EKS that is usually Karpenter or Cluster Autoscaler (CA). Both scale the cluster, but they go about it differently, and the differences show up in how you configure them, how you upgrade, and what you pay for EC2. Below we compare the two and say where we would use each.
Cluster autoscaler
Purpose: Cluster Autoscaler changes how many nodes the cluster has. If pods can’t be scheduled, it adds nodes. If demand drops, it takes them away.
Key point: CA only scales node groups you defined up front (sets of identical VMs). It grows or shrinks those groups based on pod demand, which is fine when the workload is predictable.
Sample configuration (Priority expander): The priority expander decides which node group CA grows first. Here is a sample:
apiVersion: v1 kind: ConfigMap metadata: name: cluster-autoscaler-priority-expander namespace: kube-system data: priorities: | 10: - "node-group-small" # Highest priority 20: - "node-group-medium" # Second priority 50: - "node-group-large" # Lower priority 100: - "*" # Catch-all, lowest priority for other node groups
Each node group gets a priority number. When CA needs capacity, it goes down that list, as far as the capacity actually available lets it.
Karpenter
Purpose: Karpenter is the more flexible of the two. It also changes the node count, but it picks the instance type for every node too, based on what the pending pods ask for at that moment.
Key Point: That pays off when demand swings a lot. Karpenter can pull from many instance types, spot included, to save money, while CA is stuck with whatever shape the node group was built with.
Sample configuration (NodePool): Here is a NodePool, with the EC2NodeClass it points to, that lets Karpenter scale freely. Karpenter releases before v0.32 called this object a Provisioner.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: configuration spec: template: metadata: labels: nodegroup: configuration spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: configuration requirements: - key: karpenter.sh/capacity-type operator: In values: ["on-demand", "spot"] - key: node.kubernetes.io/instance-type operator: In values: ["<Instance Type>"] - key: kubernetes.io/arch operator: In values: ["amd64"] - key: kubernetes.io/os operator: In values: ["linux"] limits: cpu: "20" memory: 32Gi disruption: consolidationPolicy: WhenEmptyOrUnderutilized --- apiVersion: karpenter.k8s.aws/v1 kind: EC2NodeClass metadata: name: configuration spec: role: <Your Karpenter node IAM role> amiSelectorTerms: - alias: al2023@latest subnetSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> securityGroupSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> tags: Name
With this in place Karpenter chooses instance types and sizes from the workload’s requests, and moves between on-demand and spot when it needs to.
Comparison: how Karpenter and Cluster Autoscaler work
Cluster Autoscaler (CA):
CA talks to EKS-managed node groups directly and only scales the groups named in its configuration map. It follows the Kubernetes Scheduler: when pods don’t fit on the existing nodes it adds one, and when a node sits mostly idle it removes it. Which group grows is decided by the priority expander config.
Karpenter:
Karpenter doesn’t use EKS-managed node groups at all. It calls the EC2 fleet API and creates instances as pods need them. The NodePool lists the instance requirements, and Karpenter picks instance types that meet them at launch time. Because it reads labels and node affinity off the pods, a pod that needs something specific gets an instance chosen for it, which is much finer control than a node group gives you.
How each tool handles scaling in and out
Cluster Autoscaler: CA reads priority values from the expander config map. Each entry is a regular expression matched against node group names, and the group with the highest priority scales first. Nodes are added when the scheduler can’t place a pod and removed when they’re underused.
Karpenter: Karpenter matches workloads to nodes with the node affinity and labels set in the NodePool. When pods are pending it launches EC2 instances for them, picking architecture, OS type, instance type and capacity type within whatever the NodePool allows.
EKS upgrade considerations
Cluster Autoscaler: EKS upgrades are the easy part with CA. Managed node groups replace their own nodes during a rolling upgrade or a force update, and CA needs nothing extra from you.
Karpenter: This is where Karpenter can cost you work. It doesn’t use node groups or Auto Scaling groups, so EKS won’t roll its nodes for you. If your EC2NodeClass pins a specific Amazon Machine Image (AMI), you have to update it to one that matches the new EKS version; Karpenter then treats the old nodes as drifted and replaces them. With an AMI alias such as al2023@latest, it picks up the new AMI by itself.
Node types: on-demand vs. spot
Cluster Autoscaler: CA only uses the node types defined in the managed node groups. It can’t choose between on-demand and spot by itself; you set that in the node group ahead of time.
Karpenter: A NodePool can pick any node type it’s allowed, and switch between on-demand and spot depending on availability and price. If cost is a big concern, running on spot instances can save a lot.
When to use cluster autoscaler vs. Karpenter
Cluster autoscaler: Use it when the environment is stable and predictable and the node groups already exist:
Your scaling needs are fairly fixed and fit inside the groups you defined. CA does that job simply and reliably.
Workloads don’t need to scale fast or change shape, for example batch jobs with set scaling parameters.
You run a mature production setup. CA has been around for years, it is built for Kubernetes, cloud providers support it, and it is stable on standard workloads.
Karpenter: Use it when load moves around a lot and cost matters:
You want the EC2 bill down. Karpenter picks instances per workload, spot included, and follows price and demand as they change.
Workloads span several zones or regions. Karpenter can provision capacity in each of them, which helps availability and performance.
Workloads need different instance types, like GPU nodes for AI/ML jobs or memory-heavy machines for others. A NodePool lets Karpenter scale for each workload as it shows up.
Case Study: handling node group updates with Karpenter
For one client, the problem was node group updates during EKS upgrades, and we used Karpenter to fix it. Their environment ran on EC2 Launch Templates inside EKS node groups. After the change, upgrades took less manual work and services stayed up through them.
Purpose:
We moved the workloads to an EKS node group that uses an EC2 Launch Template, so upgrades could run without someone babysitting them.
Key advantages of this solution:
When EKS is upgraded to a new version, AWS updates the node template with the latest AMI ID by itself. Karpenter then launches new nodes from that template, so nobody has to edit it.
With EKS cluster auto-upgrades turned on, master and worker nodes both get upgraded automatically. Nobody updates AMIs in Karpenter’s configuration by hand anymore.
During the upgrade, Karpenter moves workloads onto the new nodes without taking services down.
Karpenter launches instances outside the predefined node groups but still inside the EKS cluster. So it can size nodes for each workload, and every node is still a normal member of the cluster.
Pairing Karpenter with EC2 Launch Templates gave this client automatic upgrades with no downtime, and kept Karpenter’s per-workload scaling. This setup used the launch template support in older Karpenter releases; current releases set the AMI through an EC2NodeClass instead, as in the sample above.
We run Kubernetes upgrades and node scaling for teams on EKS. See our platform engineering and DevOps services or talk to us.
Load on a Kubernetes cluster is rarely flat, so something has to decide when nodes get added and when they go away. On EKS that is usually Karpenter or Cluster Autoscaler (CA). Both scale the cluster, but they go about it differently, and the differences show up in how you configure them, how you upgrade, and what you pay for EC2. Below we compare the two and say where we would use each.
Cluster autoscaler
Purpose: Cluster Autoscaler changes how many nodes the cluster has. If pods can’t be scheduled, it adds nodes. If demand drops, it takes them away.
Key point: CA only scales node groups you defined up front (sets of identical VMs). It grows or shrinks those groups based on pod demand, which is fine when the workload is predictable.
Sample configuration (Priority expander): The priority expander decides which node group CA grows first. Here is a sample:
apiVersion: v1 kind: ConfigMap metadata: name: cluster-autoscaler-priority-expander namespace: kube-system data: priorities: | 10: - "node-group-small" # Highest priority 20: - "node-group-medium" # Second priority 50: - "node-group-large" # Lower priority 100: - "*" # Catch-all, lowest priority for other node groups
Each node group gets a priority number. When CA needs capacity, it goes down that list, as far as the capacity actually available lets it.
Karpenter
Purpose: Karpenter is the more flexible of the two. It also changes the node count, but it picks the instance type for every node too, based on what the pending pods ask for at that moment.
Key Point: That pays off when demand swings a lot. Karpenter can pull from many instance types, spot included, to save money, while CA is stuck with whatever shape the node group was built with.
Sample configuration (NodePool): Here is a NodePool, with the EC2NodeClass it points to, that lets Karpenter scale freely. Karpenter releases before v0.32 called this object a Provisioner.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: configuration spec: template: metadata: labels: nodegroup: configuration spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: configuration requirements: - key: karpenter.sh/capacity-type operator: In values: ["on-demand", "spot"] - key: node.kubernetes.io/instance-type operator: In values: ["<Instance Type>"] - key: kubernetes.io/arch operator: In values: ["amd64"] - key: kubernetes.io/os operator: In values: ["linux"] limits: cpu: "20" memory: 32Gi disruption: consolidationPolicy: WhenEmptyOrUnderutilized --- apiVersion: karpenter.k8s.aws/v1 kind: EC2NodeClass metadata: name: configuration spec: role: <Your Karpenter node IAM role> amiSelectorTerms: - alias: al2023@latest subnetSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> securityGroupSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> tags: Name
With this in place Karpenter chooses instance types and sizes from the workload’s requests, and moves between on-demand and spot when it needs to.
Comparison: how Karpenter and Cluster Autoscaler work
Cluster Autoscaler (CA):
CA talks to EKS-managed node groups directly and only scales the groups named in its configuration map. It follows the Kubernetes Scheduler: when pods don’t fit on the existing nodes it adds one, and when a node sits mostly idle it removes it. Which group grows is decided by the priority expander config.
Karpenter:
Karpenter doesn’t use EKS-managed node groups at all. It calls the EC2 fleet API and creates instances as pods need them. The NodePool lists the instance requirements, and Karpenter picks instance types that meet them at launch time. Because it reads labels and node affinity off the pods, a pod that needs something specific gets an instance chosen for it, which is much finer control than a node group gives you.
How each tool handles scaling in and out
Cluster Autoscaler: CA reads priority values from the expander config map. Each entry is a regular expression matched against node group names, and the group with the highest priority scales first. Nodes are added when the scheduler can’t place a pod and removed when they’re underused.
Karpenter: Karpenter matches workloads to nodes with the node affinity and labels set in the NodePool. When pods are pending it launches EC2 instances for them, picking architecture, OS type, instance type and capacity type within whatever the NodePool allows.
EKS upgrade considerations
Cluster Autoscaler: EKS upgrades are the easy part with CA. Managed node groups replace their own nodes during a rolling upgrade or a force update, and CA needs nothing extra from you.
Karpenter: This is where Karpenter can cost you work. It doesn’t use node groups or Auto Scaling groups, so EKS won’t roll its nodes for you. If your EC2NodeClass pins a specific Amazon Machine Image (AMI), you have to update it to one that matches the new EKS version; Karpenter then treats the old nodes as drifted and replaces them. With an AMI alias such as al2023@latest, it picks up the new AMI by itself.
Node types: on-demand vs. spot
Cluster Autoscaler: CA only uses the node types defined in the managed node groups. It can’t choose between on-demand and spot by itself; you set that in the node group ahead of time.
Karpenter: A NodePool can pick any node type it’s allowed, and switch between on-demand and spot depending on availability and price. If cost is a big concern, running on spot instances can save a lot.
When to use cluster autoscaler vs. Karpenter
Cluster autoscaler: Use it when the environment is stable and predictable and the node groups already exist:
Your scaling needs are fairly fixed and fit inside the groups you defined. CA does that job simply and reliably.
Workloads don’t need to scale fast or change shape, for example batch jobs with set scaling parameters.
You run a mature production setup. CA has been around for years, it is built for Kubernetes, cloud providers support it, and it is stable on standard workloads.
Karpenter: Use it when load moves around a lot and cost matters:
You want the EC2 bill down. Karpenter picks instances per workload, spot included, and follows price and demand as they change.
Workloads span several zones or regions. Karpenter can provision capacity in each of them, which helps availability and performance.
Workloads need different instance types, like GPU nodes for AI/ML jobs or memory-heavy machines for others. A NodePool lets Karpenter scale for each workload as it shows up.
Case Study: handling node group updates with Karpenter
For one client, the problem was node group updates during EKS upgrades, and we used Karpenter to fix it. Their environment ran on EC2 Launch Templates inside EKS node groups. After the change, upgrades took less manual work and services stayed up through them.
Purpose:
We moved the workloads to an EKS node group that uses an EC2 Launch Template, so upgrades could run without someone babysitting them.
Key advantages of this solution:
When EKS is upgraded to a new version, AWS updates the node template with the latest AMI ID by itself. Karpenter then launches new nodes from that template, so nobody has to edit it.
With EKS cluster auto-upgrades turned on, master and worker nodes both get upgraded automatically. Nobody updates AMIs in Karpenter’s configuration by hand anymore.
During the upgrade, Karpenter moves workloads onto the new nodes without taking services down.
Karpenter launches instances outside the predefined node groups but still inside the EKS cluster. So it can size nodes for each workload, and every node is still a normal member of the cluster.
Pairing Karpenter with EC2 Launch Templates gave this client automatic upgrades with no downtime, and kept Karpenter’s per-workload scaling. This setup used the launch template support in older Karpenter releases; current releases set the AMI through an EC2NodeClass instead, as in the sample above.
We run Kubernetes upgrades and node scaling for teams on EKS. See our platform engineering and DevOps services or talk to us.
Load on a Kubernetes cluster is rarely flat, so something has to decide when nodes get added and when they go away. On EKS that is usually Karpenter or Cluster Autoscaler (CA). Both scale the cluster, but they go about it differently, and the differences show up in how you configure them, how you upgrade, and what you pay for EC2. Below we compare the two and say where we would use each.
Cluster autoscaler
Purpose: Cluster Autoscaler changes how many nodes the cluster has. If pods can’t be scheduled, it adds nodes. If demand drops, it takes them away.
Key point: CA only scales node groups you defined up front (sets of identical VMs). It grows or shrinks those groups based on pod demand, which is fine when the workload is predictable.
Sample configuration (Priority expander): The priority expander decides which node group CA grows first. Here is a sample:
apiVersion: v1 kind: ConfigMap metadata: name: cluster-autoscaler-priority-expander namespace: kube-system data: priorities: | 10: - "node-group-small" # Highest priority 20: - "node-group-medium" # Second priority 50: - "node-group-large" # Lower priority 100: - "*" # Catch-all, lowest priority for other node groups
Each node group gets a priority number. When CA needs capacity, it goes down that list, as far as the capacity actually available lets it.
Karpenter
Purpose: Karpenter is the more flexible of the two. It also changes the node count, but it picks the instance type for every node too, based on what the pending pods ask for at that moment.
Key Point: That pays off when demand swings a lot. Karpenter can pull from many instance types, spot included, to save money, while CA is stuck with whatever shape the node group was built with.
Sample configuration (NodePool): Here is a NodePool, with the EC2NodeClass it points to, that lets Karpenter scale freely. Karpenter releases before v0.32 called this object a Provisioner.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: configuration spec: template: metadata: labels: nodegroup: configuration spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: configuration requirements: - key: karpenter.sh/capacity-type operator: In values: ["on-demand", "spot"] - key: node.kubernetes.io/instance-type operator: In values: ["<Instance Type>"] - key: kubernetes.io/arch operator: In values: ["amd64"] - key: kubernetes.io/os operator: In values: ["linux"] limits: cpu: "20" memory: 32Gi disruption: consolidationPolicy: WhenEmptyOrUnderutilized --- apiVersion: karpenter.k8s.aws/v1 kind: EC2NodeClass metadata: name: configuration spec: role: <Your Karpenter node IAM role> amiSelectorTerms: - alias: al2023@latest subnetSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> securityGroupSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> tags: Name
With this in place Karpenter chooses instance types and sizes from the workload’s requests, and moves between on-demand and spot when it needs to.
Comparison: how Karpenter and Cluster Autoscaler work
Cluster Autoscaler (CA):
CA talks to EKS-managed node groups directly and only scales the groups named in its configuration map. It follows the Kubernetes Scheduler: when pods don’t fit on the existing nodes it adds one, and when a node sits mostly idle it removes it. Which group grows is decided by the priority expander config.
Karpenter:
Karpenter doesn’t use EKS-managed node groups at all. It calls the EC2 fleet API and creates instances as pods need them. The NodePool lists the instance requirements, and Karpenter picks instance types that meet them at launch time. Because it reads labels and node affinity off the pods, a pod that needs something specific gets an instance chosen for it, which is much finer control than a node group gives you.
How each tool handles scaling in and out
Cluster Autoscaler: CA reads priority values from the expander config map. Each entry is a regular expression matched against node group names, and the group with the highest priority scales first. Nodes are added when the scheduler can’t place a pod and removed when they’re underused.
Karpenter: Karpenter matches workloads to nodes with the node affinity and labels set in the NodePool. When pods are pending it launches EC2 instances for them, picking architecture, OS type, instance type and capacity type within whatever the NodePool allows.
EKS upgrade considerations
Cluster Autoscaler: EKS upgrades are the easy part with CA. Managed node groups replace their own nodes during a rolling upgrade or a force update, and CA needs nothing extra from you.
Karpenter: This is where Karpenter can cost you work. It doesn’t use node groups or Auto Scaling groups, so EKS won’t roll its nodes for you. If your EC2NodeClass pins a specific Amazon Machine Image (AMI), you have to update it to one that matches the new EKS version; Karpenter then treats the old nodes as drifted and replaces them. With an AMI alias such as al2023@latest, it picks up the new AMI by itself.
Node types: on-demand vs. spot
Cluster Autoscaler: CA only uses the node types defined in the managed node groups. It can’t choose between on-demand and spot by itself; you set that in the node group ahead of time.
Karpenter: A NodePool can pick any node type it’s allowed, and switch between on-demand and spot depending on availability and price. If cost is a big concern, running on spot instances can save a lot.
When to use cluster autoscaler vs. Karpenter
Cluster autoscaler: Use it when the environment is stable and predictable and the node groups already exist:
Your scaling needs are fairly fixed and fit inside the groups you defined. CA does that job simply and reliably.
Workloads don’t need to scale fast or change shape, for example batch jobs with set scaling parameters.
You run a mature production setup. CA has been around for years, it is built for Kubernetes, cloud providers support it, and it is stable on standard workloads.
Karpenter: Use it when load moves around a lot and cost matters:
You want the EC2 bill down. Karpenter picks instances per workload, spot included, and follows price and demand as they change.
Workloads span several zones or regions. Karpenter can provision capacity in each of them, which helps availability and performance.
Workloads need different instance types, like GPU nodes for AI/ML jobs or memory-heavy machines for others. A NodePool lets Karpenter scale for each workload as it shows up.
Case Study: handling node group updates with Karpenter
For one client, the problem was node group updates during EKS upgrades, and we used Karpenter to fix it. Their environment ran on EC2 Launch Templates inside EKS node groups. After the change, upgrades took less manual work and services stayed up through them.
Purpose:
We moved the workloads to an EKS node group that uses an EC2 Launch Template, so upgrades could run without someone babysitting them.
Key advantages of this solution:
When EKS is upgraded to a new version, AWS updates the node template with the latest AMI ID by itself. Karpenter then launches new nodes from that template, so nobody has to edit it.
With EKS cluster auto-upgrades turned on, master and worker nodes both get upgraded automatically. Nobody updates AMIs in Karpenter’s configuration by hand anymore.
During the upgrade, Karpenter moves workloads onto the new nodes without taking services down.
Karpenter launches instances outside the predefined node groups but still inside the EKS cluster. So it can size nodes for each workload, and every node is still a normal member of the cluster.
Pairing Karpenter with EC2 Launch Templates gave this client automatic upgrades with no downtime, and kept Karpenter’s per-workload scaling. This setup used the launch template support in older Karpenter releases; current releases set the AMI through an EC2NodeClass instead, as in the sample above.
We run Kubernetes upgrades and node scaling for teams on EKS. See our platform engineering and DevOps services or talk to us.
Load on a Kubernetes cluster is rarely flat, so something has to decide when nodes get added and when they go away. On EKS that is usually Karpenter or Cluster Autoscaler (CA). Both scale the cluster, but they go about it differently, and the differences show up in how you configure them, how you upgrade, and what you pay for EC2. Below we compare the two and say where we would use each.
Cluster autoscaler
Purpose: Cluster Autoscaler changes how many nodes the cluster has. If pods can’t be scheduled, it adds nodes. If demand drops, it takes them away.
Key point: CA only scales node groups you defined up front (sets of identical VMs). It grows or shrinks those groups based on pod demand, which is fine when the workload is predictable.
Sample configuration (Priority expander): The priority expander decides which node group CA grows first. Here is a sample:
apiVersion: v1 kind: ConfigMap metadata: name: cluster-autoscaler-priority-expander namespace: kube-system data: priorities: | 10: - "node-group-small" # Highest priority 20: - "node-group-medium" # Second priority 50: - "node-group-large" # Lower priority 100: - "*" # Catch-all, lowest priority for other node groups
Each node group gets a priority number. When CA needs capacity, it goes down that list, as far as the capacity actually available lets it.
Karpenter
Purpose: Karpenter is the more flexible of the two. It also changes the node count, but it picks the instance type for every node too, based on what the pending pods ask for at that moment.
Key Point: That pays off when demand swings a lot. Karpenter can pull from many instance types, spot included, to save money, while CA is stuck with whatever shape the node group was built with.
Sample configuration (NodePool): Here is a NodePool, with the EC2NodeClass it points to, that lets Karpenter scale freely. Karpenter releases before v0.32 called this object a Provisioner.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: configuration spec: template: metadata: labels: nodegroup: configuration spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: configuration requirements: - key: karpenter.sh/capacity-type operator: In values: ["on-demand", "spot"] - key: node.kubernetes.io/instance-type operator: In values: ["<Instance Type>"] - key: kubernetes.io/arch operator: In values: ["amd64"] - key: kubernetes.io/os operator: In values: ["linux"] limits: cpu: "20" memory: 32Gi disruption: consolidationPolicy: WhenEmptyOrUnderutilized --- apiVersion: karpenter.k8s.aws/v1 kind: EC2NodeClass metadata: name: configuration spec: role: <Your Karpenter node IAM role> amiSelectorTerms: - alias: al2023@latest subnetSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> securityGroupSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> tags: Name
With this in place Karpenter chooses instance types and sizes from the workload’s requests, and moves between on-demand and spot when it needs to.
Comparison: how Karpenter and Cluster Autoscaler work
Cluster Autoscaler (CA):
CA talks to EKS-managed node groups directly and only scales the groups named in its configuration map. It follows the Kubernetes Scheduler: when pods don’t fit on the existing nodes it adds one, and when a node sits mostly idle it removes it. Which group grows is decided by the priority expander config.
Karpenter:
Karpenter doesn’t use EKS-managed node groups at all. It calls the EC2 fleet API and creates instances as pods need them. The NodePool lists the instance requirements, and Karpenter picks instance types that meet them at launch time. Because it reads labels and node affinity off the pods, a pod that needs something specific gets an instance chosen for it, which is much finer control than a node group gives you.
How each tool handles scaling in and out
Cluster Autoscaler: CA reads priority values from the expander config map. Each entry is a regular expression matched against node group names, and the group with the highest priority scales first. Nodes are added when the scheduler can’t place a pod and removed when they’re underused.
Karpenter: Karpenter matches workloads to nodes with the node affinity and labels set in the NodePool. When pods are pending it launches EC2 instances for them, picking architecture, OS type, instance type and capacity type within whatever the NodePool allows.
EKS upgrade considerations
Cluster Autoscaler: EKS upgrades are the easy part with CA. Managed node groups replace their own nodes during a rolling upgrade or a force update, and CA needs nothing extra from you.
Karpenter: This is where Karpenter can cost you work. It doesn’t use node groups or Auto Scaling groups, so EKS won’t roll its nodes for you. If your EC2NodeClass pins a specific Amazon Machine Image (AMI), you have to update it to one that matches the new EKS version; Karpenter then treats the old nodes as drifted and replaces them. With an AMI alias such as al2023@latest, it picks up the new AMI by itself.
Node types: on-demand vs. spot
Cluster Autoscaler: CA only uses the node types defined in the managed node groups. It can’t choose between on-demand and spot by itself; you set that in the node group ahead of time.
Karpenter: A NodePool can pick any node type it’s allowed, and switch between on-demand and spot depending on availability and price. If cost is a big concern, running on spot instances can save a lot.
When to use cluster autoscaler vs. Karpenter
Cluster autoscaler: Use it when the environment is stable and predictable and the node groups already exist:
Your scaling needs are fairly fixed and fit inside the groups you defined. CA does that job simply and reliably.
Workloads don’t need to scale fast or change shape, for example batch jobs with set scaling parameters.
You run a mature production setup. CA has been around for years, it is built for Kubernetes, cloud providers support it, and it is stable on standard workloads.
Karpenter: Use it when load moves around a lot and cost matters:
You want the EC2 bill down. Karpenter picks instances per workload, spot included, and follows price and demand as they change.
Workloads span several zones or regions. Karpenter can provision capacity in each of them, which helps availability and performance.
Workloads need different instance types, like GPU nodes for AI/ML jobs or memory-heavy machines for others. A NodePool lets Karpenter scale for each workload as it shows up.
Case Study: handling node group updates with Karpenter
For one client, the problem was node group updates during EKS upgrades, and we used Karpenter to fix it. Their environment ran on EC2 Launch Templates inside EKS node groups. After the change, upgrades took less manual work and services stayed up through them.
Purpose:
We moved the workloads to an EKS node group that uses an EC2 Launch Template, so upgrades could run without someone babysitting them.
Key advantages of this solution:
When EKS is upgraded to a new version, AWS updates the node template with the latest AMI ID by itself. Karpenter then launches new nodes from that template, so nobody has to edit it.
With EKS cluster auto-upgrades turned on, master and worker nodes both get upgraded automatically. Nobody updates AMIs in Karpenter’s configuration by hand anymore.
During the upgrade, Karpenter moves workloads onto the new nodes without taking services down.
Karpenter launches instances outside the predefined node groups but still inside the EKS cluster. So it can size nodes for each workload, and every node is still a normal member of the cluster.
Pairing Karpenter with EC2 Launch Templates gave this client automatic upgrades with no downtime, and kept Karpenter’s per-workload scaling. This setup used the launch template support in older Karpenter releases; current releases set the AMI through an EC2NodeClass instead, as in the sample above.
We run Kubernetes upgrades and node scaling for teams on EKS. See our platform engineering and DevOps services or talk to us.
Load on a Kubernetes cluster is rarely flat, so something has to decide when nodes get added and when they go away. On EKS that is usually Karpenter or Cluster Autoscaler (CA). Both scale the cluster, but they go about it differently, and the differences show up in how you configure them, how you upgrade, and what you pay for EC2. Below we compare the two and say where we would use each.
Cluster autoscaler
Purpose: Cluster Autoscaler changes how many nodes the cluster has. If pods can’t be scheduled, it adds nodes. If demand drops, it takes them away.
Key point: CA only scales node groups you defined up front (sets of identical VMs). It grows or shrinks those groups based on pod demand, which is fine when the workload is predictable.
Sample configuration (Priority expander): The priority expander decides which node group CA grows first. Here is a sample:
apiVersion: v1 kind: ConfigMap metadata: name: cluster-autoscaler-priority-expander namespace: kube-system data: priorities: | 10: - "node-group-small" # Highest priority 20: - "node-group-medium" # Second priority 50: - "node-group-large" # Lower priority 100: - "*" # Catch-all, lowest priority for other node groups
Each node group gets a priority number. When CA needs capacity, it goes down that list, as far as the capacity actually available lets it.
Karpenter
Purpose: Karpenter is the more flexible of the two. It also changes the node count, but it picks the instance type for every node too, based on what the pending pods ask for at that moment.
Key Point: That pays off when demand swings a lot. Karpenter can pull from many instance types, spot included, to save money, while CA is stuck with whatever shape the node group was built with.
Sample configuration (NodePool): Here is a NodePool, with the EC2NodeClass it points to, that lets Karpenter scale freely. Karpenter releases before v0.32 called this object a Provisioner.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: configuration spec: template: metadata: labels: nodegroup: configuration spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: configuration requirements: - key: karpenter.sh/capacity-type operator: In values: ["on-demand", "spot"] - key: node.kubernetes.io/instance-type operator: In values: ["<Instance Type>"] - key: kubernetes.io/arch operator: In values: ["amd64"] - key: kubernetes.io/os operator: In values: ["linux"] limits: cpu: "20" memory: 32Gi disruption: consolidationPolicy: WhenEmptyOrUnderutilized --- apiVersion: karpenter.k8s.aws/v1 kind: EC2NodeClass metadata: name: configuration spec: role: <Your Karpenter node IAM role> amiSelectorTerms: - alias: al2023@latest subnetSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> securityGroupSelectorTerms: - tags: karpenter.sh/discovery: <cluster-name> tags: Name
With this in place Karpenter chooses instance types and sizes from the workload’s requests, and moves between on-demand and spot when it needs to.
Comparison: how Karpenter and Cluster Autoscaler work
Cluster Autoscaler (CA):
CA talks to EKS-managed node groups directly and only scales the groups named in its configuration map. It follows the Kubernetes Scheduler: when pods don’t fit on the existing nodes it adds one, and when a node sits mostly idle it removes it. Which group grows is decided by the priority expander config.
Karpenter:
Karpenter doesn’t use EKS-managed node groups at all. It calls the EC2 fleet API and creates instances as pods need them. The NodePool lists the instance requirements, and Karpenter picks instance types that meet them at launch time. Because it reads labels and node affinity off the pods, a pod that needs something specific gets an instance chosen for it, which is much finer control than a node group gives you.
How each tool handles scaling in and out
Cluster Autoscaler: CA reads priority values from the expander config map. Each entry is a regular expression matched against node group names, and the group with the highest priority scales first. Nodes are added when the scheduler can’t place a pod and removed when they’re underused.
Karpenter: Karpenter matches workloads to nodes with the node affinity and labels set in the NodePool. When pods are pending it launches EC2 instances for them, picking architecture, OS type, instance type and capacity type within whatever the NodePool allows.
EKS upgrade considerations
Cluster Autoscaler: EKS upgrades are the easy part with CA. Managed node groups replace their own nodes during a rolling upgrade or a force update, and CA needs nothing extra from you.
Karpenter: This is where Karpenter can cost you work. It doesn’t use node groups or Auto Scaling groups, so EKS won’t roll its nodes for you. If your EC2NodeClass pins a specific Amazon Machine Image (AMI), you have to update it to one that matches the new EKS version; Karpenter then treats the old nodes as drifted and replaces them. With an AMI alias such as al2023@latest, it picks up the new AMI by itself.
Node types: on-demand vs. spot
Cluster Autoscaler: CA only uses the node types defined in the managed node groups. It can’t choose between on-demand and spot by itself; you set that in the node group ahead of time.
Karpenter: A NodePool can pick any node type it’s allowed, and switch between on-demand and spot depending on availability and price. If cost is a big concern, running on spot instances can save a lot.
When to use cluster autoscaler vs. Karpenter
Cluster autoscaler: Use it when the environment is stable and predictable and the node groups already exist:
Your scaling needs are fairly fixed and fit inside the groups you defined. CA does that job simply and reliably.
Workloads don’t need to scale fast or change shape, for example batch jobs with set scaling parameters.
You run a mature production setup. CA has been around for years, it is built for Kubernetes, cloud providers support it, and it is stable on standard workloads.
Karpenter: Use it when load moves around a lot and cost matters:
You want the EC2 bill down. Karpenter picks instances per workload, spot included, and follows price and demand as they change.
Workloads span several zones or regions. Karpenter can provision capacity in each of them, which helps availability and performance.
Workloads need different instance types, like GPU nodes for AI/ML jobs or memory-heavy machines for others. A NodePool lets Karpenter scale for each workload as it shows up.
Case Study: handling node group updates with Karpenter
For one client, the problem was node group updates during EKS upgrades, and we used Karpenter to fix it. Their environment ran on EC2 Launch Templates inside EKS node groups. After the change, upgrades took less manual work and services stayed up through them.
Purpose:
We moved the workloads to an EKS node group that uses an EC2 Launch Template, so upgrades could run without someone babysitting them.
Key advantages of this solution:
When EKS is upgraded to a new version, AWS updates the node template with the latest AMI ID by itself. Karpenter then launches new nodes from that template, so nobody has to edit it.
With EKS cluster auto-upgrades turned on, master and worker nodes both get upgraded automatically. Nobody updates AMIs in Karpenter’s configuration by hand anymore.
During the upgrade, Karpenter moves workloads onto the new nodes without taking services down.
Karpenter launches instances outside the predefined node groups but still inside the EKS cluster. So it can size nodes for each workload, and every node is still a normal member of the cluster.
Pairing Karpenter with EC2 Launch Templates gave this client automatic upgrades with no downtime, and kept Karpenter’s per-workload scaling. This setup used the launch template support in older Karpenter releases; current releases set the AMI through an EC2NodeClass instead, as in the sample above.
We run Kubernetes upgrades and node scaling for teams on EKS. See our platform engineering and DevOps services or talk to us.
Share
Share
On this page
In this post
section
Share
Related Content

Kong API Gateway for Gaming and Sports Betting Integrations

Modernising Observability for a Billion Dollar Revenue Gaming Platform

Migrating from AWS Glue to Self-Hosted ClickHouse: 70% Cost Reduction for a Fintech Client.

How we reduced Kafka message latency by 90% and increased throughput 4x for a $300M SaaS platform.
















