I launched an EKS cluster using terraform module
My template looks something like this:
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "17.20.0"
cluster_name = "${var.cluster_name}"
cluster_version = var.cluster_version
subnets = ["${var.public_subnet_1}",
"${var.public_subnet_2}","${var.public_subnet_3}"]
vpc_id = var.vpc_id
cluster_security_group_id = "${var.master_sg_id}"
worker_security_group_id = "${var.master_sg_id}"
workers_additional_policies =[aws_iam_policy.siera_alb_ingress_controller_policy.arn]
workers_role_name = "${var.cluster_name}-${var.environment}-${var.aws_region}-worker-role"
map_roles = [
{
rolearn = "arn:aws:iam::${var.account_no}:role/${var.cluster_name}-${var.environment}-${var.aws_region}-worker-role"
username = "system:node:{{EC2PrivateDNSName}}"
groups = ["system:bootstrappers","system:nodes"]
},
{
rolearn = "arn:aws:sts::${var.account_no}:assumed-role/${var.assumed_role_1}"
username = "admin"
groups = ["system:masters","system:nodes","system:bootstrappers"]
},
{
rolearn = "arn:aws:sts::${var.account_no}:assumed-role/${var.assumed_role_2}"
username = "admin"
groups = ["system:masters","system:nodes","system:bootstrappers"]
}
]
tags = {
Purpose = "${var.project}"
Environment = "${var.environment}"
}
worker_groups_launch_template = [
{
name = "${var.cluster_name}-lt"
key_name = "${var.node_key}"
additional_userdata = <<EOT
"echo dummy"
EOT
instance_type = "${var.node_size}"
asg_min_size = 3
asg_desired_capacity = 3
asg_max_size = 5
autoscaling_enabled = true
asg_force_delete = true
public_ip = true
enable_monitoring = false
root_volume_size = 80
suspended_processes = ["AZRebalance"]
tags = [
{
"key" = "k8s.io/cluster-autoscaler/enabled"
"propagate_at_launch" = "false"
"value" = "true"
},
{
"key" = "k8s.io/cluster-autoscaler/${var.cluster_name}"
"propagate_at_launch" = "false"
"value" = "true"
}
]
}
]
manage_aws_auth = false
}
As you can see I'm trying to add aws-auth configmap using map_roles.
After launching the cluster when I run kubectl describe configmap -n kube-system aws-auth
It gives this error: Error from server (NotFound): configmaps "aws-auth" not found
What am I missing? Please help