How to Create EKS Cluster in AWS [2 Steps]

In this article we are going to cover How to Create EKS Cluster in AWS/How to Create EKS cluster using eksctl/AWS EKS Cluster Setup using eksctl.

#1:Install eksctl CLI tool for creating EKS Clusters on AWS

Use below command to download eksctl CLI tool for creating EKS Clusters on AWS, To download latest eksctl tool visit eksctl official github page

curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp

move eksctl setup to /usr/local/bin directory

sudo mv /tmp/eksctl /usr/local/bin 

To check eksctl version

eksctl version

Below are eksctl help commands

eksctl --help
eksctl create cluster --help
eksctl create cluster [command] --help

#2:Install Kubectl on Ubuntu

Add the kubectl GPG key

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

Create apt repo for kubectl

sudo touch /etc/apt/sources.list.d/kubernetes.list 

Add Kubernetes official apt repo

echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list

Update the system packages

sudo apt-get update

Install kubectl on Ubuntu using below command

sudo apt-get install -y kubectl

#3:Install AWS CLI on Ubuntu

Download the aws cli bundle using below command

 sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

Install the unzip and python on Ubuntu if not installed

 sudo apt install unzip python

Extract the aws cli bundle setup

 sudo unzip unzip awscliv2.zip

Configure the AWS CLI on Ubuntu

sudo ./aws/install

Verify the AWS CLI version

aws --version

Output:

aws-cli/1.18.97 Python/2.7.18rc1 Linux/5.4.0-1015-aws botocore/1.17.20

#4:Create IAM User with full S3, EC2, Route53 and VPC access in AWS

Now create IAM user with full S3, EC2, Route 53 and VPC access in your AWS account as shown below

  1. AmazonS3FullAccess 
  2. AmazonEC2FullAccess 
  3. AmazonRoute53FullAccess 
  4. IAMFullAccess 
  5. AmazonVPCFullAccess 
kubernetes kops IAM access

#5:Configure AWS CLI

To connect AWS using CLI we have configure AWS user using below command

aws configure

it will ask AWS Access Key ID, AWS Secret Access Key, Default region name, Default output format

AWS Access Key ID [None]: *********7G
AWS Secret Access Key [None]: ***********************px
Default region name [None]: ap-south-1
Default output format [None]: json

Now you have connected your aws account using AWS CLI.

#6:How to Create EKS Cluster in AWS

Create Create EKS Cluster in AWS using eksctl

eksctl create cluster --name demo-ekscluster --region ap-south-1 --version 1.21 --nodegroup-name linux-nodes --node-type t2.micro --nodes 2

Conclusion:

In this article we have covered How to Create EKS Cluster in AWS/How to Create EKS cluster using eksctl/AWS EKS Cluster Setup using eksctl.

Related Articles:

Steps to Setup Kubernetes on AWS using KOPS

FOSS TechNix

FOSS TechNix (Free,Open Source Software's and Technology Nix*) founded in 2019 is a community platform where you can find How-to Guides, articles for DevOps Tools,Linux and Databases.

1 thought on “How to Create EKS Cluster in AWS [2 Steps]”

  1. Pingback: Devops

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap