How to create cluster For ECS Fargate Deployment
- Chinthaka Dinadasa
- 08 Jul, 2023
An ECS Fargate cluster consists of several essential components.
First, container instances serve as the compute resources, responsible for running containers and executing tasks within the cluster.
Task definitions, define how containers should be configured, including resource requirements and networking settings.
Tasks represent running instances of containerized applications, while services enable managing long-running applications, handling scaling, load balancing, and task recovery.
Load balancers distribute incoming traffic across multiple tasks for high availability and scalability.
In this article, we will explore how we should set up those cluster components to create an efficient and effective deployment.
Setting Up ECS Cluster
Let’s start with the ECS cluster, Navigate to Elastic Container Service, choose clusters and press Create a cluster.
Cluster VPC / Networking Configuration
Here in this infrastructure, we have components that should be deployed on both public and private subnets. Hence choose the VPC and all the subnets under that VPC.
Infrastructure Configurations
Here we can choose how our infrastructure should be placed between,
-
Fargate - Default and Pay-as-you-go configuration. (Serverless) - We choose fargate.
-
EC2 Instances - Manual configurations.
-
External EC2 instances using ECS anywhere
Then press Create with other default configurations.
Conclusion
Now we have completed setting up the ECS cluster which will be the base for our ECS fargate deployment.
Let’s focus on creating Task definitions where we configure how the containers should be deployed in our next article.