Skip to content

Commit

Permalink
Create an EKS access entry
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed May 31, 2024
1 parent f315762 commit 7d39596
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions modules/k8s-node-autoscaler/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ resource "aws_iam_instance_profile" "profile" {
role = aws_iam_role.work_profile_iam_role.name
}

resource "aws_eks_access_entry" "example" {
cluster_name = var.cluster_name
principal_arn = aws_iam_instance_profile.profile.arn
kubernetes_groups = ["system:nodes"]
type = "EC2_LINUX"
}

module "ocean-aws-k8s" {
source = "spotinst/ocean-aws-k8s/spotinst"
version = "1.2.0"
Expand Down
6 changes: 0 additions & 6 deletions modules/k8s-node-autoscaler/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ provider "kubernetes" {
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster.token
}

# provider "helm" {
# kubernetes {
# config_path = var.kube_config_path
# }
# }

0 comments on commit 7d39596

Please sign in to comment.