---
# System prepended metadata

title: 'ECS, EKS Introduction'
tags: [AWS Learning Group]

---

###### tags: `AWS Learning Group`


# ECS, EKS Introduction

### What is ECS
#### ECS - Elastic Container Service
- Service that helps with deployment, management of container applications
- usually used with Fargate, so no need to worry about handling servers, capacity, security. You only have to focus on the application itself
- can also be used with EC2 (manage the underlying server by youself)

### AWS Fargate
- serverless
- Fargate launch type is usually used in ECS
- cluster: a group of services/applications
- service: a function/application provided by containers
- task definition: define parameters of 1~10 containers that form an application, including OS, which container image to use, internet port, volume limits, load balancing...

![](https://hackmd.io/_uploads/SJQ6KIqEn.png)


### ECS vs EKS?
- functions are basically the same: deploy and manage container services without worrying about the underlying infrustructure
- Both are powered by AWS EC2, S3, VPC, IAM, cloudformation
- ECS uses AWS's own API
- EKS supports the open-source Kubernetes service, and supports all Kubernetes APIs

![](https://hackmd.io/_uploads/BJr4uUc4n.png)


#### EKS use case
- when you need to manage complex, large-scale applications, or if you have the need of migrating to and from different Kubernetes platforms

#### ECS use case
- when you need a simple and easy solution for deploying and managing applications, or if you need more integration with other AWS services

#### Implementations
##### ECS
1. console --> ECS (don't use the new UI)
2. get started 
3. define task, service, cluster...
4. create!


##### EKS
1. install eksctl https://github.com/weaveworks/eksctl/blob/main/README.md#installation
2. run ```aws configure``` if your terminal doesn't have your aws account profile
3. ```eksctl create cluster --name test --version 1.23 --region us-east-1 --nodegroup-name test-nodes --node-type t2.micro --nodes 2```
4. check eks cluster on aws console, or run ```kubectl get nodes``` to see your worker nodes
5. ```eksctl delete cluster --name test```




reference:
https://www.missioncloud.com/blog/amazon-ecs-vs-eks-which-service-is-right-for-you
https://docs.aws.amazon.com/AmazonECS/latest/userguide/what-is-fargate.html
https://www.youtube.com/watch?v=C8Z8XrGTicQ
https://aws.amazon.com/tw/ecs/features/
https://www.nops.io/aws-eks-vs-ecs-the-ultimate-guide/
https://www.youtube.com/watch?v=p6xDCz00TxU