How to create an Nginx ingress controller with aws classic load balancer

To create an NGINX ingress controller with an AWS Classic Load Balancer (CLB) on an EKS cluster, you can follow these steps:

  1. Create a service account and role binding for the ingress controller. This will allow the ingress controller to interact with the Kubernetes API server.
kubectl create serviceaccount nginx-ingress-controller
kubectl create clusterrolebinding nginx-ingress-controller --clusterrole=cluster-admin --serviceaccount=default:nginx-ingress-controller

2. Create a namespace for the ingress controller

kubectl create namespace ingress-nginx

3. Use Helm to install the ingress controller

First, install Helm. The instructions to install Helm on AWS are given here.

Then add the repo of the nginx ingress controller.

helm repo add ingress-nginx 
helm repo update

Then install the Nginx-ingress controller with Classic load balancer.

helm install nginx-ingress ingress-nginx/ingress-nginx --namespace ingress-nginx --set controller.service.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-type"=classic

4 Verify that the ingress controller is running by using the kubectl get pods command and checking for pods with the name nginx-ingress-controller-*.

Leave a Comment

Your email address will not be published. Required fields are marked *