© 2021 DXC Technology Company. All rights reserved.
AWS ECS vs EKS
March 12, 2021 2
© 2020 DXC Technology Company. All rights reserved.
Agenda
Tópico
Microservices Architecture
Orchestrating your containers
Container Orchestration Tools
AWS ECS vs EKS
ECS
Kubernetes Architecture – k8s
EKS
March 12, 2021 3
© 2021 DXC Technology Company. All rights reserved.
Microservices
Architecture
March 12, 2021 4
© 2020 DXC Technology Company. All rights reserved.
Microservices Architeture
March 12, 2021 5
© 2021 DXC Technology Company. All rights reserved.
Orchestrating your
containers
March 12, 2021 6
© 2020 DXC Technology Company. All rights reserved.
Orchestrating your containers
March 12, 2021 7
© 2021 DXC Technology Company. All rights reserved.
Container
Orchestration Tools
March 12, 2021 8
© 2020 DXC Technology Company. All rights reserved.
Container Orchestration Tools
Managing, scaling and deploying containers
March 12, 2021 9
© 2021 DXC Technology Company. All rights reserved.
AWS ECS vs EKS
March 12, 2021 10
© 2020 DXC Technology Company. All rights reserved.
EKS vs ECS
Image registry
Amazon Elastic
Container Registry
(Amazon ECR)
Orchestration
Amazon Elastic
Container Service
(Amazon ECS)
Amazon Elastic
Kubernetes
Service (Amazon
EKS)
Compute
Amazon Elastic
Compute Cloud
(Amazon EC2)
AWS Fargate
March 12, 2021 11
© 2021 DXC Technology Company. All rights reserved.
ECS
March 12, 2021 12
© 2020 DXC Technology Company. All rights reserved.
ECS
Fully managed container orchestration platform
Amazon ECR Amazon ECS scales
your application and
manages your
containers for
availability
Build images and
store using ECR or
any other repository
Amazon ECS
Define your
application
Manage
containers
Select container
images and
resources needed for
application
Amazon EC2
AWS Fargate
March 12, 2021 13
© 2020 DXC Technology Company. All rights reserved.
ECS
ECS cluster
EC2 instance EC2 instance EC2 instance
Amazon CloudWatch
IAM
Amazon EC2
Auto Scaling
Containers Containers Containers
AWS Cloud
Amazon ECS
March 12, 2021 14
© 2020 DXC Technology Company. All rights reserved.
ECS
internet Elastic Load
Balancing
Amazon EC2 instance
Task Task Amazon ECS
container
agent
Container Container
Amazon EC2 instance
Task Task Amazon ECS
container
agent
Container Container
Amazon EC2 instance
Task Task
Containers Container
Amazon ECS
container
agent
Amazon ECS
• Agent
communication
service
• API
• Cluster management
engine
• Key and value store
Elastic Load
Balancing
March 12, 2021 15
© 2020 DXC Technology Company. All rights reserved.
AWS Fargate Advantages
March 12, 2021 16
© 2021 DXC Technology Company. All rights reserved.
Arquitetura
Kubernetes – K8s
March 12, 2021 17
© 2020 DXC Technology Company. All rights reserved.
Kubernetes – K8s
Helps run
containers at scale
Open sourcecontainer
orchestration platform
Provides primitives
(building blocks)for
building modern
applications
March 12, 2021 18
© 2020 DXC Technology Company. All rights reserved.
• API Server: você precisa interagir com o cluster do Kubernetes? Use a API. A
API do Kubernetes é a interface do plano de controle. Ela processa
solicitações internas e externas. O servidor da API determina se uma
solicitação é válida. Se for, ela a processa. É possível acessar a API por meio
de chamadas REST, da interface de linha de comando kubectl;
• Scheduler: seu cluster está íntegro? Se você precisar de novos containers,
onde eles ficarão? Isso é um trabalho para o Scheduler. Ele analisa quais os
recursos de que um pod necessita, como CPU e memória. E também avalia
integridade do cluster. Depois, ele programa o pod no worker node apropriado.
• etcd: o etcd é um banco de dados de armazenamento de chave/valor que
contém as informações e dados de configuração sobre o estado do cluster. Ele
é distribuído, tolerante a falhas e foi projetado para ser a principal fonte de
informações sobre o cluster.
• Controller-Manager: um controlador é um loop de controle que observa o
estado compartilhado do cluster por meio do API Server e faz alterações na
tentativa de mover o estado atual para o estado desejado. Exemplos de
controladores que vêm com o Kubernetes hoje são o controlador de
replicação, controlador de endpoints, controlador de namespace e controlador
de contas de serviço.
• kubelet: faz a comunicação com o control plane. O kubelet assegura que os
containers estejam em execução em um pod. Quando o controlplane precisa
que algo aconteça em um worker node, o kubelet realiza a ação.
• kube-proxy: é um proxy que facilita os serviços de rede do Kubernetes. O
kube-proxy gerencia as comunicações de rede dentro e fora do cluster.
Arquitetura Kubernetes – K8s
March 12, 2021 19
© 2021 DXC Technology Company. All rights reserved.
EKS
March 12, 2021 20
© 2020 DXC Technology Company. All rights reserved.
EKS is fully managed Kubernetes
Amazon EKS helps customer run Kubernetes.
Amazon EKS makes it
easy to run
Kubernetes on AWS
Provision an
EKS cluster
Amazon EC2
Deploy worker
nodes for you
EKS cluster
Amazon EKS
Connect to EKS Run Kubernetes apps
March 12, 2021 21
© 2020 DXC Technology Company. All rights reserved.
EKS is Kubernetes certifiedconformant
• Customers can use existing tooland
plugins.
• Applications can run on anystandard
Kubernetes environment.
• Application can be easily migratedto
Amazon EKS.
March 12, 2021 22
© 2020 DXC Technology Company. All rights reserved.
Kubernetes components
us-east-1a
masters
etcd
worker nodes
Controller
manager
Cloud
controller
Scheduler
API Server
Pod Pod
kubelet
kube-proxy
Pod
March 12, 2021 23
© 2020 DXC Technology Company. All rights reserved.
Kubectl command line interface
masters
worker nodes
Controller
manager
Cloud
controller
Scheduler
API Server
Pod Pod
kubelet
kube-proxy
Pod
kubectl
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-4293833666-20vr8 1/1 Running 0 2m
nginx-4293833666-3gzfw 1/1 Running 0 2m
nginx-4293833666-7nBiH 1/1 Running 0 2m
March 12, 2021 24
© 2020 DXC Technology Company. All rights reserved.
Kubernetes with high availability
masters
etcd
masters
etcd
masters
etcd
worker nodes
us-east-1a
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
worker nodes
us-east-1b
worker nodes
us-east-1c 148
March 12, 2021 25
© 2020 DXC Technology Company. All rights reserved.
Amazon EKS architecture
etcd etcd etcd
VPC
API Server Auto Scaling group
Etcd Auto Scaling group
master nodes master nodes
us-east-1c
us-east-1b
master nodes
us-east-1a
March 12, 2021 26
© 2020 DXC Technology Company. All rights reserved.
EKS – Hibrid Architecture: EC2 and Fargate
March 12, 2021 27
© 2020 DXC Technology Company. All rights reserved.
Sample architecture: Reliability
Public subnet Private subnet
Private subnet
AWS Cloud
Users
Amazon EKS
Amazon EKS
Application
Load Balancer
Amazon EKS
Amazon EKS
Amazon RDS
Amazon RDS
Network
Load Balancer
Amazon VPC
Auto Scaling group Auto Scaling group
Availability
Zones
March 12, 2021 28
© 2020 DXC Technology Company. All rights reserved.
Amazon ECS AWS Fargate Amazon EKS
Cost
Free Amazon service Pay for the amount of
memory and vCPU used by
the containers
Fee of $0.10 per cluster per
hour, around $72 per cluster
per month
Where it runs
Only available on AWS Only available on AWS as
part of Amazon ECS
Runs based on Kubernetes
and can be migrated in and
out of AWS anytime
Ease of use
Learning curve of Amazon
ECS architecture is lower
than that of Amazon EKS
Same learning curve as
Amazon ECS, but easier to
deploy and manage
More complex to use and
deploy containers.
What it supports
Supports AWS Management
Console, to access and
manage AWS through a
simple and intuitive web user
interface (WUI)
Supports AWS Management
Console, as ECS does
Supports Kubernetes plugins
integration
Compatibility
Windows containers
compatibility
Limited compatibility with
some Amazon services (e.g.,
you can’t attach persistent
storage to Fargate)
Every configuration needs to
be done using kubectl
ECS vs EKS vs Fargate
March 12, 2021 29
© 2020 DXC Technology Company. All rights reserved.
Microservice | API and Container Based Management Strategy
Container
Presentation
Layer
Application
Runtime
OS
Agent
API
Gateway
API
Mapping
Gateway
Account
Cloud Platform
Microservice A
Container
Application
Runtime
OS
Agent
Microservice B
Container
Application
Runtime
OS
Agent
Application Service Containers
Microservice C
Container
Application
Runtime
OS
Agent
Microservice D
Container
Application
Runtime
OS
Agent
DevOps Platform
System Monitoring
and Dashboards
Resource
Monitoring
Resource
Monitoring
Data Management
& Analytics
Visualization
API
API
API API
API
API
Container based deployment
Serverless Architecture
Unikernels Technologies
Continuous
Assessment
Continuous
Assessment
12 Factor Methodology
Shift Left Testing
Testing Automation
Monitoring and
Logging
Intelligent Alerts
Dynamic, Hybrid
Infrastructure
Security compliance and
patching
Infrastructure as Code
Shift Left Monitoring
Continuous Improvement
Data Services DB Services
Docker Stackato
Cloud Foundry
Kubernetes Service Fabric
PaaS and Container Platform
Mesos
March 12, 2021 30
© 2020 DXC Technology Company. All rights reserved.
Referências
1. https://aws.amazon.com/pt/ecs/
2. https://aws.amazon.com/pt/eks/
3. https://www.eksworkshop.com
4. https://www.udemy.com/course/amazon-eks-
starter-kubernetes-on-aws/
5. https://www.nclouds.com/blog/whats-the-best-
aws-container-management-service-for-you-
amazon-ecs-amazon-eks-or-aws-fargate/
6. https://sensu.io/blog/how-kubernetes-works
March 12, 2021 31
© 2021 DXC Technology Company. All rights reserved.
Questions and
answers
© 2020 DXC Technology Company. All rights reserved.

