Create a Cluster on Amazon EKS

By Hemanta Sundaray on 2022-07-16

We will create the cluster using Fargate Linux node type. Fargate is a serverless compute engine that will let us deploy Kubernetes pods without managing Amazon EC2 instances.

Creating the cluster

We will create our Amazon EKS cluster using the eksctl create cluster command.

eksctl create cluster --name node-web-app --region ap-south-1 --fargate

EKS Cluster

Note that the cluster name can only contain alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can’t be longer than 128 characters. Replace region_code with any AWS region that is supported by Amazon EKS.

Cluster creation takes several minutes. During creation, you will see several lines of output. The last line of output is similar to the following:

EKS Cluster

View Kubernetes Resources

View your cluster nodes:

kubectl get nodes -o wide

Cluster Nodes

View the workloads running on your cluster:

kubectl get pods -A -o wide

Cluster Pods

Delete Your Cluster & Nodes

We can delete the cluster and the nodes with the following command:

eksctl delete cluster –name node-web-app –region ap-south-1

Cluster Deletion

Join the Newsletter