Set Up An Application In AWS EKS with Network Load Balancer

First we need to Install EKS CTL

curl --silent --location "$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin

Then we need to create the EKS cluster by running this command

eksctl create cluster

aws eks update-kubeconfig --region ap-south-1 --name cluster1

oidc_id=$(aws eks describe-cluster --name wonderful-rainbow-1670691625 --query "cluster.identity.oidc.issuer" --output text | cut -d '/' -f 5)

aws iam list-open-id-connect-providers | grep $oidc_id

eksctl utils associate-iam-oidc-provider --cluster wonderful-rainbow-1670691625 --approve

curl -o iam_policy.json

aws iam create-policy \
    --policy-name AWSLoadBalancerControllerIAMPolicy \
    --policy-document file://iam_policy.json

eksctl create iamserviceaccount \
  --cluster=wonderful-rainbow-1670691625 \
  --namespace=kube-system \
  --name=aws-load-balancer-controller \
  --role-name "AmazonEKSLoadBalancerControllerRole" \
  --attach-policy-arn=arn:aws:iam::111222233334444:policy/AWSLoadBalancerControllerIAMPolicy \

sudo yum install openssl -y

curl >
chmod 700

helm repo add eks

helm repo update

helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
  -n kube-system \
  --set clusterName=wonderful-rainbow-1670691625 \
  --set serviceAccount.create=false \

kubectl get deployment -n kube-system aws-load-balancer-controller

kubectl create namespace nlb-sample-app

git clone

cd nlb-sample-app

kubectl apply -f sample-deployment.yaml

kubectl apply -f sample-service.yaml

kubectl get svc nlb-sample-service -n nlb-sample-app

Atiqur Rahman

I am MD. Atiqur Rahman graduated from BUET and is an AWS-certified solutions architect. I have successfully achieved 6 certifications from AWS including Cloud Practitioner, Solutions Architect, SysOps Administrator, and Developer Associate. I have more than 8 years of working experience as a DevOps engineer designing complex SAAS applications.

Leave a Reply