diff --git a/modules/k8s-node-autoscaler/main.tf b/modules/k8s-node-autoscaler/main.tf index 6873249b..74e7e52b 100644 --- a/modules/k8s-node-autoscaler/main.tf +++ b/modules/k8s-node-autoscaler/main.tf @@ -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" diff --git a/modules/k8s-node-autoscaler/provider.tf b/modules/k8s-node-autoscaler/provider.tf index 48b4405d..36f44424 100644 --- a/modules/k8s-node-autoscaler/provider.tf +++ b/modules/k8s-node-autoscaler/provider.tf @@ -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 -# } -# }