-
Notifications
You must be signed in to change notification settings - Fork 855
/
large-instances.yaml
39 lines (39 loc) · 1.24 KB
/
large-instances.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This example NodePool will avoid small instance types in the cluster
---
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:
name: large-instances
annotations:
kubernetes.io/description: "NodePool for provisioning larger instances using Gt/Lt requirements"
spec:
template:
spec:
requirements:
# exclude instances with < 4 cores and < 8GiB memory (8192 mebibytes)
- key: "karpenter.k8s.aws/instance-cpu"
operator: Gt
values: ["3"]
- key: "karpenter.k8s.aws/instance-memory"
operator: Gt
values: ["8191"]
nodeClassRef:
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
name: default
---
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
name: default
annotations:
kubernetes.io/description: "General purpose EC2NodeClass for running Amazon Linux 2 nodes"
spec:
amiFamily: AL2 # Amazon Linux 2
role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name
subnetSelectorTerms:
- tags:
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name
securityGroupSelectorTerms:
- tags:
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name