mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-11 22:41:43 +01:00
53 lines
1.3 KiB
HCL
53 lines
1.3 KiB
HCL
module "eks_al2023" {
|
|
source = "terraform-aws-modules/eks/aws"
|
|
version = "~> 20.0"
|
|
|
|
cluster_name = "${local.name}-al2023"
|
|
cluster_version = "1.33"
|
|
|
|
# EKS Addons
|
|
cluster_addons = {
|
|
coredns = {}
|
|
eks-pod-identity-agent = {}
|
|
kube-proxy = {}
|
|
vpc-cni = {}
|
|
}
|
|
|
|
vpc_id = module.vpc.vpc_id
|
|
subnet_ids = module.vpc.private_subnets
|
|
|
|
self_managed_node_groups = {
|
|
example = {
|
|
ami_type = "AL2023_x86_64_STANDARD"
|
|
instance_type = "m6i.large"
|
|
|
|
min_size = 2
|
|
max_size = 5
|
|
# This value is ignored after the initial creation
|
|
# https://github.com/bryantbiggs/eks-desired-size-hack
|
|
desired_size = 2
|
|
|
|
# This is not required - demonstrates how to pass additional configuration to nodeadm
|
|
# Ref https://awslabs.github.io/amazon-eks-ami/nodeadm/doc/api/
|
|
cloudinit_pre_nodeadm = [
|
|
{
|
|
content_type = "application/node.eks.aws"
|
|
content = <<-EOT
|
|
---
|
|
apiVersion: node.eks.aws/v1alpha1
|
|
kind: NodeConfig
|
|
spec:
|
|
kubelet:
|
|
config:
|
|
shutdownGracePeriod: 30s
|
|
featureGates:
|
|
DisableKubeletCloudCredentialProviders: true
|
|
EOT
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
tags = local.tags
|
|
}
|