How do you design Karpenter NodePools for production?
AdvancedProductionEKS in Production
Answer
Separate NodePools by purpose (general, Spot batch, GPU), each with broad instance requirements so Karpenter has choice, limits to cap spend, and disruption settings:
apiVersion: karpenter.sh/v1
kind: NodePool
metadata: {name: general}
spec:
template:
spec:
nodeClassRef: {group: karpenter.k8s.aws, kind: EC2NodeClass, name: default}
requirements:
- {key: karpenter.sh/capacity-type, operator: In, values: ["spot", "on-demand"]}
- {key: karpenter.k8s.aws/instance-category, operator: In, values: ["c", "m", "r"]}
- {key: karpenter.k8s.aws/instance-generation, operator: Gt, values: ["5"]}
expireAfter: 720h
limits: {cpu: "1000"}
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 1m
budgets: [{nodes: "10%"}]
Pods still need PodDisruptionBudgets, or consolidation will evict them freely.
More on EKS in Production
Managed node groups, self-managed nodes, Fargate, Karpenter or Auto Mode: how do you choose?IntermediateIRSA or EKS Pod Identity for new clusters?IntermediateHow do you manage who can access the EKS API?IntermediateHow do you run EKS version upgrades safely?AdvancedWhat happens if you stay on an old EKS version?BeginnerWhich node OS do you use for EKS and why?Intermediate