How to connect an AWS Load Balancer to nginx ingress controller with Kubernetes deployed on EC2 with kubeadm? How to connect an AWS Load Balancer to nginx ingress controller with Kubernetes deployed on EC2 with kubeadm? kubernetes kubernetes

How to connect an AWS Load Balancer to nginx ingress controller with Kubernetes deployed on EC2 with kubeadm?


Use the following approach to integrate aws-load-balancer with nginx-ingress-controller running in kubernetes cluster created/running on EC2

Step 1: Setup/Install "nginx-ingress-controller"

Step 2: Create a extra service to expose "nginx-ingress-controller" on fix ports with NodePort . See below screenshot highlighted in yellow

nginx-ingress-controller external service as NodePort Kubernetes

Extra service to expose "nginx-ingress-controller" externally will look like following if you installed "nginx-ingress-controller" in "kube-system" namespace using helm

Helm list of nginx-ingress-controller

Extra Service to expose nginx-ingress-controller externally on NodePort

Step 3: Go to Load Balancers Section in EC2 from AWS Console ,

then Create Load Balancer, for Simplicity choose "Classic Load Balancer's Create Button"

AWS Classic Load Balancer setup

Setup Ports and Protocol configuration as Below

AWS Classic load balancer Ports and Protocol Configuration

Then Assign your Security group , Configure health check for instances,

Finally Add your cluster Instances from list , Add tags and finally review and clickcreate done.

Visit the LB's DNS Name , you will find your "nginx-ingress-controller" exposed.