Kubernetes (K8s) (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
Cluster Autoscaling: Kubernetes Cluster Autoscaler vs. Karpenter.
senior LevelMost AskedKubernetesSystem Design
In Simple Words: When new Pods cannot be scheduled because nodes have exhausted their CPU/RAM requests:
- Kubernetes Cluster Autoscaler (CAS):
- Tightly coupled to Cloud Auto Scaling Groups (ASGs).
- Slow (takes 3 to 7 minutes to provision nodes).
- Scales pre-configured homogeneous node groups (e.g. all
m5.xlarge).
- Karpenter (AWS / CNCF):
- Group-less, Just-In-Time Node Provisioner.
- Bypasses cloud ASGs and calls cloud EC2 APIs directly.
- Inspects the exact resource requests, architecture (ARM64 vs x86), and tolerations of pending Pods, and dynamically provisions the most cost-effective EC2 instance in under 45 seconds.
- Automatically consolidates and deprovisions underutilized nodes to minimize cloud spend.