diff --git a/patterns/karpenter-mng/README.md b/patterns/karpenter-mng/README.md index 80f0494b3d..ab707d3e55 100644 --- a/patterns/karpenter-mng/README.md +++ b/patterns/karpenter-mng/README.md @@ -13,7 +13,7 @@ This pattern demonstrates how to provision Karpenter on an EKS managed node grou The areas of significance related to this pattern are highlighted in the code provided below: -```terraform hl_lines="20-28 31 49-62 67-70 89-91 97-100 108-132" +```terraform hl_lines="20-28 31 49-62 67-70 89-92 102-126" {% include "../../patterns/karpenter-mng/eks.tf" %} ``` diff --git a/patterns/karpenter-mng/eks.tf b/patterns/karpenter-mng/eks.tf index a1214cb5c8..cfa30cbfda 100644 --- a/patterns/karpenter-mng/eks.tf +++ b/patterns/karpenter-mng/eks.tf @@ -4,7 +4,7 @@ module "eks" { source = "terraform-aws-modules/eks/aws" - version = "~> 20.9" + version = "~> 20.10" cluster_name = local.name cluster_version = "1.29" @@ -87,19 +87,13 @@ module "karpenter" { cluster_name = module.eks.cluster_name # Name needs to match role name passed to the EC2NodeClass - node_iam_role_use_name_prefix = false - node_iam_role_name = local.name + node_iam_role_use_name_prefix = false + node_iam_role_name = local.name + create_pod_identity_association = true tags = local.tags } -resource "aws_eks_pod_identity_association" "karpenter" { - cluster_name = module.eks.cluster_name - namespace = "kube-system" - service_account = "karpenter" - role_arn = module.karpenter.iam_role_arn -} - ################################################################################ # Helm charts ################################################################################