Create EKS Cluster using eksctl

  • It will take 15 to 20 minutes to create the Cluster Control Plane
# Create Cluster using eksctl
eksctl create cluster --name=eksdemo1 \
                      --region=us-east-1 \
                      --zones=us-east-1a,us-east-1b \
                      --without-nodegroup
how to create eks cluster using eksctl
eks cluster “eksdemo1” got created

#Get list of clusters

eksctl get cluster –region us-east-1

how to get list of clusters in the region

Create & Associate IAM OIDC Provider for our EKS Cluster

# Replace with region & cluster name
eksctl utils associate-iam-oidc-provider \
    --region us-east-1 \
    --cluster eksdemo1 \
    --approve
AWS IAM OIDC provider associate with eks cluster using eksctl util command

Create EC2 Keypair

  • Create a new EC2 Keypair with name as kube-demo
  • This keypair we will use it when creating the EKS NodeGroup.
  • This will help us to login to the EKS Worker Nodes using Terminal.
how to create keypair for our instances so that we can communicate using ssh

Create Node Group with additional Add-Ons in Public Subnets

These add-ons will create the respective IAM policies for us automatically within our Node Group role.

# Create Public Node Group   
eksctl create nodegroup --cluster=eksdemo1 \
                       --region=us-east-1 \
                       --name=eksdemo1-ng-public1 \
                       --node-type=t3.medium \
                       --nodes=2 \
                       --nodes-min=2 \
                       --nodes-max=4 \
                       --node-volume-size=20 \
                       --ssh-access \
                       --ssh-public-key=kube-demo \
                       --managed \
                       --asg-access \
                       --external-dns-access \
                       --full-ecr-access \
                       --appmesh-access \
                       --alb-ingress-access 
eks nodegroups got created

Verify nodes

kubectl get nodes

get nodes using kubctl command

kubectl get nodes -o wide

how to get nodes details along with ip address using kubectl command

kubectl config view –minify

kubectl config view output

eksctl get nodegroup –cluster=eksdemo1 –region=us-east-1

how list nodegroup in the cluster in the particular region

ssh -i kube-demo.pem ec2-user@54.88.106.224

how to ssh into the aws eks instances using keypair

df -h

how to check the space available in instance

eksctl delete cluster eksdemo1 –region=us-east-1

how to delete the aws eks cluster

Leave a Reply

Shopping cart0
There are no products in the cart!
Continue shopping
0