-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy patheks.tf
More file actions
54 lines (44 loc) · 1.24 KB
/
eks.tf
File metadata and controls
54 lines (44 loc) · 1.24 KB
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
# 2. Create EKS cluster.
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "19.4.2"
putin_khuylo = true
cluster_name = var.cluster_name
cluster_version = var.cluster_version
cluster_endpoint_public_access = true
cluster_addons = {
coredns = {}
eks-pod-identity-agent = {
before_compute = true
}
kube-proxy = {}
vpc-cni = {
before_compute = true
}
}
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets
eks_managed_node_groups = {
default = {
name = "${var.cluster_name}-ng-1"
instance_types = ["m5.large", "m5.xlarge", "t3.large"]
desired_size = 2
subnets = module.vpc.private_subnets
iam_role_additional_policies = {
ssm = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
}
manage_aws_auth_configmap = true
aws_auth_roles = [
# Add the CAST AI IAM role which required for CAST AI nodes to join the cluster.
{
rolearn = module.castai-eks-role-iam.instance_profile_role_arn
username = "system:node:{{EC2PrivateDNSName}}"
groups = [
"system:bootstrappers",
"system:nodes",
]
}
]
}