forked from eksctl-io/eksctl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
05-advanced-nodegroups.yaml
69 lines (64 loc) · 2.16 KB
/
05-advanced-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
# An advanced example of ClusterConfig object with customised nodegroups:
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster-5
region: eu-west-2
nodeGroups:
- name: ng1-public
instanceType: m5.xlarge
minSize: 2
maxSize: 8
volumeSize: 100
volumeType: gp2
ami: ami-05ecac759c81e0b0c
amiFamily: AmazonLinux2
# defaults to true, which enforces the use of IMDSv2 tokens
disableIMDSv1: false
labels:
nodegroup-type: frontend-workloads
iam:
withAddonPolicies:
autoScaler: true
- name: ng2-private-a
instanceType: m5.large
desiredCapacity: 2
labels:
nodegroup-type: backend-cluster-addons
targetGroupARNs:
- arn:aws:elasticloadbalancing:eu-west-2:01234567890:targetgroup/target-group-1/abcdef0123456789
privateNetworking: true
preBootstrapCommands:
# allow docker registries to be deployed as cluster service
- "sed '2i \"insecure-registries\": [\"172.20.0.0/16\",\"10.100.0.0/16\"],' /etc/docker/daemon.json"
- "systemctl restart docker"
- name: ng3-private-b
instanceType: c3.8xlarge
desiredCapacity: 4
labels:
nodegroup-type: very-special-science-workloads
classicLoadBalancerNames:
- ng3-classic-load-balancer
asgMetricsCollection:
- granularity: 1Minute
metrics:
- GroupMinSize
- GroupMaxSize
- GroupDesiredCapacity
- GroupInServiceInstances
- GroupPendingInstances
- GroupStandbyInstances
- GroupTerminatingInstances
- GroupTotalInstances
taints:
- key: special
value: "true"
effect: NoSchedule
privateNetworking: true
availabilityZones: ["eu-west-2a"] # use single AZ to optimise data transfer between instances
preBootstrapCommands:
# disable hyperthreading
- "for n in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\n' | sort -un); do echo 0 > /sys/devices/system/cpu/cpu${n}/online; done"
# cluster AZs must be set explicitly for single AZ nodegroup example to work
availabilityZones: ["eu-west-2a", "eu-west-2b", "eu-west-2c"]