karpenter.sh/v1
·NodePool
NodePool is the Schema for the NodePools API
Click on Property Name to show the description, and Pink Types to expand schema.
Required properties are marked with *
Change History
Karpenter v1.3.3
Karpenter v1.3.2
Karpenter v1.3.1
Karpenter v1.3.0
Karpenter v1.2.3
Karpenter v1.2.2
Karpenter v1.2.1
Karpenter v1.2.0
Karpenter v1.1.5
Karpenter v1.1.4
Karpenter v1.1.3
Karpenter v1.1.2
Karpenter v1.1.1
Karpenter v1.1.0
Karpenter v1.0.9
Karpenter v1.0.8
Karpenter v1.0.7
Karpenter v1.0.6
Karpenter v1.0.5
Karpenter v1.0.4
Karpenter v1.0.3
Karpenter v1.0.2
~2
2 properties have changed the description
- .spec.template.spec.terminationGracePeriod
- .status.conditions.type
Karpenter v1.0.1
Examples
There are 2 examples of NodePool that you can use as a starting point to create your own.
apiVersion: karpenter.sh/v1 kind: NodePool metadata: name: default spec: # Constrain the maximum size of the node pool limits: cpu: 256 memory: 1024Gi disruption: # Allow Karpenter to consolidate nodes when they are empty or underutilized consolidationPolicy: WhenEmptyOrUnderutilized consolidateAfter: 5m budgets: # Allow voluntary disruptions to 5% of the nodes in the pool for any reason - nodes: "5%" template: spec: # Use the EC2NodeClass named "private" as the node template in this pool nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: private # Force node replacement after about a month expireAfter: 720h requirements: # Select from standard instance families (compute, general, memory) - key: karpenter.k8s.aws/instance-category operator: In values: ["c", "m", "r"] # Only choose instances greater than this generation - key: karpenter.k8s.aws/instance-generation operator: Gt values: ["2"] # Only use on-demand instances in this pool - key: karpenter.sh/capacity-type operator: In values: ["on-demand"] - key: kubernetes.io/arch operator: In # Allow AMD64 and ARM64 (e.g., Graviton) proceseors values: ["amd64", "arm64"] # Only use Linux as the OS in this pool - key: kubernetes.io/os operator: In values: ["linux"]
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: gpu
spec:
# Constrain the maximum size of the node pool
limits:
cpu: 256
memory: 1024Gi
disruption:
# Allow Karpenter to consolidate nodes when they are empty or underutilized
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 5m
budgets:
# Allow voluntary disruptions to 5% of the nodes in the pool for any reason
- nodes: "5%"
template:
spec:
# Use the EC2NodeClass named "private" as the node template in this pool
nodeClassRef:
group: karpenter.k8s.aws
kind: EC2NodeClass
name: private
# Never force replacement of nodes
expireAfter: Never
# Taint nodes so arbitrary workloads don't wind up provisioning expensive
# GPU instances.
taints:
- effect: NoSchedule
key: karpenter.sh/nodepool
value: "gpu"
requirements:
# Only use instances with NVIDIA GPUs
- key: karpenter.k8s.aws/instance-gpu-manufacturer
operator: In
values: ["nvidia"]
# Only use on-demand instances in this pool
- key: karpenter.sh/capacity-type
operator: In
values: ["on-demand"]
# Only use Linux as the OS in this pool
- key: kubernetes.io/os
operator: In
values: ["linux"]