EKS CLUSTER CREATION
Prerequisites for EKS Cluster Creation:
• AWS Account with appropriate permissions.
• IAM Roles and Policies:
• EKS Cluster Role
-AmazonEKSClusterPolicy
• Node Role -
• AmazonEKSWorkerNodePolicy,
• AmazonEC2ContainerRegistryReadOnly,
• AmazonEKS_CNI_Policy).
• VPC with Proper Networking
• Public and private subnets in multiple Availability Zones.
• Internet Gateway for public subnets.
• NAT Gateway (if private nodes need internet access).
• Security groups for cluster communication.
• CLI Tools Installed:
• AWS CLI.
• kubectl.
• eksctl.
• Kubernetes Configurations:
• kubeconfig file.
• Proper AWS region setup.
1- Login into aws account and go to elastic kubernetes service dashboard and then click on
create cluster:
- Now go to custom configuration and configure as per your need like Name of the cluster , Iam
role, Version as per your need, Select eks api and configmap, with next next as default settings click
on create cluster. Now wait for 8-10 mins for cluster creation
2- Now Go to compute and create Node group:
Configure Node group by -
- Adding Node group Name
- Proper IAM Node Role with (AmazonEKSWorkerNodePolicy,
AmazonEC2ContainerRegistryReadOnly, AmazonEKS_CNI_Policy)
- Click on next and select the machine as linux os and instance type as t2 medium or any as per your
wish
- Now select the subnet as public or private according to your configuration and enable remote
acess to nodes
- Select the key you have generated and add the security group same name as your cluster
- Click on next then create Node Group, now wait for 10 mins for node creation
NOTE: IF NODE GROUP CREATION FAILED, GO TO SUBNETS-ACTIONS-SUBNET
EDIT- ENABLE AUTO ASSIGN IPV4 AND SAVE, DO THE SAME WITH STEP WITH ALL
SUBNETS
3- Now launch a instance with:
- Name
- OS
- Instance type
- key pair to login
- Edit Network settings and create with your custom vpc and subnets
- Auto assign ip as enable
- Create security group as same name as your cluster
- Allow inbound rules as per your desire
- Now launch the instance
4- Configure Instance:
- aws configure
“Acess key”
“Secret key”
1 - Install kubectl:
# curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.30.6/2024-11-15/bin/linux/amd64/
kubectl
# chmod +x ./kubectl
# sudo mv ./kubectl /usr/local/bin
# kubectl version --short --client
2- Install AWS CLI (Latest Version):
# sudo apt update && sudo apt install unzip -y
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# unzip awscliv2.zip
# sudo ./aws/install
# aws –version
3- Now update the kubeconfig with your region and cluster Name :
# aws eks update-kubeconfig --region ap-south-1 --name aws-eks-cluster
4- Now verify by:
- # kubectl get nodes
Key Takeaways:
Using the AWS UI simplifies many aspects of EKS setup by providing a visual guide and easier
configuration. Whether you're building new clusters or managing existing ones, the AWS
Management Console offers a straightforward approach with all the powerful features you need.
Excited to explore and scale Kubernetes clusters effortlessly through AWS!