AWS ECS vs EKS

  • 1.
    © 2021 DXCTechnology Company. All rights reserved. AWS ECS vs EKS
  • 2.
    March 12, 20212 © 2020 DXC Technology Company. All rights reserved. Agenda Tópico Microservices Architecture Orchestrating your containers Container Orchestration Tools AWS ECS vs EKS ECS Kubernetes Architecture – k8s EKS
  • 3.
    March 12, 20213 © 2021 DXC Technology Company. All rights reserved. Microservices Architecture
  • 4.
    March 12, 20214 © 2020 DXC Technology Company. All rights reserved. Microservices Architeture
  • 5.
    March 12, 20215 © 2021 DXC Technology Company. All rights reserved. Orchestrating your containers
  • 6.
    March 12, 20216 © 2020 DXC Technology Company. All rights reserved. Orchestrating your containers
  • 7.
    March 12, 20217 © 2021 DXC Technology Company. All rights reserved. Container Orchestration Tools
  • 8.
    March 12, 20218 © 2020 DXC Technology Company. All rights reserved. Container Orchestration Tools Managing, scaling and deploying containers
  • 9.
    March 12, 20219 © 2021 DXC Technology Company. All rights reserved. AWS ECS vs EKS
  • 10.
    March 12, 202110 © 2020 DXC Technology Company. All rights reserved. EKS vs ECS Image registry Amazon Elastic Container Registry (Amazon ECR) Orchestration Amazon Elastic Container Service (Amazon ECS) Amazon Elastic Kubernetes Service (Amazon EKS) Compute Amazon Elastic Compute Cloud (Amazon EC2) AWS Fargate
  • 11.
    March 12, 202111 © 2021 DXC Technology Company. All rights reserved. ECS
  • 12.
    March 12, 202112 © 2020 DXC Technology Company. All rights reserved. ECS Fully managed container orchestration platform Amazon ECR Amazon ECS scales your application and manages your containers for availability Build images and store using ECR or any other repository Amazon ECS Define your application Manage containers Select container images and resources needed for application Amazon EC2 AWS Fargate
  • 13.
    March 12, 202113 © 2020 DXC Technology Company. All rights reserved. ECS ECS cluster EC2 instance EC2 instance EC2 instance Amazon CloudWatch IAM Amazon EC2 Auto Scaling Containers Containers Containers AWS Cloud Amazon ECS
  • 14.
    March 12, 202114 © 2020 DXC Technology Company. All rights reserved. ECS internet Elastic Load Balancing Amazon EC2 instance Task Task Amazon ECS container agent Container Container Amazon EC2 instance Task Task Amazon ECS container agent Container Container Amazon EC2 instance Task Task Containers Container Amazon ECS container agent Amazon ECS • Agent communication service • API • Cluster management engine • Key and value store Elastic Load Balancing
  • 15.
    March 12, 202115 © 2020 DXC Technology Company. All rights reserved. AWS Fargate Advantages
  • 16.
    March 12, 202116 © 2021 DXC Technology Company. All rights reserved. Arquitetura Kubernetes – K8s
  • 17.
    March 12, 202117 © 2020 DXC Technology Company. All rights reserved. Kubernetes – K8s Helps run containers at scale Open sourcecontainer orchestration platform Provides primitives (building blocks)for building modern applications
  • 18.
    March 12, 202118 © 2020 DXC Technology Company. All rights reserved. • API Server: você precisa interagir com o cluster do Kubernetes? Use a API. A API do Kubernetes é a interface do plano de controle. Ela processa solicitações internas e externas. O servidor da API determina se uma solicitação é válida. Se for, ela a processa. É possível acessar a API por meio de chamadas REST, da interface de linha de comando kubectl; • Scheduler: seu cluster está íntegro? Se você precisar de novos containers, onde eles ficarão? Isso é um trabalho para o Scheduler. Ele analisa quais os recursos de que um pod necessita, como CPU e memória. E também avalia integridade do cluster. Depois, ele programa o pod no worker node apropriado. • etcd: o etcd é um banco de dados de armazenamento de chave/valor que contém as informações e dados de configuração sobre o estado do cluster. Ele é distribuído, tolerante a falhas e foi projetado para ser a principal fonte de informações sobre o cluster. • Controller-Manager: um controlador é um loop de controle que observa o estado compartilhado do cluster por meio do API Server e faz alterações na tentativa de mover o estado atual para o estado desejado. Exemplos de controladores que vêm com o Kubernetes hoje são o controlador de replicação, controlador de endpoints, controlador de namespace e controlador de contas de serviço. • kubelet: faz a comunicação com o control plane. O kubelet assegura que os containers estejam em execução em um pod. Quando o controlplane precisa que algo aconteça em um worker node, o kubelet realiza a ação. • kube-proxy: é um proxy que facilita os serviços de rede do Kubernetes. O kube-proxy gerencia as comunicações de rede dentro e fora do cluster. Arquitetura Kubernetes – K8s
  • 19.
    March 12, 202119 © 2021 DXC Technology Company. All rights reserved. EKS
  • 20.
    March 12, 202120 © 2020 DXC Technology Company. All rights reserved. EKS is fully managed Kubernetes Amazon EKS helps customer run Kubernetes. Amazon EKS makes it easy to run Kubernetes on AWS Provision an EKS cluster Amazon EC2 Deploy worker nodes for you EKS cluster Amazon EKS Connect to EKS Run Kubernetes apps
  • 21.
    March 12, 202121 © 2020 DXC Technology Company. All rights reserved. EKS is Kubernetes certifiedconformant • Customers can use existing tooland plugins. • Applications can run on anystandard Kubernetes environment. • Application can be easily migratedto Amazon EKS.
  • 22.
    March 12, 202122 © 2020 DXC Technology Company. All rights reserved. Kubernetes components us-east-1a masters etcd worker nodes Controller manager Cloud controller Scheduler API Server Pod Pod kubelet kube-proxy Pod
  • 23.
    March 12, 202123 © 2020 DXC Technology Company. All rights reserved. Kubectl command line interface masters worker nodes Controller manager Cloud controller Scheduler API Server Pod Pod kubelet kube-proxy Pod kubectl $ kubectl get pods NAME READY STATUS RESTARTS AGE nginx-4293833666-20vr8 1/1 Running 0 2m nginx-4293833666-3gzfw 1/1 Running 0 2m nginx-4293833666-7nBiH 1/1 Running 0 2m
  • 24.
    March 12, 202124 © 2020 DXC Technology Company. All rights reserved. Kubernetes with high availability masters etcd masters etcd masters etcd worker nodes us-east-1a © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. worker nodes us-east-1b worker nodes us-east-1c 148
  • 25.
    March 12, 202125 © 2020 DXC Technology Company. All rights reserved. Amazon EKS architecture etcd etcd etcd VPC API Server Auto Scaling group Etcd Auto Scaling group master nodes master nodes us-east-1c us-east-1b master nodes us-east-1a
  • 26.
    March 12, 202126 © 2020 DXC Technology Company. All rights reserved. EKS – Hibrid Architecture: EC2 and Fargate
  • 27.
    March 12, 202127 © 2020 DXC Technology Company. All rights reserved. Sample architecture: Reliability Public subnet Private subnet Private subnet AWS Cloud Users Amazon EKS Amazon EKS Application Load Balancer Amazon EKS Amazon EKS Amazon RDS Amazon RDS Network Load Balancer Amazon VPC Auto Scaling group Auto Scaling group Availability Zones
  • 28.
    March 12, 202128 © 2020 DXC Technology Company. All rights reserved. Amazon ECS AWS Fargate Amazon EKS Cost Free Amazon service Pay for the amount of memory and vCPU used by the containers Fee of $0.10 per cluster per hour, around $72 per cluster per month Where it runs Only available on AWS Only available on AWS as part of Amazon ECS Runs based on Kubernetes and can be migrated in and out of AWS anytime Ease of use Learning curve of Amazon ECS architecture is lower than that of Amazon EKS Same learning curve as Amazon ECS, but easier to deploy and manage More complex to use and deploy containers. What it supports Supports AWS Management Console, to access and manage AWS through a simple and intuitive web user interface (WUI) Supports AWS Management Console, as ECS does Supports Kubernetes plugins integration Compatibility Windows containers compatibility Limited compatibility with some Amazon services (e.g., you can’t attach persistent storage to Fargate) Every configuration needs to be done using kubectl ECS vs EKS vs Fargate
  • 29.
    March 12, 202129 © 2020 DXC Technology Company. All rights reserved. Microservice | API and Container Based Management Strategy Container Presentation Layer Application Runtime OS Agent API Gateway API Mapping Gateway Account Cloud Platform Microservice A Container Application Runtime OS Agent Microservice B Container Application Runtime OS Agent Application Service Containers Microservice C Container Application Runtime OS Agent Microservice D Container Application Runtime OS Agent DevOps Platform System Monitoring and Dashboards Resource Monitoring Resource Monitoring Data Management & Analytics Visualization API API API API API API Container based deployment Serverless Architecture Unikernels Technologies Continuous Assessment Continuous Assessment 12 Factor Methodology Shift Left Testing Testing Automation Monitoring and Logging Intelligent Alerts Dynamic, Hybrid Infrastructure Security compliance and patching Infrastructure as Code Shift Left Monitoring Continuous Improvement Data Services DB Services Docker Stackato Cloud Foundry Kubernetes Service Fabric PaaS and Container Platform Mesos
  • 30.
    March 12, 202130 © 2020 DXC Technology Company. All rights reserved. Referências 1. https://aws.amazon.com/pt/ecs/ 2. https://aws.amazon.com/pt/eks/ 3. https://www.eksworkshop.com 4. https://www.udemy.com/course/amazon-eks- starter-kubernetes-on-aws/ 5. https://www.nclouds.com/blog/whats-the-best- aws-container-management-service-for-you- amazon-ecs-amazon-eks-or-aws-fargate/ 6. https://sensu.io/blog/how-kubernetes-works
  • 31.
    March 12, 202131 © 2021 DXC Technology Company. All rights reserved. Questions and answers
  • 32.
    © 2020 DXCTechnology Company. All rights reserved.