Deploy Amazon EKS cluster with Fargate-Linux nodes through eksctl

Follow this tutorial to configure EKS cluster with eksctl tool.

Sourav Karmakar
3 min readJun 22, 2022

Fargate provides you on-demand, right sized compute capacity for containers in AWS. EKS integrates with AWS Fargate. You don’t have to provision, manage and scale group of virtual machines to run your containerized application, just use EKS Fargate.

Prerequisites:
1. eksctl — command line tool for creating and managing Kubernetes Cluster on Amazon EKS. It automates most of the tasks for deploying EKS. Click here to see installation guide of eksctl.
2. kubectl — command line tool for managing Kubernetes cluster. See, how to install kubectl.
3. IAM permissions to deploy and manage EKS cluster.

Deploy EKS Cluster:

Modify and use the below command to deploy the cluster-

eksctl create cluster --name myDemoEKS \
--region us-east-1 \
--fargate
EKS with Fargate nodes deployment with eksctl

This will take a few minutes to deploy the cluster.

You will find the Cloud Formation template in the console that is used in the background to deploy the cluster -

Now that our cluster is deployed, lets check the nodes -

kubectl get nodes

Great. Your cluster is now ready for container deployments.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — -

Create a cluster using config file:

Save the below text as myFargateCluster.yaml

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: fargate-cluster
region: ap-northeast-1
nodeGroups:
- name: ng-1
instanceType: m5.large
desiredCapacity: 1
fargateProfiles:
- name: fp-default
selectors:
- namespace: default
- namespace: kube-system

Run the below command to deploy the cluster:

eksctl create cluster -f myFargateCluster.yaml

For more information follow this — EKS Fargate Support — eksctl

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Delete the EKS Cluster:

eksctl delete cluster --name myDemoEKS --region us-east-1
Delete EKS cluster

--

--