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/v1kind: NodePoolmetadata:name: defaultspec:# Constrain the maximum size of the node poollimits:cpu: 256memory: 1024Gidisruption:# Allow Karpenter to consolidate nodes when they are empty or underutilizedconsolidationPolicy: WhenEmptyOrUnderutilizedconsolidateAfter: 5mbudgets:# 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 poolnodeClassRef:group: karpenter.k8s.awskind: EC2NodeClassname: private# Force node replacement after about a monthexpireAfter: 720hrequirements:# Select from standard instance families (compute, general, memory)- key: karpenter.k8s.aws/instance-categoryoperator: Invalues: ["c", "m", "r"]# Only choose instances greater than this generation- key: karpenter.k8s.aws/instance-generationoperator: Gtvalues: ["2"]# Only use on-demand instances in this pool- key: karpenter.sh/capacity-typeoperator: Invalues: ["on-demand"]- key: kubernetes.io/archoperator: In# Allow AMD64 and ARM64 (e.g., Graviton) proceseorsvalues: ["amd64", "arm64"]# Only use Linux as the OS in this pool- key: kubernetes.io/osoperator: Invalues: ["linux"]
apiVersion: karpenter.sh/v1kind: NodePoolmetadata: name: gpuspec: # 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"]