DEV Community

t.okazaki
t.okazaki

Posted on

Creating AWS EKS cluster with Fargate

Recently I've been experimenting with a configuration using Fargate with AWS EKS (Kubernetes version 1.17). I think I can reduce the burden of infrastructure management, by adoption Fargate which can worker nodes be managed. I wondered which terraform and eksctl are nicer to create Fargate on AWS EKS.

By the way, Fargate only supports ALB as a load balancer, and EKS only supports the Classic Load Balancer as the default.
In order to use Fargate and ALB, you need to follow the following documentation to deploy the ALB Ingress Controller on an EKS cluster.
https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html

The above AWS documentation uses eksctl. When I created an EKS cluster with eksctl, I could do the procedure smoothly.
However, when I created an EKS cluster with Terraform, I was not able to build the ALB Ingress Controller with above documantation because the EKS cluster was not created by eksctl which uses CloudFormation stack.

So my conclusion, the following step would be easier to create and manage the structure of Fargate with EKS.
First, build VPC, subnetworks, databases and any AWS resources using Terraform.
Second, build an EKS cluster or ALB Ingress Controller using eksctl.

Top comments (0)