-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy patheks_zero_node_pools.tf
162 lines (127 loc) · 3.56 KB
/
eks_zero_node_pools.tf
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
module "eks_zero_node_pool_existing_subnets" {
providers = {
aws = aws.eks_zero
}
source = "../aws/cluster/node-pool"
cluster_name = module.eks_zero.current_metadata["name"]
configuration = {
# Settings for Apps-cluster
apps = {
name = "existing-subnets"
instance_types = "t3a.medium"
desired_capacity = 1
min_size = 1
max_size = 3
tags = {
"k8s.io/cluster-autoscaler/node-template/label/nvidia.com/gpu" = true
"k8s.io/cluster-autoscaler/node-template/taint/dedicated" = "nvidia.com/gpu=true"
}
labels = {
"kubestack.com/test" = true
}
}
# Settings for Ops-cluster
ops = {
max_size = "1"
}
}
}
module "eks_zero_node_pool_existing_subnets_one_az_only" {
providers = {
aws = aws.eks_zero
}
source = "../aws/cluster/node-pool"
cluster_name = module.eks_zero.current_metadata["name"]
configuration = {
# Settings for Apps-cluster
apps = {
name = "existing-subnets-one-az-only"
availability_zones = "eu-west-1b"
instance_types = "t3a.medium"
desired_capacity = 1
min_size = 1
max_size = 3
ami_type = "AL2_x86_64_GPU"
}
# Settings for Ops-cluster
ops = {
max_size = "1"
}
}
}
module "eks_zero_node_pool_new_subnets" {
providers = {
aws = aws.eks_zero
}
source = "../aws/cluster/node-pool"
cluster_name = module.eks_zero.current_metadata["name"]
configuration = {
# Settings for Apps-cluster
apps = {
name = "new-subnets"
instance_types = "t3a.medium,t3a.small"
desired_capacity = 1
min_size = 1
max_size = 3
availability_zones = "eu-west-1a,eu-west-1b,eu-west-1c"
# use the last three /18 subnets in the CIDR
# https://www.davidc.net/sites/default/subnets/subnets.html?network=10.0.0.0&mask=16&division=23.ff4011
vpc_subnet_newbits = 2
taints = [
{
key = "taint-key1"
value = "taint-value1"
effect = "NO_SCHEDULE"
},
{
key = "taint-key2"
value = "taint-value2"
effect = "PREFER_NO_SCHEDULE"
}
]
}
# Settings for Ops-cluster
ops = {
max_size = "1"
availability_zones = "eu-west-1a,eu-west-1b"
}
}
}
module "eks_zero_node_pool_new_subnets_secondary_cidr" {
providers = {
aws = aws.eks_zero
}
source = "../aws/cluster/node-pool"
cluster_name = module.eks_zero.current_metadata["name"]
configuration = {
# Settings for Apps-cluster
apps = {
name = "new-subnets-secondary-cidr"
instance_types = "t3a.medium,t3a.small"
desired_capacity = 1
min_size = 1
max_size = 3
availability_zones = "eu-west-1a,eu-west-1b,eu-west-1c"
# add a secondary CIDR to the VPC and create subnets for it
# https://www.davidc.net/sites/default/subnets/subnets.html?network=10.1.0.0&mask=16&division=23.ff4011
vpc_secondary_cidr = "10.1.0.0/16"
# with 3 zones we need at least 3 subnets, use the first three /18 subnets
vpc_subnet_newbits = 2
vpc_subnet_number_offset = 0
taints = [
{
key = "taint-key"
value = "taint-value"
effect = "NO_SCHEDULE"
}
]
}
# Settings for Ops-cluster
ops = {
max_size = "1"
availability_zones = "eu-west-1a,eu-west-1b"
# only two zones, use the two /17 subnets
vpc_subnet_newbits = 1
}
}
}