Design node scaling for EKS with mixed Spot and On-Demand and fast scale-up.
AdvancedScenarioECS, EKS, Lambda and ECR
Answer
Situation read → Karpenter replaces fixed node groups with just-in-time right-sized nodes.
What I'd do →
- Install Karpenter with a
NodePoolallowing multiple instance families andspotpluson-demandcapacity types - Set
disruptionconsolidation policyWhenEmptyOrUnderutilized - Keep a small managed node group for system pods
- Use PDBs and
topologySpreadConstraints - Handle interruption via SQS queue integration
Why → Karpenter picks the cheapest fitting instance in seconds rather than scaling fixed groups.
Interview tip → Mention bin-packing and consolidation.
More on ECS, EKS, Lambda and ECR
ECS on Fargate or on EC2: how do you choose?BeginnerDeploy a containerized API on ECS behind an ALB. What are the building blocks?BeginnerAn ECS service deployment is stuck, tasks start and stop repeatedly. How do you debug?IntermediateRoll out a new ECS service version with canary and automatic rollback.IntermediateEKS pods need access to S3 without node-level permissions. How?IntermediateUpgrade an EKS cluster from 1.31 to 1.33 safely.Intermediate