lablabs / terraform-aws-eks-load-balancer-controller Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hi, i launch Terraform to deploy LBC, process of deploying is going, but TF deploys nothing, there is no deployment of LBC in EKS. When i interrupt a process, there is no error. I waited for 1 hour for TF process of deploying, then i interrupted it. What is wrong with it? Maybe i need to set some parameter? EKS is deployed. My TF code:
provider "helm" {
kubernetes {
config_path = "~/.kube/config"
}
}
module "eks-load-balancer-controller" {
source = "lablabs/eks-load-balancer-controller/aws"
version = "1.0.0"
cluster_name = module.eks.cluster_id
cluster_identity_oidc_issuer = module.eks.cluster_oidc_issuer_url
cluster_identity_oidc_issuer_arn = module.eks.oidc_provider_arn
helm_chart_name = "aws-load-balancer-controller"
helm_chart_version = "1.4.1"
helm_release_name = "aws-load-balancer-controller"
helm_repo_url = "https://aws.github.io/eks-charts"
}
small change necessary in the policy document to avoid ELB provisioning errors due to lack of access (single line update for iam.tf is all that is required to address the problem)
Bug Report
[ec2-user@ip-10-10-101-78 ~]$ terraform --version
Terraform v1.5.5
on linux_386
[ec2-user@ip-10-10-101-78 ~]$ helm list -A
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
aws-ebs-csi-helm aws-ebs-csi-helm 1 2023-08-30 15:39:52.787566047 +0000 UTC deployed aws-ebs-csi-driver-2.10.1 1.11.2
aws-lb-controller aws-lb-controller 1 2023-08-30 15:39:52.952624315 +0000 UTC deployed aws-load-balancer-controller-1.4.2 v2.4.2
blueprint-staging blueprint-staging 1 2023-08-31 17:45:04.015494376 +0000 UTC deployed blueprint-helm-1.5.2-f7a6bce.1
cert-manager-helm cert-manager-helm 1 2023-08-31 15:05:50.874386206 +0000 UTC deployed cert-manager-v1.9.1 v1.9.1
cluster-autoscaler cluster-autoscaler 1 2023-08-30 15:36:04.251070664 +0000 UTC deployed cluster-autoscaler-9.19.1 1.23.0
ingress-nginx-helm ingress-nginx-helm 2 2023-08-31 16:45:21.354035999 +0000 UTC deployed ingress-nginx-4.1.4 1.2.1
fails consistently
module "eks-load-balancer-controller_helm" {
source = "lablabs/eks-load-balancer-controller/aws"
version = "1.1.0"
enabled = var.load_balancer_controller_enabled
irsa_role_name_prefix = var.cluster_name
cluster_name = var.cluster_name
cluster_identity_oidc_issuer = var.oidc_provider
cluster_identity_oidc_issuer_arn = var.oidc_provider_arn
# insert the 3 required variables here
helm_release_name = "aws-lb-controller"
namespace = "aws-lb-controller"
values = yamlencode({
"podLabels" : {
"app" : "aws-lb-controller"
}
})
helm_timeout = 240
helm_wait = true
}
expecting not to modify the IAM aws-lb-controller role by hand each time I make use of the Terraform module
prepares the service linked role as specified in the policy document but am finding messages within the service logs indicating IAM access is not sufficient to enable the controller
Just for cosmetic reasons, name of the terraform helm release resource should be named as the module name: aws-load-balancer-controller
The "wait_for" attribute has been deprecated. Please use the "wait" block โ instead. Seeing this warning with terraform version 1.1.7
I'm trying to use this module to navigate the bizarre reality known as deploying the AWS load balancer. I finally got this to work locally, but it will not work in Github Actions. The error is thrown:
Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
I suspect this is because I have a Kubernetes alias for the provider for this cluster. Does this module support using an alias?
Bug Report
Terraform v1.4.1
on darwin_arm64
+ provider registry.terraform.io/cloudposse/utils v1.7.1
+ provider registry.terraform.io/hashicorp/aws v4.59.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.2
+ provider registry.terraform.io/hashicorp/helm v2.9.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.19.0
+ provider registry.terraform.io/hashicorp/time v0.9.1
+ provider registry.terraform.io/hashicorp/tls v4.0.4
provider "kubernetes" {
alias = "trogdor_kubernetes"
host = module.trogdor_eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.trogdor_eks.cluster_certificate_authority_data)
exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.trogdor_eks.cluster_name]
}
}
provider "helm" {
alias = "trogdor_helm"
kubernetes {
host = module.trogdor_eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.trogdor_eks.cluster_certificate_authority_data)
exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
# This requires the awscli to be installed locally where Terraform is executed
args = ["eks", "get-token", "--cluster-name", module.trogdor_eks.cluster_name]
}
}
}
module "trogdor_eks_load_balancer_controller" {
source = "lablabs/eks-load-balancer-controller/aws"
version = "1.2.0"
cluster_identity_oidc_issuer = module.trogdor_eks.cluster_oidc_issuer_url
cluster_identity_oidc_issuer_arn = module.trogdor_eks.oidc_provider_arn
cluster_name = module.trogdor_eks.cluster_name
irsa_role_name_prefix = "${var.environment}-${var.app_name}-trogdor-eks-lb"
}
I wish my Github Action would work :(
Planning failed. Terraform encountered an error while generating this plan.
Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
with module.trogdor_eks_load_balancer_controller.helm_release.this[0],
on .terraform/modules/trogdor_eks_load_balancer_controller/helm.tf line 1, in resource "helm_release" "this":
1: resource "helm_release" "this" {
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.