How to setup AWS EKS using GUI: Day -06

Welcome to an exhilarating journey where we explore the cutting-edge world of Kubernetes, we’ll unravel the mysteries of Kubernetes, witness its transformational power, and set the stage for a thrilling gaming experience—all within a Kubernetes cluster deployed on Amazon’s Elastic Kubernetes Service (EKS).

Buckle up, as we embark on a fascinating ride that will not only introduce you to AWS EKS but also allow you to enjoy the Kubernetes. Let’s get started and see how DevOps and gaming collide in this exciting adventure!

  1. Take one Ubuntu server ( Optional )

STEP 1: Create IAM Roles

Let’s First start creating two IAM roles one is for Cluster and another is for Nodegroup

Go to Aws console and search for IAM

You will be redirected to the IAM dashboard

Click “Roles”

Click “Create role”

Click “Allow AWS services like EC2, Lambda, or others to perform actions in this account.”

Click “Choose a service or use case”

Type “EKS”

Click this radio button with EKS-Cluster

Click “Next” and you will directly redirect to policy and click Next ( we have only one policy for it and it selects by default for EKS) that is AmazonEKSClusterPolicy

Click the “Role name” field and provide the name (myAmazonEKSClusterRole)

Click “Create role”

A cluster role is created.

Now Create a Role for NodeGroup

Click “Create role”

Click “Allow AWS services like EC2, Lambda, or others to perform actions in this account.”

Click “Choose a service or use case”

Click “EC2”

Click “Next”

Click the “Search” field.

Search these Policy Names and make it check (I already have these in it )

AmazonEC2ContainerRegistryReadOnly

AmazonEKS_CNI_Policy

AmazonEBSCSIDriverPolicy

AmazonEKSWorkerNodePolicy

Click “Next”

Click the “Role name” field.

Add Role name as myAmazonNodeGroupPolicy

Click “Create role”

NodeGroup Role is created.

Step 2: Create EKS Cluster

Click the “Search” field and search For EKS or select directly Elastic Kubernetes Service on the Recently visited tab

Click “Add cluster”

Click “Create”

Click the “Name” field and enter a unique name for the cluster that is anything you want. For example, I used Cloud and version 1.28

Click “myAmazonEKSClusterRole” which is created in step 1.

Click “Next”

Click “Select security groups” and Use the existing security group or create a new security Group

Click “Next”

Click “Next”

No changes Click “Next” (Default no need to change anything)

No changes Click “Next” (Default no need to change anything)

Click “Create”

It takes 15 minutes to create.

Once your Cluster up to active status

Click “Compute”

Click on “Add node group”

Click the “Name” field.

Write any Name you want (NodeGroup)

Select the Role that was created for the node Group in Step 1

Click “Next”

On the next page remove t3.medium and add t2.medium as instance type.

Select t2.medium

Click “Next”

Click “Next”

Click “Create”

Node Groups will take some time to create.

Worker nodes created.

Step 3: Connecting to cluster

Click on the AWS cloud shell icon on the top right

click on connect

Better to open in a new tab

First set context by providing the following command

aws eks update-kubeconfig --name EKS_CLUSTER_NAME --region CLUSTER_REGION
#example
aws eks update-kubeconfig --name GitOps --region ap-south-1

Check for Nodes

kubectl get nodes

Check for pods, You will get no resources found.

kubectl get pods

Termination

  1. Remove the Node Group first
  2. Remove the Cluster
  3. Remove the roles created
  4. Remove the IAM created
  5. Remove Server
mrcloudbook.com avatar

Ajay Kumar Yegireddi is a DevSecOps Engineer and System Administrator, with a passion for sharing real-world DevSecOps projects and tasks. Mr. Cloud Book, provides hands-on tutorials and practical insights to help others master DevSecOps tools and workflows. Content is designed to bridge the gap between development, security, and operations, making complex concepts easy to understand for both beginners and professionals.

Comments

Leave a Reply

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