How to setup/create AWS kubernetes cluster
So first we will understand about EKS.
What is EKS?
EKS is a managed or create kubernetes cluster service of AWS, which gives you the flexibility to start, run, and scale Kubernetes applications in the AWS cloud or on-premises. Amazon kubernetes cluster EKS helps you provide highly available and secure clusters and automates key tasks such as patching, node provisioning, and updates.
Lets talk about the process of “How to setup EKS cluster“
Prerequisites:-
AWS Account with Admin Privileges
AWS CLI Access to use kubectl Utility
Instance(To manage cluster by using kubectl
We need to setup all these things:-
Create IAM Role for EKS cluster
Create Dedicated VPC for the EKS Cluster / Cloudformation Stack
Create EKS cluster
Install AWS kubectl
Configure AWS with credentials
Install & Setup AWS IAM-authenticator and Kubectl utility
Create IAM role for EKS Worker Nodes
Create Worker Nodes
######## Create IAM Role for EKS Cluster #####
1. go to IAM Management section in AWS.

2. click on Roles section and then click on create role.

3. Click on EKS service and then select “EKS -Cluster” use case, click on next:Permission.

4. click next-next define the name of the role and at last click on create role.

### Create dedicated VPC for cluster via cloudformation ####
1. Select cloud-formation service in aws kubernetes cluster.

2. Click on create stack, select template is ready, amazon kubernetes cluster S3 url and define this url.
3. click on next and define stack name.

4. Click on next- next and create a stack, Now your stack is ready, you can also check the VPC is created or not in the VPC section.

### create an EKS Cluster ####
1. Go to EKS section in aws kubernetes cluster and click on create EKS Cluster

2. Define the cluster name, select Kubernetes version, select cluster service role, which we had created recently and click on next.

3. Select the VPC which we had created, select security group with the name of stack which we had created and select the cluster endpoint access as per the requirement.

Now enable logs

Now click on create and after 5 to 10 mins your EKS cluster is ready.
#### Now setup of AWS CLI from where you want to access the cluster ####
Follow this link:- https://www.devopscheetah.com/how-to-install-aws-cli-on-linux/
#### Now install the kubectl utility #####
Follow this link: https://www.devopscheetah.com/installing-kubectl/
#### Now install the aws -iam-authenticator ####
Follow this link: https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html
#### Now install the aws-auth-conf ####
Follow this link: https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html
#### Create I AM role for worker nodes ####
Attach these three policies or more as per the requirement.

#### Create Worker node group ####
1. click on compute section in EKS cluster.

2. Click on add node group,
define the group name,
define IAM role which we had created,
select AMI type,
select Instance type,
Select disk size,
Node Group scaling configuration (Min Max Desired)
ssh Key Pair and Define security group

Now, Worker node group is created.

Now, your EKS cluster is ready.
So today we learned “How to setup EKS Cluster”.
1 thought on “How to setup/create Kubernetes cluster?”