Giter VIP home page Giter VIP logo

terraform-aws-alb-ingress-controller's Introduction

AWS EKS Load Balancer Controller

This Terraform module can be used to install the AWS ALB Ingress Controller into a Kubernetes cluster.

IMPORTANT WARNING: considering that the kubernetes provider, in order to run the plan and apply, must be able to access the cluster api, it is not possible to insert the module within the same file and / or terraform configuration that creates the EKS cluster as it is not the cluster would exist.

For this reason, I recommend separating the terraform configurations and launching the one containing this module and other modules like this one at a later time. HERE THE ISSUE DIRECTLY FROM KUBERNETES PROVIDER

Examples

EKS Basic Deployment

To deploy the AWS ALB Ingress Controller into an EKS cluster.

module "alb_controller" {
  source  = "campaand/alb-controller/aws"
  version = "~> 2.0"

  cluster_name = var.cluster_name
}

EKS Deployment with Different Namespace

To deploy the AWS ALB Ingress Controller into an EKS cluster using different custom namespace, if not exist, the namespace will be created.

module "alb_controller" {
  source  = "campaand/alb-controller/aws"
  version = "~> 2.0"

  namespace    = "your-custom-namespace"
  cluster_name = var.cluster_name
}

EKS Deployment using EKS POD Identity

To deploy the AWS ALB Ingress Controller into an EKS cluster using EKS POD Identity Authentication.

NOTE: if you want to change from IRSA to POD Identity, or vice-versa, you must have the "eks-pod-identity-agent" addon installed and after applying you will have to roll out the aws-load-balancer-controller deployment.

module "alb_controller" {
  source  = "campaand/alb-controller/aws"
  version = "~> 2.0"

  namespace    = "your-custom-namespace"
  cluster_name = var.cluster_name

  use_eks_pod_identity = true
}

You can also use your custom IAM Role for POD IDENTITY, but you need to properly configure with correct trusted entities and policy.

module "alb_controller" {
  source  = "campaand/alb-controller/aws"
  version = "~> 2.0"

  namespace    = "your-custom-namespace"
  cluster_name = var.cluster_name

  use_eks_pod_identity = true
  custom_eks_pod_identity_iam_role_arn = "arn:aws:iam::01234567890:role/test-eks-identity-alb"
}

EKS Deployment with Different Helm Settings

To deploy the AWS ALB Ingress Controller into an EKS cluster using different helm parameters based on Helm Chart Values.

If you need to insert custom annotations for Ingresses and Services, consult ALB Controller Annotations.

Helm Values already setted:

default_helm_values = {
  "clusterName"         = "${var.cluster_name}",
  "serviceAccount.name" = "${var.service_account_name}"

  "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn" = "${aws_iam_role.this.arn}"
}

You can add or overwrite this values using the settings variable, if you add a value with the same key, you overwrote the default one.

module "alb_controller" {
  source  = "campaand/alb-controller/aws"
  version = "~> 2.0"

  cluster_name = var.cluster_name
  
  helm_chart_version = "1.6.0"

  settings = {
      key1 = value1,
      key2 = value2,
      key3 = value3,
      key4 = value4
  }
}

Test your infrastructure

Here some examples to test your ALB Controller: Official Repository Link

terraform-aws-alb-ingress-controller's People

Contributors

campaand avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

fmlisco atifather

terraform-aws-alb-ingress-controller's Issues

Could not retrieve the list of available versions for provider hashicorp/aws

Hi,
I tried to install this module but have an error when launch terraform init:

│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints ~> 4.0, >= 5.0.0, 5.9.0

Terraform version :

Terraform v1.5.3
on linux_amd64

My main.tf is:

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = "5.9.0"
    }
  }
...

and module have this configuration:

module "alb-ingress-controller" {
  source  = "campaand/alb-ingress-controller/aws"
  version = "1.0.1"
...

Which version of the aws provider should i use?

Thanks
Stefano

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.