Stage 10, Part 9 of 9 · p. 91, Autoscaling & Cost Optimization

Summary Cheat Sheet

ConceptKey Takeaway
HPAScales replicas based on metrics
VPAAdjusts resource requests/limits
KEDAEvent-driven autoscaling, scale to zero
Cluster AutoscalerNode scaling (3-4 min)
KarpenterNode provisioning (45-60s), consolidation
Spot instances60-90% discount, interruption risk
Bin-packingMostAllocated scoring
Node consolidationKarpenter, Descheduler
PDBCan block scale-down
KubecostCost monitoring (IBM)
OpenCostCost monitoring (CNCF)
GoldilocksVPA recommendations dashboard
Resource requestsScheduler uses these, not usage
QoSGuaranteed > Burstable > BestEffort
HPA behaviorScale up fast, scale down slow
VPA + HPA conflictNever both on CPU
Karpenter consolidation50% node reduction in production
Cost governanceVisibility → Optimization → Scaling → Governance

1:1 copy of the class Google Doc, code in code blocks.