I’m creating a eks k8s cluster in AWS, all is fine. I’m using worker_groups like so:
module "eks" {
source = "terraform-aws-modules/eks/aws"
cluster_name = var.cluster_name
cluster_version = "1.17"
subnets = var.private_subnets_ids
tags = {
Environment = var.environment
}
vpc_id = var.vpc_id
worker_groups = [
{
name = "backend"
instance_type = var.eks_workers.backend.instance_type
asg_desired_capacity = var.eks_workers.backend.desired_capacity
key_name = var.eks_workers.backend.ssh_key_name
subnets = var.private_subnets_ids
additional_userdata = "echo foo bar"
associate_public_ip_address = false
additional_security_group_ids = [
aws_security_group.sg_ssh_mgmt.id
]
labels = {
application = "backend"
}
}
]
}
The ASG is created, but the nodes do not have the label created.
I need to label the nodes so that i can then use nodeSelector
Appreciate your help!
David