-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnodeGroups.yaml
87 lines (86 loc) · 2.63 KB
/
nodeGroups.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
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ${CLUSTER_NAME}
region: ${AWS_REGION}
nodeGroups:
- name: node-${ENVIRONMENT}-web
instanceType: t3.medium
availabilityZones: ["${AWS_AVAILABILITY_ZONE}"]
desiredCapacity: 1
minSize: 1
maxSize: 1
volumeSize: 50
volumeType: gp2
labels:
nodegroup_type: web
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
withAddonPolicies:
ebs: true
awsLoadBalancerController: true
efs: true
- name: node-${ENVIRONMENT}-job
instanceType: t3.large
availabilityZones: ["${AWS_AVAILABILITY_ZONE}"]
desiredCapacity: 0
minSize: 0
maxSize: 1
volumeSize: 50
volumeType: gp2
labels:
nodegroup_type: job
# ssh:
# allow: true
# publicKeyName: ofc-${ENVIRONMENT}
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonS3FullAccess
- arn:aws:iam::aws:policy/service-role/AmazonEFSCSIDriverPolicy
- ${AWS_POLICY_ARN}
withAddonPolicies:
autoScaler: true
cloudWatch: true
tags:
k8s.io/cluster-autoscaler/node-template/label/nodegroup_type: "job"
- name: node-${ENVIRONMENT}-job-spot
desiredCapacity: 0
minSize: 0
maxSize: 1
instancesDistribution:
maxPrice: 0.15
instanceTypes: ["m4.2xlarge", "m5.2xlarge", "m5a.2xlarge", "m6a.2xlarge", "m6i.2xlarge", "t2.2xlarge", "t3.2xlarge", "t3a.2xlarge"]
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 0
spotAllocationStrategy: capacity-optimized
labels:
lifecycle: Ec2Spot
aws.amazon.com/spot: "true"
cpu-count: "0"
nodegroup_type: job_spot
availabilityZones: ["${AWS_AVAILABILITY_ZONE}"]
taints:
- key: spotInstance
value: "true"
effect: PreferNoSchedule
tags:
k8s.io/cluster-autoscaler/node-template/label/lifecycle: Ec2Spot
k8s.io/cluster-autoscaler/node-template/label/aws.amazon.com/spot: "true"
k8s.io/cluster-autoscaler/node-template/label/cpu-count: "0"
k8s.io/cluster-autoscaler/node-template/taint/spotInstance: "true:PreferNoSchedule"
k8s.io/cluster-autoscaler/enabled: "true"
k8s.io/cluster-autoscaler/${CLUSTER_NAME}: "owned"
k8s.io/cluster-autoscaler/node-template/label/nodegroup_type: "job_spot"
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonS3FullAccess
- arn:aws:iam::aws:policy/service-role/AmazonEFSCSIDriverPolicy
- ${AWS_POLICY_ARN}
withAddonPolicies:
autoScaler: true
cloudWatch: true