2
votes

I have installed Kubernetes Cluster on AWS using kubeadm. I understand that it will not fall under AWS Deployment. I am trying to follow the baremetal fashion of installing Kubernetes.

Everything works fine for Nodeport, I want to know if I can connect an AWS Load Balancer to this setup, If yes, how?

I've thoroughly researched online and found this solution where in we can specify an external IP address to a service. But, Load Balancers do not have IP addresses.

I am using Nginx Ingress Controller, everything works fine on ClusterIP, how can I expose the application using AWS Load Balancer?

Can anyone help?

1

1 Answers

0
votes

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 click create done.

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