Skip to content

Commit

Permalink
Install Karpenter for autoscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
sunu committed Feb 22, 2024
1 parent c72b671 commit ae9f265
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions terraform/resources/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ module "eks" {
}
}

module "karpenter" {
source = "terraform-aws-modules/eks/aws//modules/karpenter"
version = "19.19.0"

cluster_name = module.eks.cluster_name

create_node_iam_role = false
node_iam_role_arn = module.eks.eks_managed_node_groups["regular"].iam_role_arn

# Since the nodegroup role will already have an access entry
create_access_entry = false

tags = {
Environment = "production"
Terraform = "true"
}
}

# Secret for Django secret key

resource "random_password" "django_secret_key" {
Expand Down

0 comments on commit ae9f265

Please sign in to comment.