forked from eksctl-io/eksctl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
15-managed-nodes.yaml
60 lines (55 loc) · 1.72 KB
/
15-managed-nodes.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
# An example of ClusterConfig object using Managed Nodes
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster-15
region: us-west-2
managedNodeGroups:
- name: managed-ng-public
instanceType: m5.large
minSize: 2
desiredCapacity: 3
maxSize: 4
availabilityZones: ["us-west-2a", "us-west-2b"]
volumeSize: 20
updateConfig:
maxUnavailable: 3 # or `maxUnavailablePercentage: 75` to specify maxUnavailable as a percentage of total nodes
securityGroups:
attachIDs: ["sg-1", "sg-2"]
ssh:
allow: true
publicKeyPath: ~/.ssh/ec2_id_rsa.pub
# new feature for restricting SSH access to certain AWS security group IDs
sourceSecurityGroupIds: ["sg-00241fbb12c607007"]
labels: {role: worker}
# Note: unmanaged nodegroups (`nodeGroups` field) use a different structure (map[string]string) to express taints
taints:
- key: key1
value: value1
effect: NoSchedule
- key: key2
effect: NoExecute
tags:
nodegroup-role: worker
iam:
withAddonPolicies:
externalDNS: true
certManager: true
- name: managed-ng-private
instanceType: m5.large
# launch nodegroup in private subnets
privateNetworking: true
- name: custom-ami
amiFamily: AmazonLinux2
ami: ami-custom
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"
overrideBootstrapCommand: |
#!/bin/bash
/etc/eks/bootstrap.sh cluster-15
- name: custom-launch-template
launchTemplate:
id: lt-1234
version: "3"