karpenter-provider-gcp

module
v0.6.1-0...-63d51cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: Apache-2.0

README

Karpenter Provider GCP Banner

Autoscale GKE cluster nodes efficiently and cost-effectively.

GitHub stars GitHub forks GitHub License contributions welcome Artifact Hub

[!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.

Learn more about CloudPilot AI or get in touch for production support.

Documentation

See docs/ for installation, configuration, networking, troubleshooting, and contributing guides. See proposals/ for accepted and in-progress design proposals.

Release notes / upgrades

See GitHub Releases for the full changelog. See MIGRATION.md for breaking changes and upgrade steps.

Community

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.

Sponsors

End-to-end testing infrastructure for this project is generously provided by PlanetScale, the fastest Postgres and MySQL.  PlanetScale

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.

Code Of Conduct

Karpenter GCP Cloud Provider adopts CNCF code of conduct.

License

Karpenter GCP Cloud Provider is under the Apache 2.0 license. See the LICENSE file for details.

Directories

Path Synopsis
cmd
controller command
hack
price_validate command
pkg
apis
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
apis/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +groupName=karpenter.k8s.gcp
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +groupName=karpenter.k8s.gcp
metadata
Package metadata defines the provider's typed model for GKE bootstrap metadata and GCE instance labels.
Package metadata defines the provider's typed model for GKE bootstrap metadata and GCE instance labels.
providers/disktype
Package disktype exposes machine-family compatibility labels for Google Persistent Disk CSI disk types.
Package disktype exposes machine-family compatibility labels for Google Persistent Disk CSI disk types.
providers/gke
Package gke centralizes GKE cluster and server-configuration lookups used by providers.
Package gke centralizes GKE cluster and server-configuration lookups used by providers.
providers/imagefamily
Package imagefamily resolves GCENodeClass image selectors into boot disk images.
Package imagefamily resolves GCENodeClass image selectors into boot disk images.
providers/instance
Package instance owns GCE VM lifecycle operations for Karpenter NodeClaims.
Package instance owns GCE VM lifecycle operations for Karpenter NodeClaims.
providers/instancetype
Package instancetype discovers GCE machine types and converts them into Karpenter instance types.
Package instancetype discovers GCE machine types and converts them into Karpenter instance types.
providers/nodepooltemplate
Package nodepooltemplate selects and maintains the GKE node pool used as the bootstrap source for Karpenter-created nodes.
Package nodepooltemplate selects and maintains the GKE node pool used as the bootstrap source for Karpenter-created nodes.
providers/pricing
Package pricing provides regional on-demand and Spot prices for GCE machine types.
Package pricing provides regional on-demand and Spot prices for GCE machine types.
providers/version
Package version reports the Kubernetes API server version used by providers and controllers.
Package version reports the Kubernetes API server version used by providers and controllers.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL