Git Product home page Git Product logo

k8-ingress's Introduction

AWS ALB Ingress Controller

When we setup EKS service of LoadBalancer type, by default it creates Classic ELB which is outdated. AWS prefer to use ALB which is advanced and intelligent.

Earlier every Ingress resource was creating one ALB which will give us huge cost. Later on users request AWS gave us options to maintain single Ingress controller that can be used my multiple projects.

alt text

Steps

Reference: https://catalog.workshops.aws/eks-immersionday/en-US/services-and-ingress/multi-ingress

Make sure your workstation have Docker, EKS Clients, Helm, etc are installed. Our workstation is on AWS Linux 2.

Docker

curl https://raw.githubusercontent.com/techworldwithsiva/docker-install-commands/master/docker-install.sh | sudo bash

EKS client Softwares

curl https://raw.githubusercontent.com/techworldwithsiva/k8-install/master/eks-client.sh | sudo bash

Helm Installation

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
  1. Create IAM OIDC Provider
eksctl utils associate-iam-oidc-provider \
      --region ${AWS_REGION} \
      --cluster ${LAB_CLUSTER_ID} \
      --approve
  1. IAM policy for AWS Load Balancer controller. This is required by controller pods in kube-system namespace to provision ALB when ingress is applied.
curl -o iam-policy.json https://raw.githubusercontent.com/aws-containers/eks-app-mesh-polyglot-demo/master/workshop/aws_lbc_iam_policy.json
  1. Create IAM policy.
aws iam create-policy \
      --policy-name AWSLoadBalancerControllerIAMPolicy \
      --policy-document file://iam-policy.json
  1. Create IAM Role service account. for AWS Load balancer in kube-system.
eksctl create iamserviceaccount \
--cluster=${LAB_CLUSTER_ID} \
--namespace=kube-system \
--name=aws-load-balancer-controller \
--attach-policy-arn=arn:aws:iam::${ACCOUNT_ID}:policy/AWSLoadBalancerControllerIAMPolicy \
--override-existing-serviceaccounts \
--region ${AWS_REGION} \
--approve
  1. Add EKS helm repo.
helm repo add eks https://aws.github.io/eks-charts
  1. Install AWS Load Balancer controller.
helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=${LAB_CLUSTER_ID} --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller
  1. Verify AWS Load Balancer controller.
kubectl get pods -n kube-system

Test using applications

k8-ingress's People

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.