EKS interview question · Most asked
Why is Karpenter popular on EKS, and how does it differ from the Cluster Autoscaler?
Summary
The Cluster Autoscaler scales existing node groups up and down; each group has fixed instance types, so you need many groups for variety. Karpenter watches unschedulable pods and launches instances that fit their combined requirements directly (choosing from many instance types, purchase options and zones), and continuously consolidates by replacing under-used nodes with cheaper or fewer ones.
Longer Answer
Karpenter concepts: NodePools (constraints such as instance families, capacity types, zones, taints, limits and disruption budgets) and EC2NodeClasses (AMI, subnets, security groups, IAM role). Benefits: faster scale-up, better bin-packing, easy spot usage with diversification, and automatic node replacement when AMIs drift.
Watch out for: disruption from consolidation (use PodDisruptionBudgets and do-not-disrupt annotations for sensitive pods), running Karpenter itself on stable capacity (a small managed node group or Fargate), and setting limits so a bug cannot launch unlimited instances.
Key Points
- CA scales node groups; Karpenter launches fitting instances.
- Consolidation lowers cost.
- NodePools and EC2NodeClasses.
- PDBs, limits, Karpenter on stable nodes.
More most-asked EKS questions
- How do you secure an EKS cluster end to end?
- EKS or ECS: how would you choose?
- How does the Amazon VPC CNI work, and why do EKS clusters run out of IP addresses?
- IRSA or EKS Pod Identity: how do pods get AWS permissions?
- Compare the EKS compute options: managed node groups, self-managed nodes, Fargate, Karpenter and EKS Auto Mode.
- How do you expose services on EKS? Explain the AWS Load Balancer Controller.
- How do you upgrade an EKS cluster, and what are standard and extended support?
- What is Amazon EKS, and what does AWS manage versus what do you manage?