A NodeOverlay is a Karpenter API resource used to inject alternative assumptions into the scheduling simulation. By default, Karpenter relies on cloud provider APIs for instance type offerings and base prices. NodeOverlay allows users to fine-tune these simulations for advanced use cases that the standard API cannot express, such as custom pricing models or extended resource capacities.
Use Cases
- Complex Pricing: Adjusting for vendor fees, negotiated discounts, capacity type discounts, or carbon-offset costs.
- Resource Capacity Management: Accounting for extended resources (like GPUs or HugePages) or custom system overhead that isn't captured by standard CPU/Memory metrics.
How it works
NodeOverlay uses a requirements field to match specific instance types or NodePools. When multiple overlays match an offering, they are merged using spec.weight to resolve conflicts. Changes to price, priceAdjustment, or capacity are integrated into Karpenter's scheduling and consolidation cycles automatically.
apiVersion: karpenter.sh/v1alpha1
kind: NodeOverlay
metadata:
name: default
spec:
weight: ...
requirements:
...
price:
priceAdjustment: ...
capacity:
...
status:
condition:
- lastTransitionTime: "..."
message: ""
reason: ...
status: "True"
type: Ready