Skip to content

Commit 7254363

Browse files
chore: add v1 NodePool examples (#541)
* chore: add v1 NodePool examples * fix: reduce disruption budget in the examples --------- Co-authored-by: Bryce Soghigian <[email protected]>
1 parent e32117f commit 7254363

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

examples/v1/general-purpose.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This example NodePool will provision general purpose instances
2+
---
3+
apiVersion: karpenter.sh/v1
4+
kind: NodePool
5+
metadata:
6+
name: general-purpose
7+
annotations:
8+
kubernetes.io/description: "General purpose NodePool"
9+
spec:
10+
disruption:
11+
consolidateAfter: 0s
12+
budgets:
13+
- nodes: 30%
14+
template:
15+
metadata:
16+
labels:
17+
# required for Karpenter to predict overhead from cilium DaemonSet
18+
kubernetes.azure.com/ebpf-dataplane: cilium
19+
spec:
20+
nodeClassRef:
21+
group: karpenter.azure.com
22+
kind: AKSNodeClass
23+
name: default
24+
startupTaints:
25+
# https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint
26+
- key: node.cilium.io/agent-not-ready
27+
effect: NoExecute
28+
value: "true"
29+
expireAfter: Never
30+
requirements:
31+
- key: kubernetes.io/arch
32+
operator: In
33+
values: ["amd64"]
34+
- key: kubernetes.io/os
35+
operator: In
36+
values: ["linux"]
37+
- key: karpenter.sh/capacity-type
38+
operator: In
39+
values: ["on-demand"]
40+
- key: karpenter.azure.com/sku-family
41+
operator: In
42+
values: [D]
43+
---
44+
apiVersion: karpenter.azure.com/v1alpha2
45+
kind: AKSNodeClass
46+
metadata:
47+
name: default
48+
annotations:
49+
kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes"
50+
spec:
51+
imageFamily: Ubuntu2204

examples/v1/system-surge.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This example NodePool will provision general purpose instances
2+
---
3+
apiVersion: karpenter.sh/v1
4+
kind: NodePool
5+
metadata:
6+
name: system-surge
7+
annotations:
8+
kubernetes.io/description: "System NodePool (surge capacity)"
9+
spec:
10+
disruption:
11+
consolidateAfter: 0s
12+
budgets:
13+
- nodes: 30%
14+
template:
15+
metadata:
16+
labels:
17+
kubernetes.azure.com/mode: "system"
18+
# required for Karpenter to predict overhead from cilium DaemonSet
19+
kubernetes.azure.com/ebpf-dataplane: cilium
20+
spec:
21+
nodeClassRef:
22+
group: karpenter.azure.com
23+
kind: AKSNodeClass
24+
name: default
25+
startupTaints:
26+
# https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint
27+
- key: node.cilium.io/agent-not-ready
28+
effect: NoExecute
29+
value: "true"
30+
taints:
31+
- key: CriticalAddonsOnly
32+
effect: NoSchedule
33+
value: "true"
34+
expireAfter: Never
35+
requirements:
36+
- key: kubernetes.io/arch
37+
operator: In
38+
values: ["amd64"]
39+
- key: kubernetes.io/os
40+
operator: In
41+
values: ["linux"]
42+
- key: karpenter.sh/capacity-type
43+
operator: In
44+
values: ["on-demand"]
45+
- key: karpenter.azure.com/sku-family
46+
operator: In
47+
values: [D]
48+
---
49+
apiVersion: karpenter.azure.com/v1alpha2
50+
kind: AKSNodeClass
51+
metadata:
52+
name: system-surge
53+
annotations:
54+
kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes"
55+
spec:
56+
imageFamily: Ubuntu2204

0 commit comments

Comments
 (0)