AWS Load Balancer controller fails with following error :
_
│ Warning: Helm release “aws-load-balancer-controller” was created but has a failed status. Use the helm
command to investigate the error, correct it, then run Terraform again.
│
│ with module.kubernetes_addons.module.aws_load_balancer_controller[0].module.helm_addon.helm_release.addon[0],
│ on .terraform/modules/kubernetes_addons/modules/kubernetes-addons/helm-addon/main.tf line 1, in resource “helm_release” “addon”:
│ 1: resource “helm_release” “addon” {
│
_
_
│ Error: context deadline exceeded
│
│ with module.kubernetes_addons.module.aws_load_balancer_controller[0].module.helm_addon.helm_release.addon[0],
│ on .terraform/modules/kubernetes_addons/modules/kubernetes-addons/helm-addon/main.tf line 1, in resource “helm_release” “addon”:
│ 1: resource “helm_release” “addon” {
Code for eks-addons
module “kubernetes_addons” {
source = “github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.32.1”
eks_cluster_id = module.eks_blueprints.eks_cluster_id
EKS Add-ons
enable_amazon_eks_aws_ebs_csi_driver = true
Self-managed Add-ons
enable_aws_efs_csi_driver = true
Optional aws_efs_csi_driver_helm_config
aws_efs_csi_driver_helm_config = {
repository = “https://kubernetes-sigs.github.io/aws-efs-csi-driver/”
version = “2.4.0”
namespace = “kube-system”
}
enable_aws_load_balancer_controller = true
}
provider “helm” {
kubernetes {
host = module.eks_blueprints.eks_cluster_endpoint
cluster_ca_certificate = base64decode(module.eks_blueprints.eks_cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.cluster.token
}
}