How to Deploy Kubernetes Cluster With Amazon EKS

Deploying Kubernetes Cluster With Amazon EKS
January 2, 2023
Deploying Kubernetes Cluster With Amazon EKS

Amazon EKS (Elastic Container Service for Kubernetes) is a managed Kubernetes service that makes it easy to run Kubernetes on the AWS Cloud without managing the Kubernetes control plane.

In AWS Cloud, you can deploy worker nodes using defined AMIs, and with the help of CloudFormation, AWS EKS is responsible for provisioning, running, managing, and auto-scaling the Kubernetes control plane across multiple AWS Availability Zones for high availability, security, and scalability.

Step 1: Create an AWS EKS Role.

The First Step is to create an IAM role in AWS console for Kubernetes Cluster.

1. Open the IAM console at

2. Choose Roles, then Create role.

3. Under Trusted entity type, select AWS service.

Creating an AWS EKS Role

4. From the Use cases for other AWS services dropdown list, choose EKS.

5. Choose EKS – Cluster for your use case, and then choose Next.

EKS cluster

6. On the Add permissions tab, choose Next.


7. For Role name, enter a unique name for your role, such as eksClusterRole

8. Choose Create role

Step 2: Create Custom VPC for EKS Cluster.

After completed the Role Creation, we will setup VPC for EKS Cluster. We will use CloudFormation Stack to setup Custom VPC.

Open up CloudFormation, and click the Create new stack button.

Creating Custom VPC for EKS Cluster

Click Next.

Specifying stack details

Provide Stack name and change VPC Block parameters for VPC Stack. Click Next. CloudFormation will setup New VPC in few Mins.

Step 3: Setup AWS EKS Cluster from AWS Console

Select Create cluster. If you don’t see this option, in the Create EKS cluster box, enter a name for your cluster, such as fantasyapp-cluster, and select Next step. You will most likely be able to see the Create cluster option as shown below

Setup AWS EKS Cluster from AWS Console

On the Specify networking page, select vpc-060b9ede2ad3dd102| fantasyapp-VPC from the VPC drop-down list. Leave the remaining settings at their default values and select Next.

Specify networking

On Next Review and create the page, select Create.

Review and create the page

Adding Node Groups:-

Open the Amazon EKS console at

Choose your cluster that you created, i.e fantasyapp-cluster.

select the Compute tab, and then choose Add Node Group

Adding Node Groups

On the Configure node group page, fill out the parameters accordingly, accept the remaining default values, and then choose Next

  • Name – Enter a unique name for your managed node group, such as fantasynode_apsouth1.
  • Node IAM role name – Choose eksClusterRole
 Node Group configuration

Click next

On Set compute and scaling configuration

set compute & scaling configuration

Set Node Group scaling configuration

Setting Node Group scaling configuration

On the Specify networking page, select only the respective subnet which is created for the availability zone in which you want to create the node group.

Node group network configuration

On the Review and create the page, review your managed node group configuration and choose Create..

Node group scaling configuration

After created EKS-Cluster and node group Now Configure your system to communicate with Cluster. For that we require Kubelet and Kubectl. We can install from AWS-EKS-amended version of kubectl or directly from the Kubernetes websites.

Install AWS CLI on Linux:-

The latest AWS CLI version is 2. So download the AWS CLI.

curl “” -o “”

Unzip the file using the following command.


Install the AWS CLI using the following command.

sudo ./aws/install

AWS CLI is installed successfully on Linux System.

aws –version

Configure IAM Credentials:

aws configure

  1. Enter AWS Access Key ID.
  2. Enter AWS Secret Access Key.
  3. Enter Default region name (like eu-central, us-east etc.).
  4. Enter Default output format. Allowed formats are json, yaml, text, and table.

Install eksctl :-

Download eksctl:

curl –silent –location “$(uname -s)_amd64.tar.gz” | tar xz -C /usr/bin/

Get the version of eksctl:

eksctl version

eksctl help

Install kubectl:-

Download kubectl:

curl -LO

mv kubectl /usr/bin/

chmod +x /usr/bin/kubectl

kubectl version –client –output=yaml

Creating a kubeconfig file for an AWS EKS cluster:-

aws sts get-caller-identity

Create or update a kubeconfig file for your cluster. Replace region-code with the AWS Region that your cluster is in and replace my-cluster with the name of your cluster.

aws eks update-kubeconfig –region ap-south-1 –name fantasyapp-cluster

By default, the resulting configuration file is created at the default kubeconfig path (.kube) in your home directory

Test your Configuration

kubectl get svc

Cloud Computing Insights and Resources

Role of Augmented and Virtual Reality in EdTech

Role of Augmented and Virtual Reality in EdTech 

There has been a rapid adoption and incorporation of technology in education, especially since the Covid-19 Pandemic, to make education …

Role of Augmented and Virtual Reality in EdTech  Read More »

Optimization and Licensing Assessment for Enterprise Workload

Optimization and Licensing Assessment for Enterprise Workload: An Overview 

Businesses around the world are enhancing cost to performance to achieve 2x growth by migrating their workload. But this does …

Optimization and Licensing Assessment for Enterprise Workload: An Overview  Read More »

4 Ways to Optimize Your Cloud with Modernization

4 Ways to Optimize Your Cloud with Modernization: A Comprehensive Guide

In today’s dynamic IT industry, it is imperative for organizations to incorporate cost-effective measures and efficient budgeting strategies to achieve …

4 Ways to Optimize Your Cloud with Modernization: A Comprehensive Guide Read More »