Skip to content

Commit

Permalink
updates from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Aug 20, 2024
1 parent 2e83849 commit 3e572d6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
4 changes: 3 additions & 1 deletion ec2_node_class.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
metadata:
name: ${cluster_name}-karpenter-node-class
annotations:
kubernetes.io/description: "EC2NodeClass for running Bottlerocket nodes"
spec:
kubelet:
podsPerCore: 2
Expand Down Expand Up @@ -35,7 +37,7 @@ spec:
# Required, resolves a default ami and userdata
amiFamily: ${amd_ami_family}
amiSelectorTerms:
- alias: bottlerocket@latest
- alias: bottlerocket@latest # Bottlerocket
# Required, discovers subnets to attach to instances
# Each term in the array of subnetSelectorTerms is ORed together
# Within a single term, all conditions are ANDed
Expand Down
56 changes: 24 additions & 32 deletions ec2_node_pool.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,32 @@ apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: ${cluster_name}-node-pool-general
annotations:
kubernetes.io/description: "General purpose NodePool for generic workloads"
spec:
disruption:
consolidationPolicy: WhenUnderutilized
expireAfter: 1h
template:
spec:
requirements:
- key: kubernetes.io/arch
operator: In
values: ["amd64"]
- key: kubernetes.io/os
operator: In
values: ["linux"]
- key: karpenter.sh/capacity-type
operator: In
values: ["on-demand", "spot"]
- key: karpenter.k8s.aws/instance-category
operator: In
values: ["c", "m", "r", "t"]
- key: karpenter.k8s.aws/instance-generation
operator: Gt
values: ["2"]
nodeClassRef:
group: karpenter.k8s.aws
kind: EC2NodeClass
name: ${cluster_name}-karpenter-node-class
requirements:
- key: node.kubernetes.io/instance-type
operator: In
values:
- m5.large
- m5.xlarge
- m5.2xlarge
- c5.large
- c5.xlarge
- c5a.large
- c5a.xlarge
- r5.large
- r5.xlarge
- t3.xlarge
- t3a.xlarge
- t4a.xlarge
- key: kubernetes.io/os
operator: In
values:
- linux
- key: kubernetes.io/arch
operator: In
values:
- amd64
- key: karpenter.sh/capacity-type
operator: In
values:
- on-demand
- spot
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: 1h
expireAfter: 1h

0 comments on commit 3e572d6

Please sign in to comment.