Just-in-time nodes for any Kubernetes cluster
open sourceApache-2.0self-hostablefree
Karpenter is a Kubernetes node autoscaler that watches for unschedulable pods, evaluates their scheduling constraints and launches nodes that fit them, choosing instance types, zones and capacity types (Spot or on-demand) per NodePool, then removes or replaces nodes through consolidation, drift, expiry and node repair. It started at AWS and its core is now a Kubernetes SIG Autoscaling project; the AWS and Azure providers are made by those clouds, and others exist for Alibaba Cloud, Bizfly, Clever Cloud, Cluster API, Exoscale, GCP, Hetzner, Huawei Cloud, IBM Cloud, Proxmox, Oracle Cloud, Akamai/Linode (alpha) and UpCloud. Amazon EKS Auto Mode and AKS node auto-provisioning run it for you.
Problems it solves
- launch the right size of node for pending pods instead of growing fixed node groups
- stop maintaining dozens of node groups for different instance types
- pack pods onto fewer, cheaper nodes and remove the empty ones automatically
- mix Spot and on-demand capacity for our cluster and fall back when Spot runs out
- replace nodes automatically when their configuration or machine image drifts from what we declared
- recycle every node after 30 days so none run on old images
- cap how many nodes can be disrupted at once during business hours
- provision GPU nodes only when a GPU job is waiting
- faster node scale-up than the classic cluster autoscaler on AWS
- set a ceiling on the total CPU and memory our cluster can grow to
Features
- provisions nodes that satisfy pending pods' requests, selectors, affinities, tolerations and topology spread
- NodePools with constraints on instance types, zones, architectures and capacity type
- NodePool limits on total CPU and memory
- consolidation: removes or replaces underused nodes
- drift: replaces nodes that no longer match their NodePool or NodeClass
- expiration (expireAfter) and termination grace periods
- node auto repair
- Spot interruption handling
- NodePool disruption budgets
- providers by AWS and Azure, plus community providers for many other clouds
View 1 more
- migration guide from Cluster Autoscaler
Capabilities
| Takes plugins | plan not known |
|---|
Alternatives
The same job
These do what Karpenter does.
- Cluster Autoscaler Automatically adjusts the size of a Kubernetes cluster