Kubernetes (K8s) (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)
Cluster Autoscaling: Horizontal Pod Autoscaler (HPA) vs Karpenter.
senior LevelMost AskedSecurity & AuthKubernetes
In Simple Words:
- Horizontal Pod Autoscaler (HPA): Scales the number of Pod replicas based on CPU, memory, or custom Prometheus metrics.
- Cluster Autoscaler (Legacy): Scales node groups slowly by launching pre-configured VM instance templates.
- Karpenter (Next-Gen Node Autoscaler): High-speed, just-in-time node provisioner:
- Observes unscheduled Pods and calculates the exact compute and GPU requirements.
- Provisions the optimal combination of EC2/cloud instances directly in seconds without static node groups, minimizing cloud compute costs.