Set Up EKS Cluster

How to Set Up an EKS Cluster with Managed Node Group and AWS Ingress Controller: A Step-by-Step Guide

AWS, How to By May 15, 2023 No Comments

Here’s a step-by-step guide to setting up an Amazon Elastic Kubernetes Service (EKS) cluster with a managed node group and the AWS ingress controller from AWS Managed Console.

Step 1: Prerequisites

  • Sign in to the AWS Management Console and navigate to the Amazon EKS console.
  • Create an IAM role with the necessary permissions to create and manage EKS clusters, node groups, and other resources.

Step 2: Create the EKS Cluster

  • Click on “Create cluster” in the EKS console.
  • Select the desired settings for your cluster, such as region, Kubernetes version, and VPC configuration.
  • Choose the IAM role you created earlier for cluster creation.
  • Configure any additional settings as per your requirements.
  • Review and create the cluster.

Step 3: Install and Configure the AWS CLI and kubectl

  • Install the AWS CLI and configure it with your AWS credentials.
  • Install kubectl, the command-line tool for Kubernetes, and configure it to connect to your EKS cluster.

Step 4: Create and Configure the Managed Node Group

  • In the EKS console, click on your cluster.
  • Click on “Add node group” and provide the necessary details like instance type, desired capacity, and other configurations.
  • Choose the IAM role you created earlier for the node group.
  • Review and create the node group.

Verify the setup

aws eks update-kubeconfig --name YOUR_CLUSTER_NAME
kubectl cluster-info
kubectl get nodes
kubectl get nodegroups

Step 5: Install the AWS Load Balancer Controller

  • Open a terminal or command prompt.
  • Run the following command to install the AWS Load Balancer Controller:
kubectl apply -k ""
  • Install the controller with the following command:
helm repo add eks
helm upgrade -i aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=<cluster-name> --set serviceAccount.create=false --set

verify AWS Load Balancer Controller

kubectl get deployment -n kube-system alb-ingress-controller

Step 6: Create an Ingress Resource

Create an Ingress resource that defines how incoming traffic should be routed to your services. Here’s an example Ingress resource:

# Annotations Reference:
apiVersion: extensions/v1beta1
kind: Ingress
  name: ingress-service
    # Ingress Core Settings "alb" internet-facing
    # Health Check Settings HTTP traffic-port / '15' '5' '200' '2' '2'
    - http:
          - path: /*
              serviceName: api1
              servicePort: 80

Apply the Ingress resource to your cluster with the following command:

kubectl apply -f alb-ingress.yaml

Step 7: Create a Deployment and Service

Create a Kubernetes Deployment manifest for your application:

# deployment.yaml
apiVersion: apps/v1
kind: Deployment
  name: my-app-deployment
  replicas: 3
      app: my-app
        app: my-app
        - name: my-app-container
          image: <your-app-image>
            - containerPort: 80

Apply the Deployment manifest:

kubectl apply -f deployment.yaml

Create a Kubernetes Service manifest for your application:

# service.yaml
apiVersion: v1
kind: Service
  name: my-app-deployment
    app: my-app-deployment
  type: NodePort
    app: my-app-deployment
    - port: 80
      targetPort: 80

Apply the Service manifest:

kubectl apply -f service.yaml

Step 8: Verify the Setup

  • After deploying your application with the Ingress resource, wait for a few moments to allow the ingress controller to configure the necessary resources.
  • Verify that the AWS ALB (Application Load Balancer) is created and associated with the Ingress rules by checking the AWS Management Console or running the appropriate AWS CLI commands.
kubectl get deployments
kubectl describe deployment my-deployment
kubectl get services
kubectl describe service my-service
kubectl get ingress
kubectl describe ingress my-ingress

Step 9: Test the Application

  • Obtain the DNS name or IP address of the ALB created by the ingress controller.
  • Access your application by entering the ALB’s DNS name or IP address in a web browser or using tools like cURL or Postman.

Congratulations! You have now successfully set up an EKS cluster with a managed node group and the AWS ingress controller. Your application is accessible through the ALB created by the ingress controller.


I'm Abhay Singh, an Architect with 9 Years of It experience. AWS Certified Solutions Architect.

No Comments

Leave a comment

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