forked from alexei-led/eks-spot-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster.yaml
210 lines (202 loc) · 5.61 KB
/
cluster.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# An example of ClusterConfig showing nodegroups with spot instances
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: gaia-kube
region: us-west-2
availabilityZones: ["us-west-2a", "us-west-2b", "us-west-2c"]
nodeGroups:
# spot workers NG - multi AZ, scale from 3
- name: spot-ng
ami: auto
instanceType: mixed
desiredCapacity: 3
minSize: 2
maxSize: 20
volumeSize: 100
volumeType: gp2
volumeEncrypted: true
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
withAddonPolicies:
imageBuilder: true
autoScaler: true
certManager: true
appMesh: true
ebs: true
fsx: true
efs: true
albIngress: true
xRay: true
cloudWatch: true
instancesDistribution:
onDemandPercentageAboveBaseCapacity: 0
instanceTypes:
- m4.2xlarge
- m4.4xlarge
- m5.2xlarge
- m5.4xlarge
- m5a.2xlarge
- m5a.4xlarge
- c4.2xlarge
- c4.4xlarge
- c5.2xlarge
- c5.4xlarge
spotInstancePools: 15
tags:
k8s.io/cluster-autoscaler/enabled: 'true'
labels:
lifecycle: Ec2Spot
privateNetworking: true
availabilityZones: ["us-west-2a", "us-west-2b", "us-west-2c"]
# spot GPU NG - west-2a AZ, scale from 0
- name: gpu-spot-ng-a
ami: auto
instanceType: mixed
desiredCapacity: 0
minSize: 0
maxSize: 10
volumeSize: 100
volumeType: gp2
volumeEncrypted: true
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
withAddonPolicies:
imageBuilder: true
autoScaler: true
certManager: true
appMesh: true
ebs: true
fsx: true
efs: true
albIngress: true
xRay: true
cloudWatch: true
instancesDistribution:
onDemandPercentageAboveBaseCapacity: 0
instanceTypes:
- p3.2xlarge
- p3.8xlarge
- p3.16xlarge
- p2.xlarge
- p2.8xlarge
- p2.16xlarge
spotInstancePools: 5
tags:
k8s.io/cluster-autoscaler/node-template/taint/dedicated: nvidia.com/gpu=true
k8s.io/cluster-autoscaler/node-template/label/nvidia.com/gpu: 'true'
k8s.io/cluster-autoscaler/enabled: 'true'
labels:
lifecycle: Ec2Spot
nvidia.com/gpu: 'true'
k8s.amazonaws.com/accelerator: nvidia-tesla
taints:
spotInstance: "true:PreferNoSchedule"
nvidia.com/gpu: "true:NoSchedule"
privateNetworking: true
availabilityZones: ["us-west-2a"]
# spot GPU NG - west-2b AZ, scale from 0
- name: gpu-spot-ng-b
ami: auto
instanceType: mixed
desiredCapacity: 0
minSize: 0
maxSize: 10
volumeSize: 100
volumeType: gp2
volumeEncrypted: true
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
withAddonPolicies:
imageBuilder: true
autoScaler: true
certManager: true
appMesh: true
ebs: true
fsx: true
efs: true
albIngress: true
xRay: true
cloudWatch: true
instancesDistribution:
onDemandPercentageAboveBaseCapacity: 0
instanceTypes:
- p3.8xlarge
- p2.8xlarge
- p2.xlarge
- p3.2xlarge
- p3.16xlarge
- p2.16xlarge
spotInstancePools: 6
tags:
k8s.io/cluster-autoscaler/node-template/taint/dedicated: nvidia.com/gpu=true
k8s.io/cluster-autoscaler/node-template/label/nvidia.com/gpu: 'true'
k8s.io/cluster-autoscaler/enabled: 'true'
labels:
lifecycle: Ec2Spot
nvidia.com/gpu: 'true'
k8s.amazonaws.com/accelerator: nvidia-tesla
taints:
spotInstance: "true:PreferNoSchedule"
nvidia.com/gpu: "true:NoSchedule"
privateNetworking: true
availabilityZones: ["us-west-2b"]
# spot GPU NG - west-2c AZ, scale from 0
- name: gpu-spot-ng-c
ami: auto
instanceType: mixed
desiredCapacity: 0
minSize: 0
maxSize: 10
volumeSize: 100
volumeType: gp2
volumeEncrypted: true
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
withAddonPolicies:
imageBuilder: true
autoScaler: true
certManager: true
appMesh: true
ebs: true
fsx: true
efs: true
albIngress: true
xRay: true
cloudWatch: true
instancesDistribution:
onDemandPercentageAboveBaseCapacity: 0
instanceTypes:
- p3.8xlarge
- p2.8xlarge
- p2.xlarge
- p3.2xlarge
- p3.16xlarge
- p2.16xlarge
spotInstancePools: 6
tags:
k8s.io/cluster-autoscaler/node-template/taint/dedicated: nvidia.com/gpu=true
k8s.io/cluster-autoscaler/node-template/label/nvidia.com/gpu: 'true'
k8s.io/cluster-autoscaler/enabled: 'true'
labels:
lifecycle: Ec2Spot
nvidia.com/gpu: 'true'
k8s.amazonaws.com/accelerator: nvidia-tesla
taints:
spotInstance: "true:PreferNoSchedule"
nvidia.com/gpu: "true:NoSchedule"
privateNetworking: true
availabilityZones: ["us-west-2c"]