Autoscale GKE cluster nodes efficiently and cost-effectively. [!NOTE] A live version is now available. Feedback welcome! Join our Slack to share your ideas, ask questions, and discuss with the community. Introduction Karpenter is an open-source node provisioning project built for Kubernetes. Karpenter improves the efficiency and cost of running workloads on Kubernetes clusters by: Watching for pods that the…
Autoscale GKE cluster nodes efficiently and cost-effectively.
Note 注意
A live version is now available.
Feedback welcome! Join our Slack to share your ideas, ask questions, and discuss with the community.
Introduction
Karpenter is an open-source node provisioning project built for Kubernetes.
Karpenter improves the efficiency and cost of running workloads on Kubernetes clusters by:
Watching for pods that the Kubernetes scheduler has marked as unschedulable
Evaluating scheduling constraints (resource requests, nodeselectors, affinities, tolerations, and topology spread constraints) requested by the pods
Provisioning nodes that meet the requirements of the pods
Removing the nodes when the nodes are no longer needed
How it works
Karpenter observes the aggregate resource requests of unscheduled pods and makes decisions to launch and terminate nodes to minimize scheduling latencies and infrastructure cost.
Karpenter and GKE ComputeClasses
Karpenter and GKE custom ComputeClasses both provide workload-driven compute. ComputeClasses offer a GKE-managed way to describe preferred capacity, while Karpenter provides an open and extensible provisioning layer with direct control over compute selection and node lifecycle.
Choose Karpenter when extensibility and infrastructure control matter:
Extensible by design — Karpenter’s controller and cloud-provider architecture can be extended with new provisioning, scheduling, pricing, lifecycle, and repair capabilities. Teams can evolve the provisioner with their platform instead of waiting for those capabilities to become available in a specific GKE release.
A consistent multi-cloud model — Karpenter uses the same core NodePool and NodeClaim APIs and operational model across AWS, Azure, and GCP. Provider-specific settings remain in each NodeClass, while shared policies, automation, and tooling can follow the same pattern. This reduces friction for multi-cloud platforms and future cloud migrations.
Direct, workload-aware provisioning — Karpenter evaluates native pod requests and scheduling constraints, bin-packs pending workloads, and directly creates the best-fitting GCE VM for each decision. This removes the managed node pool as a provisioning layer and avoids maintaining a node pool for every capacity shape.
GKE ComputeClasses are a good fit when fully managed GKE integration, especially Autopilot, is the primary goal. For platform teams that expect to customize autoscaling, operate across clouds, or retain deeper control over infrastructure decisions, Karpenter provides the more adaptable foundation. Karpenter Provider for GCP currently targets GKE Standard clusters.
Managed optimization for production Kubernetes
For teams running Karpenter in production, CloudPilot AI adds managed cost optimization, reliability automation, deeper cluster visibility, and advanced production features.
See docs/ for installation, configuration, networking, troubleshooting, and contributing guides. See proposals/ for accepted and in-progress design proposals.
We want your contributions and suggestions! One of the easiest ways to contribute is to participate in discussions on the Github Issues/Discussion or chat on Slack.
End-to-end testing infrastructure for this project is generously provided by PlanetScale, the fastest Postgres and MySQL.
Attribution Notice
This project includes code derived from karpenter-provider-aws, used under the Apache License, Version 2.0 terms. We acknowledge the contributions of the original authors and thank them for making their work available. For more details, see the karpenter-provider-aws.
评论