SlideShare uma empresa Scribd logo
1 de 39
© 2020, Amazon Web Services, Inc. or its Affiliates.
Bruno Emer
Arquiteto de Soluções, AWS
Introdução ao Amazon EKS
© 2020, Amazon Web Services, Inc. or its Affiliates.
O Amazon Elastic Kubernetes Service (EKS) é um serviço
de Kubernetes totalmente gerenciado. O EKS executa a
mais recente versão de produção do Kubernetes e é
certificado como compatível com o Kubernetes
© 2020, Amazon Web Services, Inc. or its Affiliates.
port 8080 port 8080
ReplicaSet
#Pods—2
label selector: v1
ReplicaSet
#Pods—1
label selector: v2
Node
Docker
Pod
Containers
Kubernetes - Conceitos
© 2020, Amazon Web Services, Inc. or its Affiliates.
Kubernetes - Conceitos
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates.
kubelet
© 2020, Amazon Web Services, Inc. or its Affiliates.
kubelet
kubelet
kubelet
kubelet
Control Plane
© 2020, Amazon Web Services, Inc. or its Affiliates.
O que o EKS faz para você:
• Nós realizamos o deploy do Control Plane do Kuberentes e do etcd
em uma configuração altamente disponível em 3 Azs
• Nós gerenciamos o control plane para você, assim como fazemos
com os bancos de dados do serviço RDS
• Nós provemos um plugin de rede (CNI) que integra a rede dos pods
nativamente com a AWSVPC
• Nós integramos/federamos o acesso de usuários atra’ves do CLI
(kubectl) e API com o AWS IAM
© 2020, Amazon Web Services, Inc. or its Affiliates.
EKS é Kubernetes Certified
O EKS executa o Kubernetes
upstream e é certificado como
compatível com o Kubernetes.
Isso significa que aplicações
gerenciadas pelo Amazon EKS são
totalmente compatíveis com os
aplicativos gerenciados por
qualquer ambiente Kubernetes
padrão.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Amazon EKS - Arquitetura
prod-cluster-123.eks.amazonaws.com
EKS workers
kubectl
Your AWS account
VPC
Amazon EKS
© 2020, Amazon Web Services, Inc. or its Affiliates.
VPC
Infraestrutura altamente disponíve
e single tenant
Todos componentes são nativos da
AWS
Separação do etcd para auxiliar
com processos de upgrades e
operação
Interface provida por um NLB que
habilita private endpoints na sua
VPC
NLB
Availability Zone 1 Availability Zone 2 Availability Zone 3
Etcd
API Servers
EKS Control Plane
Amazon EKS
© 2020, Amazon Web Services, Inc. or its Affiliates.
Rede
© 2020, Amazon Web Services, Inc. or its Affiliates.
Public == false
Private == true
WorkerVPC (your account)
Kubectl
Control PlaneVPC (AWS account)
etcd
AZ 1 AZ 2
API Server
etcd
API Server
EKS-owned ENIs
prod-cluster-123.eks.amazonaws.com
Private hosted zone
Kubelet
AZ 1
Worker node
Kube-proxy
Kubelet
AZ 2
Worker node
Kube-proxy
Endpoints da API do EKS privados
© 2020, Amazon Web Services, Inc. or its Affiliates.
Pod Networking com o EKS
ENI
Secondary IPs:
10.0.0.1
10.0.0.2
10.0.0.1
10.0.0.2
ENI
10.0.0.20
10.0.0.22
Secondary IPs:
10.0.0.20
10.0.0.22
ec2.associateaddress()
VPC Subnet – 10.0.0.0/24
Instance 1 Instance 2
© 2020, Amazon Web Services, Inc. or its Affiliates.
Segurança
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modelo de responsabilidade compartilhada
Responsible for
Security “of” the cloud
Responsible for
Security “in” the cloud
Network and Firewall Configuration
Identity & Access Management
Customer Data
Compute Storage Database Networking
Regions Availability Zones Edge Locations
Operating System
Applications Platform
AWSCUSTOMER
© 2020, Amazon Web Services, Inc. or its Affiliates.
IAM = Quem pode fazer o que na Plataforma e/ou no cluster?
Pessoas Código / Pipelines
Photo & Licence Photo & Licence
© 2020, Amazon Web Services, Inc. or its Affiliates.
E você deveria investir em automação fim-a-fim
• Infraestrutura como Código
• Builds de código & Containers
• Segurança (DevSecOps)
• Deployments (Não utilize o
kubectl para realizar deploys
em pod usando seu laptop!)
Invista aqui para tornar os
processos mais fáceis e
automáticos e deixar seu time
focar no que importa!
Photo
© 2020, Amazon Web Services, Inc. or its Affiliates.
Porque DevSecOps implementa segurança nos pipelines de CI/CD?
Se você não tornar isto rápido e
fácil, as pessoas irão contornar as
políticas ou restrições para fazer o
serviço e entregar os prazos!
Photo &
Licence
© 2020, Amazon Web Services, Inc. or its Affiliates.
Ação no K8s permitida/negada
EKS: Autenticação com o IAM + kubectl
Autorização da identidadeAWS
utilizando RBAC
API do K8s
ForneceAWS Identity
Veririca AWS Identity
kubectl
AWS IAM
Autenticação
© 2020, Amazon Web Services, Inc. or its Affiliates.
Nota: O usuário ou IAM role que cria o cluster irá
possuir permissões de full admin no mesmo!
O ideal é a utilização de um usuário ou IAM role
dedicado com acesso limitado, assim como você
faz com a conta root
© 2020, Amazon Web Services, Inc. or its Affiliates.
Kubernetes RBAC - Basics
O Kubernetes possui Roles que são
definidas e aplicadas a um único
namespace (um cluster virtual) e
ClusterRoles que são aplicadas a
todos os namespaces do cluster.
Você define roles customizadas
descrevendo resources (como pods e
nodes) e quais verbs (como get,
update e delete) são permitidos.
kind: ClusterRole
metadata:
name: cluster-admin
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
© 2020, Amazon Web Services, Inc. or its Affiliates.
Kubernetes RBAC built-in ClusterRoles
Default ClusterRole
Description
cluster-admin
Allows super-user access to perform any action on any resource.When used in a ClusterRoleBinding,
a ClusterRoleBinding, it gives full control over every resource in the cluster and in all namespaces.
namespaces.When used in a RoleBinding, it gives full control over every resource in the rolebinding's
rolebinding's namespace, including the namespace itself.
admin
Allows admin access, intended to be granted within a namespace using a RoleBinding. If used in
used in a RoleBinding, allows read/write access to most resources in a namespace, including the
the ability to create roles and rolebindings within the namespace. It does not allow write access to
access to resource quota or to the namespace itself.
edit
Allows read/write access to most objects in a namespace. It does not allow viewing or modifying
modifying roles or rolebindings.
view
Allows read-only access to see most objects in a namespace. It does not allow viewing roles or
or rolebindings. It does not allow viewing secrets, since those are escalating
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modelo de responsabilidade compartilhada
Responsible for
Security “of” the cloud
Responsible for
Security “in” the cloud
Network and Firewall Configuration
Identity & Access Management
Customer Data
Compute Storage Database Networking
Regions Availability Zones Edge Locations
Operating System
Applications Platform
AWSCUSTOMER
© 2020, Amazon Web Services, Inc. or its Affiliates.
Logging e Auditoria do Control Plane
Logging do control plane, especialmente com a finalidade de trilha de auditoria das
ações naAPI, é um aspecto important da segurança.
Quanto utilizando o EKS você pode (e deve) habilitar o logging para o CloudWatch
Logs.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modelo de responsabilidade compartilhada
Responsible for
Security “of” the cloud
Responsible for
Security “in” the cloud
Network and Firewall Configuration
Identity & Access Management
Customer Data
Compute Storage Database Networking
Regions Availability Zones Edge Locations
Operating System
Applications Platform
AWSCUSTOMER
© 2020, Amazon Web Services, Inc. or its Affiliates.
Instalando um Network Policy Provider no Kubernetes
Regras de firewall no Kubernetes são controladas através de NetworkPolicies.
Você precisa primeiro adicionar um Network Policy Provider ao EKS /
Kubernetes para poder utilizar Network Policies. O Calico é um Network Policy
Provider coberto em nossa documentação.
https://docs.aws.amazon.com/eks/latest/userguide/calico.html
© 2020, Amazon Web Services, Inc. or its Affiliates.
Security Group por POD
https://docs.aws.amazon.com/eks/latest/userguide/security-groups-for-pods.html
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modelo de responsabilidade compartilhada
Responsible for
Security “of” the cloud
Responsible for
Security “in” the cloud
Network and Firewall Configuration
Identity & Access Management
Customer Data
Compute Storage Database Networking
Regions Availability Zones Edge Locations
Operating System
Applications Platform
AWSCUSTOMER
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modo EC2 – Responsabilidades dos clientes
• Tipo de instância e quantidade?
• Qual é a proporção de CPU e RAM?
• Capacidade adicional para
escalabilidade e disponibilidade?
• Qual SO escolher?
• Se for Amazon Linux, nós provemos as
AMIs
• Hardening do SO (ex.: CIS benchmark)
• Patching do SO, Docker, kubelet etc.
Photo & Licence
© 2020, Amazon Web Services, Inc. or its Affiliates.
Modelo de responsabilidade compartilhada - Fargate
Responsible for Security
“of” the cloud
Responsible for
Security “in” the cloud
Network and Firewall Configuration
Identity & Access Management
Customer Data
Compute Storage Database Networking
Regions Availability Zones Edge Locations
Operating System
Applications
Platform
AWSCUSTOMER
© 2020, Amazon Web Services, Inc. or its Affiliates.
Atualizando o EKS
• O Kubernetes tem uma nova versão major todo trimetre
• O Kubernetes tem novas versões minor frequentemente
• Algumas vezes essas atualização são relacionadas a segurança
• O EKS possui APIs para iniciar o processo de update do control
plane
• Você então precisa atualizar os worker nodes:
• Geralmente os worker nodes estão em auto-scaling
groups, o que significa atualizar as AMIs
• Nós provemosAMIs para os worker nodes do EKS
regularmente, além dos scripts necessários para
atualização de suas próprias AMIs
© 2020, Amazon Web Services, Inc. or its Affiliates.
Monitoramento
© 2020, Amazon Web Services, Inc. or its Affiliates.
Duas formas para a coleta e monitoramento das métricas em seu
cluster
Você pode utilizar o CloudWatch Container Insights
Para agregar, alertar e visualizer métricas no mesmo lugar
onde você visualzar todas as outras métricas dos serviços da
AWS.
Você pode utilizar o Prometheus para agregar / alertar
sobre seu Cluster, Nodes e métricas dos Pods e o Grafana
para visualizar estas métricas em Dashboards.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Duas formas para coletar e monitorar logs em seu cluster
Você pode também utilizar o fluentd para enviar logs para o
CloudWatch Logs. Isto pode atender as suas necessiadades,
mas caso queira, você também pode enviar os logs para
outros serviços.
Um padrão comum, utilizando ferramenta open source é
coletar logs com o fluentd e enviar os mesmos para o
Elasticsearch onde você pode visualizá-las com o Kibana –
um stack conhecido como EFK.
Enquanto voce pode executar estes components por si só,
nós recomendamos a utilização de serviços gerenciados
como o Amazon ElasticSearch que também inclui o Kibana.
Amazon Elasticsearch Service Amazon CloudWatch
© 2020, Amazon Web Services, Inc. or its Affiliates.
Multiplos NodePools /Tipos de
instâncias
(ex. misturando GPU, Spot eWindows)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Você pode utilizar intâncias com GPU no EKS
A AWS tem múltiplos tipos de instâncias que
oferecem GPUs, como as insâncias da família
p3.
Estes tipos de instâncias são usadas para coisas
como Machine Learning e necessidades de
computação intense que se beneficiam de
paralelismo massivo.
É possível executar este tipo de instância em
um NodeGroup separado e utilizar taints e
tolerations para garantir que apenas workloads
que precisem de GPU serão executados nestas
instâncias.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Você pode utilizar instâncias Spot com o EKS
AWS oferece instâncias que não estão em uso
no momento com descontos de até 90%.
É possível possuir clusters sendo executados
totalmente com instâncias Spot ou clusters
mistos com instâncias Spot e Sob Demanda
para atender as suas necessidades.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Obrigado

Mais conteúdo relacionado

Mais procurados

Levando Serverless para o Edge - ARC301 - Sao Paulo Summit
Levando Serverless para o Edge -  ARC301 - Sao Paulo SummitLevando Serverless para o Edge -  ARC301 - Sao Paulo Summit
Levando Serverless para o Edge - ARC301 - Sao Paulo SummitAmazon Web Services
 
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS - SID201 -...
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS -  SID201 -...Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS -  SID201 -...
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS - SID201 -...Amazon Web Services
 
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...Amazon Web Services LATAM
 
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos Nunes
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos NunesAWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos Nunes
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos NunesAmazon Web Services LATAM
 
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWS
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWSAprenda como migrar e transferir dados ao utilizar a nuvem da AWS
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWSAmazon Web Services LATAM
 
DevOps na AWS: Construindo Sistemas para Entregas Rápidas - DEV301 - Sao Pau...
DevOps na AWS: Construindo Sistemas para Entregas Rápidas -  DEV301 - Sao Pau...DevOps na AWS: Construindo Sistemas para Entregas Rápidas -  DEV301 - Sao Pau...
DevOps na AWS: Construindo Sistemas para Entregas Rápidas - DEV301 - Sao Pau...Amazon Web Services
 
Migração de máquinas virtuais e recuperação de desastres na AWS
Migração de máquinas virtuais e recuperação de desastres na AWSMigração de máquinas virtuais e recuperação de desastres na AWS
Migração de máquinas virtuais e recuperação de desastres na AWSAmazon Web Services LATAM
 
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS - ARC201 - ...
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS -  ARC201 - ...Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS -  ARC201 - ...
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS - ARC201 - ...Amazon Web Services
 
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...Amazon Web Services LATAM
 
Overview of AWS identity services Enabling and securing your cloud journey - ...
Overview of AWS identity services Enabling and securing your cloud journey - ...Overview of AWS identity services Enabling and securing your cloud journey - ...
Overview of AWS identity services Enabling and securing your cloud journey - ...Amazon Web Services
 
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...Amazon Web Services LATAM
 
Desenvolvimento de Aplicações em Container com AWS Fargate - DEV302 - Sao Pa...
Desenvolvimento de Aplicações em Container com AWS Fargate -  DEV302 - Sao Pa...Desenvolvimento de Aplicações em Container com AWS Fargate -  DEV302 - Sao Pa...
Desenvolvimento de Aplicações em Container com AWS Fargate - DEV302 - Sao Pa...Amazon Web Services
 
Construindo um ambiente resiliente para Ransomware com AWS
Construindo um ambiente resiliente para Ransomware com AWSConstruindo um ambiente resiliente para Ransomware com AWS
Construindo um ambiente resiliente para Ransomware com AWSAmazon Web Services LATAM
 
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.Amazon Web Services LATAM
 

Mais procurados (20)

Levando Serverless para o Edge - ARC301 - Sao Paulo Summit
Levando Serverless para o Edge -  ARC301 - Sao Paulo SummitLevando Serverless para o Edge -  ARC301 - Sao Paulo Summit
Levando Serverless para o Edge - ARC301 - Sao Paulo Summit
 
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS - SID201 -...
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS -  SID201 -...Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS -  SID201 -...
Visão Geral dos Serviços de Identidade, Diretório e Acesso da AWS - SID201 -...
 
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...
Usando Containers e Serverless para acelerar o desenvolvimento de aplicações ...
 
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos Nunes
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos NunesAWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos Nunes
AWS Initiate Brasil 2021 - Treinamento e Certificação - Carlos Nunes
 
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWS
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWSAprenda como migrar e transferir dados ao utilizar a nuvem da AWS
Aprenda como migrar e transferir dados ao utilizar a nuvem da AWS
 
DevOps na AWS: Construindo Sistemas para Entregas Rápidas - DEV301 - Sao Pau...
DevOps na AWS: Construindo Sistemas para Entregas Rápidas -  DEV301 - Sao Pau...DevOps na AWS: Construindo Sistemas para Entregas Rápidas -  DEV301 - Sao Pau...
DevOps na AWS: Construindo Sistemas para Entregas Rápidas - DEV301 - Sao Pau...
 
Migração de máquinas virtuais e recuperação de desastres na AWS
Migração de máquinas virtuais e recuperação de desastres na AWSMigração de máquinas virtuais e recuperação de desastres na AWS
Migração de máquinas virtuais e recuperação de desastres na AWS
 
AIML Reforçando a segurança virtual
AIML Reforçando a segurança virtualAIML Reforçando a segurança virtual
AIML Reforçando a segurança virtual
 
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS - ARC201 - ...
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS -  ARC201 - ...Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS -  ARC201 - ...
Arquiteturas e Estratégias para Criar Aplicações Modernas na AWS - ARC201 - ...
 
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...
Uma visão geral da infraestrutura da AWS e como ela pode ajudar seu aplicativ...
 
Melhorando resultados educacionais com AIML
Melhorando resultados educacionais com AIMLMelhorando resultados educacionais com AIML
Melhorando resultados educacionais com AIML
 
Webinar: Containers
Webinar: ContainersWebinar: Containers
Webinar: Containers
 
Microsoft Workloads em Amazon Web Services
Microsoft Workloads em Amazon Web ServicesMicrosoft Workloads em Amazon Web Services
Microsoft Workloads em Amazon Web Services
 
AWS Migration Day - SAP
AWS Migration Day - SAPAWS Migration Day - SAP
AWS Migration Day - SAP
 
Overview of AWS identity services Enabling and securing your cloud journey - ...
Overview of AWS identity services Enabling and securing your cloud journey - ...Overview of AWS identity services Enabling and securing your cloud journey - ...
Overview of AWS identity services Enabling and securing your cloud journey - ...
 
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...
AWS Initiate Brasil 2021 - Desenvolvimento de Talentos na nuvem AWS - Rubem S...
 
Webinar: Gestão de Segurança Cibernética
Webinar: Gestão de Segurança CibernéticaWebinar: Gestão de Segurança Cibernética
Webinar: Gestão de Segurança Cibernética
 
Desenvolvimento de Aplicações em Container com AWS Fargate - DEV302 - Sao Pa...
Desenvolvimento de Aplicações em Container com AWS Fargate -  DEV302 - Sao Pa...Desenvolvimento de Aplicações em Container com AWS Fargate -  DEV302 - Sao Pa...
Desenvolvimento de Aplicações em Container com AWS Fargate - DEV302 - Sao Pa...
 
Construindo um ambiente resiliente para Ransomware com AWS
Construindo um ambiente resiliente para Ransomware com AWSConstruindo um ambiente resiliente para Ransomware com AWS
Construindo um ambiente resiliente para Ransomware com AWS
 
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
 

Semelhante a Introdução ao Amazon EKS

AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdf
AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdfAWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdf
AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdfAmazon Web Services LATAM
 
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAmazon Web Services LATAM
 
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAmazon Web Services LATAM
 
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptx
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptxWebinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptx
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptxAmazon Web Services LATAM
 
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptx
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptxAWS Initiate Digital week 2020 - Nuvem Hibrida.pptx
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptxAmazon Web Services LATAM
 
Amazon EC2 - Introdução, Benefícios e dicas
Amazon EC2 - Introdução, Benefícios e dicasAmazon EC2 - Introdução, Benefícios e dicas
Amazon EC2 - Introdução, Benefícios e dicasJose Papo, MSc
 
Twelve-Factor serverless applications - MAD302 - São Paulo AWS Summit
Twelve-Factor serverless applications - MAD302 - São Paulo AWS SummitTwelve-Factor serverless applications - MAD302 - São Paulo AWS Summit
Twelve-Factor serverless applications - MAD302 - São Paulo AWS SummitAmazon Web Services
 
Desenvolvimento de Aplicações em Container com AWS Fargate
Desenvolvimento de Aplicações em Container com AWS FargateDesenvolvimento de Aplicações em Container com AWS Fargate
Desenvolvimento de Aplicações em Container com AWS FargateAmazon Web Services LATAM
 
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.Amazon Web Services LATAM
 
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdf
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdfVMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdf
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdfAmazon Web Services
 
Introdução ao AWS Elastic Beanstalk - Webinar
Introdução ao AWS Elastic Beanstalk - WebinarIntrodução ao AWS Elastic Beanstalk - Webinar
Introdução ao AWS Elastic Beanstalk - WebinarAmazon Web Services LATAM
 
Webinar: O que é computação em nuvem com a AWS?
Webinar: O que é computação em nuvem com a AWS?Webinar: O que é computação em nuvem com a AWS?
Webinar: O que é computação em nuvem com a AWS?Amazon Web Services
 
Cloud & AWS: Da teoria à prática
Cloud & AWS: Da teoria à práticaCloud & AWS: Da teoria à prática
Cloud & AWS: Da teoria à práticaRicardo Martins ☁
 
Raising the bar #5 - Melhores práticas de workloads Microsoft
Raising the bar #5 - Melhores práticas de workloads MicrosoftRaising the bar #5 - Melhores práticas de workloads Microsoft
Raising the bar #5 - Melhores práticas de workloads MicrosoftAmazon Web Services LATAM
 
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...Amazon Web Services LATAM
 

Semelhante a Introdução ao Amazon EKS (20)

AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdf
AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdfAWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdf
AWS Initiate week 2020 - Security Framework: jornada de segurança na nuvem.pdf
 
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
 
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvemAWS para terceiro setor - Sessão 1 - Introdução à nuvem
AWS para terceiro setor - Sessão 1 - Introdução à nuvem
 
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptx
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptxWebinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptx
Webinar - An Introduction to Building and Optimizing a Hybrid Cloud on AWS.pptx
 
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptx
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptxAWS Initiate Digital week 2020 - Nuvem Hibrida.pptx
AWS Initiate Digital week 2020 - Nuvem Hibrida.pptx
 
Amazon EC2 Introducao e Dicas
Amazon EC2 Introducao e DicasAmazon EC2 Introducao e Dicas
Amazon EC2 Introducao e Dicas
 
Integrando infraestruturas híbridas
Integrando infraestruturas híbridas Integrando infraestruturas híbridas
Integrando infraestruturas híbridas
 
Amazon EC2 - Introdução, Benefícios e dicas
Amazon EC2 - Introdução, Benefícios e dicasAmazon EC2 - Introdução, Benefícios e dicas
Amazon EC2 - Introdução, Benefícios e dicas
 
Como começar com Amazon EKS
Como começar com Amazon EKSComo começar com Amazon EKS
Como começar com Amazon EKS
 
Twelve-Factor serverless applications - MAD302 - São Paulo AWS Summit
Twelve-Factor serverless applications - MAD302 - São Paulo AWS SummitTwelve-Factor serverless applications - MAD302 - São Paulo AWS Summit
Twelve-Factor serverless applications - MAD302 - São Paulo AWS Summit
 
Desenvolvimento de Aplicações em Container com AWS Fargate
Desenvolvimento de Aplicações em Container com AWS FargateDesenvolvimento de Aplicações em Container com AWS Fargate
Desenvolvimento de Aplicações em Container com AWS Fargate
 
Rodando Kubernetes com Amazon EKS
Rodando Kubernetes com Amazon EKSRodando Kubernetes com Amazon EKS
Rodando Kubernetes com Amazon EKS
 
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
AWS para terceiro setor - Sessão 3 - Protegendo seus dados.
 
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdf
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdfVMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdf
VMware Cloud on AWS Hybrid cloud made easy - CMP203 - São Paulo AWS Summit.pdf
 
Introdução ao AWS Elastic Beanstalk - Webinar
Introdução ao AWS Elastic Beanstalk - WebinarIntrodução ao AWS Elastic Beanstalk - Webinar
Introdução ao AWS Elastic Beanstalk - Webinar
 
Webinar: O que é computação em nuvem com a AWS?
Webinar: O que é computação em nuvem com a AWS?Webinar: O que é computação em nuvem com a AWS?
Webinar: O que é computação em nuvem com a AWS?
 
Inicie uma jornada segura para a nuvem
Inicie uma jornada segura para a nuvemInicie uma jornada segura para a nuvem
Inicie uma jornada segura para a nuvem
 
Cloud & AWS: Da teoria à prática
Cloud & AWS: Da teoria à práticaCloud & AWS: Da teoria à prática
Cloud & AWS: Da teoria à prática
 
Raising the bar #5 - Melhores práticas de workloads Microsoft
Raising the bar #5 - Melhores práticas de workloads MicrosoftRaising the bar #5 - Melhores práticas de workloads Microsoft
Raising the bar #5 - Melhores práticas de workloads Microsoft
 
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...
AWS Initiate Brasil 2021 - Segurança e Privacidade de Dados - Ernesto dos San...
 

Mais de Amazon Web Services LATAM

AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAmazon Web Services LATAM
 
AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAmazon Web Services LATAM
 
Automatice el proceso de entrega con CI/CD en AWS
Automatice el proceso de entrega con CI/CD en AWSAutomatice el proceso de entrega con CI/CD en AWS
Automatice el proceso de entrega con CI/CD en AWSAmazon Web Services LATAM
 
Automatize seu processo de entrega de software com CI/CD na AWS
Automatize seu processo de entrega de software com CI/CD na AWSAutomatize seu processo de entrega de software com CI/CD na AWS
Automatize seu processo de entrega de software com CI/CD na AWSAmazon Web Services LATAM
 
Ransomware: cómo recuperar sus datos en la nube de AWS
Ransomware: cómo recuperar sus datos en la nube de AWSRansomware: cómo recuperar sus datos en la nube de AWS
Ransomware: cómo recuperar sus datos en la nube de AWSAmazon Web Services LATAM
 
Aprenda a migrar y transferir datos al usar la nube de AWS
Aprenda a migrar y transferir datos al usar la nube de AWSAprenda a migrar y transferir datos al usar la nube de AWS
Aprenda a migrar y transferir datos al usar la nube de AWSAmazon Web Services LATAM
 
Cómo mover a un almacenamiento de archivos administrados
Cómo mover a un almacenamiento de archivos administradosCómo mover a un almacenamiento de archivos administrados
Cómo mover a un almacenamiento de archivos administradosAmazon Web Services LATAM
 
Os benefícios de migrar seus workloads de Big Data para a AWS
Os benefícios de migrar seus workloads de Big Data para a AWSOs benefícios de migrar seus workloads de Big Data para a AWS
Os benefícios de migrar seus workloads de Big Data para a AWSAmazon Web Services LATAM
 
Los beneficios de migrar sus cargas de trabajo de big data a AWS
Los beneficios de migrar sus cargas de trabajo de big data a AWSLos beneficios de migrar sus cargas de trabajo de big data a AWS
Los beneficios de migrar sus cargas de trabajo de big data a AWSAmazon Web Services LATAM
 
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...Amazon Web Services LATAM
 
Os benefícios de realizar backup na nuvem AWS
Os benefícios de realizar backup na nuvem AWSOs benefícios de realizar backup na nuvem AWS
Os benefícios de realizar backup na nuvem AWSAmazon Web Services LATAM
 

Mais de Amazon Web Services LATAM (20)

AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
 
AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e BackupAWS para terceiro setor - Sessão 2 - Armazenamento e Backup
AWS para terceiro setor - Sessão 2 - Armazenamento e Backup
 
Automatice el proceso de entrega con CI/CD en AWS
Automatice el proceso de entrega con CI/CD en AWSAutomatice el proceso de entrega con CI/CD en AWS
Automatice el proceso de entrega con CI/CD en AWS
 
Automatize seu processo de entrega de software com CI/CD na AWS
Automatize seu processo de entrega de software com CI/CD na AWSAutomatize seu processo de entrega de software com CI/CD na AWS
Automatize seu processo de entrega de software com CI/CD na AWS
 
Cómo empezar con Amazon EKS
Cómo empezar con Amazon EKSCómo empezar con Amazon EKS
Cómo empezar con Amazon EKS
 
Ransomware: cómo recuperar sus datos en la nube de AWS
Ransomware: cómo recuperar sus datos en la nube de AWSRansomware: cómo recuperar sus datos en la nube de AWS
Ransomware: cómo recuperar sus datos en la nube de AWS
 
Ransomware: Estratégias de Mitigação
Ransomware: Estratégias de MitigaçãoRansomware: Estratégias de Mitigação
Ransomware: Estratégias de Mitigação
 
Ransomware: Estratégias de Mitigación
Ransomware: Estratégias de MitigaciónRansomware: Estratégias de Mitigación
Ransomware: Estratégias de Mitigación
 
Aprenda a migrar y transferir datos al usar la nube de AWS
Aprenda a migrar y transferir datos al usar la nube de AWSAprenda a migrar y transferir datos al usar la nube de AWS
Aprenda a migrar y transferir datos al usar la nube de AWS
 
Cómo mover a un almacenamiento de archivos administrados
Cómo mover a un almacenamiento de archivos administradosCómo mover a un almacenamiento de archivos administrados
Cómo mover a un almacenamiento de archivos administrados
 
Simplifique su BI con AWS
Simplifique su BI con AWSSimplifique su BI con AWS
Simplifique su BI con AWS
 
Simplifique o seu BI com a AWS
Simplifique o seu BI com a AWSSimplifique o seu BI com a AWS
Simplifique o seu BI com a AWS
 
Os benefícios de migrar seus workloads de Big Data para a AWS
Os benefícios de migrar seus workloads de Big Data para a AWSOs benefícios de migrar seus workloads de Big Data para a AWS
Os benefícios de migrar seus workloads de Big Data para a AWS
 
Los beneficios de migrar sus cargas de trabajo de big data a AWS
Los beneficios de migrar sus cargas de trabajo de big data a AWSLos beneficios de migrar sus cargas de trabajo de big data a AWS
Los beneficios de migrar sus cargas de trabajo de big data a AWS
 
Bases de datos NoSQL en AWS
Bases de datos NoSQL en AWSBases de datos NoSQL en AWS
Bases de datos NoSQL en AWS
 
Bancos de dados NoSQL na AWS
Bancos de dados NoSQL na AWSBancos de dados NoSQL na AWS
Bancos de dados NoSQL na AWS
 
Construyendo un data lake en la nube aws
Construyendo un data lake en la nube awsConstruyendo un data lake en la nube aws
Construyendo un data lake en la nube aws
 
Construindo um data lake na nuvem aws
Construindo um data lake na nuvem awsConstruindo um data lake na nuvem aws
Construindo um data lake na nuvem aws
 
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...
AWS Webinar Series Latinoamérica: Cómo salir de su datacenter y modernizar la...
 
Os benefícios de realizar backup na nuvem AWS
Os benefícios de realizar backup na nuvem AWSOs benefícios de realizar backup na nuvem AWS
Os benefícios de realizar backup na nuvem AWS
 

Introdução ao Amazon EKS

  • 1. © 2020, Amazon Web Services, Inc. or its Affiliates. Bruno Emer Arquiteto de Soluções, AWS Introdução ao Amazon EKS
  • 2. © 2020, Amazon Web Services, Inc. or its Affiliates. O Amazon Elastic Kubernetes Service (EKS) é um serviço de Kubernetes totalmente gerenciado. O EKS executa a mais recente versão de produção do Kubernetes e é certificado como compatível com o Kubernetes
  • 3. © 2020, Amazon Web Services, Inc. or its Affiliates. port 8080 port 8080 ReplicaSet #Pods—2 label selector: v1 ReplicaSet #Pods—1 label selector: v2 Node Docker Pod Containers Kubernetes - Conceitos
  • 4. © 2020, Amazon Web Services, Inc. or its Affiliates. Kubernetes - Conceitos
  • 5. © 2020, Amazon Web Services, Inc. or its Affiliates.
  • 6. © 2020, Amazon Web Services, Inc. or its Affiliates. kubelet
  • 7. © 2020, Amazon Web Services, Inc. or its Affiliates. kubelet kubelet kubelet kubelet Control Plane
  • 8. © 2020, Amazon Web Services, Inc. or its Affiliates. O que o EKS faz para você: • Nós realizamos o deploy do Control Plane do Kuberentes e do etcd em uma configuração altamente disponível em 3 Azs • Nós gerenciamos o control plane para você, assim como fazemos com os bancos de dados do serviço RDS • Nós provemos um plugin de rede (CNI) que integra a rede dos pods nativamente com a AWSVPC • Nós integramos/federamos o acesso de usuários atra’ves do CLI (kubectl) e API com o AWS IAM
  • 9. © 2020, Amazon Web Services, Inc. or its Affiliates. EKS é Kubernetes Certified O EKS executa o Kubernetes upstream e é certificado como compatível com o Kubernetes. Isso significa que aplicações gerenciadas pelo Amazon EKS são totalmente compatíveis com os aplicativos gerenciados por qualquer ambiente Kubernetes padrão.
  • 10. © 2020, Amazon Web Services, Inc. or its Affiliates. Amazon EKS - Arquitetura prod-cluster-123.eks.amazonaws.com EKS workers kubectl Your AWS account VPC Amazon EKS
  • 11. © 2020, Amazon Web Services, Inc. or its Affiliates. VPC Infraestrutura altamente disponíve e single tenant Todos componentes são nativos da AWS Separação do etcd para auxiliar com processos de upgrades e operação Interface provida por um NLB que habilita private endpoints na sua VPC NLB Availability Zone 1 Availability Zone 2 Availability Zone 3 Etcd API Servers EKS Control Plane Amazon EKS
  • 12. © 2020, Amazon Web Services, Inc. or its Affiliates. Rede
  • 13. © 2020, Amazon Web Services, Inc. or its Affiliates. Public == false Private == true WorkerVPC (your account) Kubectl Control PlaneVPC (AWS account) etcd AZ 1 AZ 2 API Server etcd API Server EKS-owned ENIs prod-cluster-123.eks.amazonaws.com Private hosted zone Kubelet AZ 1 Worker node Kube-proxy Kubelet AZ 2 Worker node Kube-proxy Endpoints da API do EKS privados
  • 14. © 2020, Amazon Web Services, Inc. or its Affiliates. Pod Networking com o EKS ENI Secondary IPs: 10.0.0.1 10.0.0.2 10.0.0.1 10.0.0.2 ENI 10.0.0.20 10.0.0.22 Secondary IPs: 10.0.0.20 10.0.0.22 ec2.associateaddress() VPC Subnet – 10.0.0.0/24 Instance 1 Instance 2
  • 15. © 2020, Amazon Web Services, Inc. or its Affiliates. Segurança
  • 16. © 2020, Amazon Web Services, Inc. or its Affiliates. Modelo de responsabilidade compartilhada Responsible for Security “of” the cloud Responsible for Security “in” the cloud Network and Firewall Configuration Identity & Access Management Customer Data Compute Storage Database Networking Regions Availability Zones Edge Locations Operating System Applications Platform AWSCUSTOMER
  • 17. © 2020, Amazon Web Services, Inc. or its Affiliates. IAM = Quem pode fazer o que na Plataforma e/ou no cluster? Pessoas Código / Pipelines Photo & Licence Photo & Licence
  • 18. © 2020, Amazon Web Services, Inc. or its Affiliates. E você deveria investir em automação fim-a-fim • Infraestrutura como Código • Builds de código & Containers • Segurança (DevSecOps) • Deployments (Não utilize o kubectl para realizar deploys em pod usando seu laptop!) Invista aqui para tornar os processos mais fáceis e automáticos e deixar seu time focar no que importa! Photo
  • 19. © 2020, Amazon Web Services, Inc. or its Affiliates. Porque DevSecOps implementa segurança nos pipelines de CI/CD? Se você não tornar isto rápido e fácil, as pessoas irão contornar as políticas ou restrições para fazer o serviço e entregar os prazos! Photo & Licence
  • 20. © 2020, Amazon Web Services, Inc. or its Affiliates. Ação no K8s permitida/negada EKS: Autenticação com o IAM + kubectl Autorização da identidadeAWS utilizando RBAC API do K8s ForneceAWS Identity Veririca AWS Identity kubectl AWS IAM Autenticação
  • 21. © 2020, Amazon Web Services, Inc. or its Affiliates. Nota: O usuário ou IAM role que cria o cluster irá possuir permissões de full admin no mesmo! O ideal é a utilização de um usuário ou IAM role dedicado com acesso limitado, assim como você faz com a conta root
  • 22. © 2020, Amazon Web Services, Inc. or its Affiliates. Kubernetes RBAC - Basics O Kubernetes possui Roles que são definidas e aplicadas a um único namespace (um cluster virtual) e ClusterRoles que são aplicadas a todos os namespaces do cluster. Você define roles customizadas descrevendo resources (como pods e nodes) e quais verbs (como get, update e delete) são permitidos. kind: ClusterRole metadata: name: cluster-admin rules: - apiGroups: - '*' resources: - '*' verbs: - '*' - nonResourceURLs: - '*' verbs: - '*'
  • 23. © 2020, Amazon Web Services, Inc. or its Affiliates. Kubernetes RBAC built-in ClusterRoles Default ClusterRole Description cluster-admin Allows super-user access to perform any action on any resource.When used in a ClusterRoleBinding, a ClusterRoleBinding, it gives full control over every resource in the cluster and in all namespaces. namespaces.When used in a RoleBinding, it gives full control over every resource in the rolebinding's rolebinding's namespace, including the namespace itself. admin Allows admin access, intended to be granted within a namespace using a RoleBinding. If used in used in a RoleBinding, allows read/write access to most resources in a namespace, including the the ability to create roles and rolebindings within the namespace. It does not allow write access to access to resource quota or to the namespace itself. edit Allows read/write access to most objects in a namespace. It does not allow viewing or modifying modifying roles or rolebindings. view Allows read-only access to see most objects in a namespace. It does not allow viewing roles or or rolebindings. It does not allow viewing secrets, since those are escalating
  • 24. © 2020, Amazon Web Services, Inc. or its Affiliates. Modelo de responsabilidade compartilhada Responsible for Security “of” the cloud Responsible for Security “in” the cloud Network and Firewall Configuration Identity & Access Management Customer Data Compute Storage Database Networking Regions Availability Zones Edge Locations Operating System Applications Platform AWSCUSTOMER
  • 25. © 2020, Amazon Web Services, Inc. or its Affiliates. Logging e Auditoria do Control Plane Logging do control plane, especialmente com a finalidade de trilha de auditoria das ações naAPI, é um aspecto important da segurança. Quanto utilizando o EKS você pode (e deve) habilitar o logging para o CloudWatch Logs.
  • 26. © 2020, Amazon Web Services, Inc. or its Affiliates. Modelo de responsabilidade compartilhada Responsible for Security “of” the cloud Responsible for Security “in” the cloud Network and Firewall Configuration Identity & Access Management Customer Data Compute Storage Database Networking Regions Availability Zones Edge Locations Operating System Applications Platform AWSCUSTOMER
  • 27. © 2020, Amazon Web Services, Inc. or its Affiliates. Instalando um Network Policy Provider no Kubernetes Regras de firewall no Kubernetes são controladas através de NetworkPolicies. Você precisa primeiro adicionar um Network Policy Provider ao EKS / Kubernetes para poder utilizar Network Policies. O Calico é um Network Policy Provider coberto em nossa documentação. https://docs.aws.amazon.com/eks/latest/userguide/calico.html
  • 28. © 2020, Amazon Web Services, Inc. or its Affiliates. Security Group por POD https://docs.aws.amazon.com/eks/latest/userguide/security-groups-for-pods.html
  • 29. © 2020, Amazon Web Services, Inc. or its Affiliates. Modelo de responsabilidade compartilhada Responsible for Security “of” the cloud Responsible for Security “in” the cloud Network and Firewall Configuration Identity & Access Management Customer Data Compute Storage Database Networking Regions Availability Zones Edge Locations Operating System Applications Platform AWSCUSTOMER
  • 30. © 2020, Amazon Web Services, Inc. or its Affiliates. Modo EC2 – Responsabilidades dos clientes • Tipo de instância e quantidade? • Qual é a proporção de CPU e RAM? • Capacidade adicional para escalabilidade e disponibilidade? • Qual SO escolher? • Se for Amazon Linux, nós provemos as AMIs • Hardening do SO (ex.: CIS benchmark) • Patching do SO, Docker, kubelet etc. Photo & Licence
  • 31. © 2020, Amazon Web Services, Inc. or its Affiliates. Modelo de responsabilidade compartilhada - Fargate Responsible for Security “of” the cloud Responsible for Security “in” the cloud Network and Firewall Configuration Identity & Access Management Customer Data Compute Storage Database Networking Regions Availability Zones Edge Locations Operating System Applications Platform AWSCUSTOMER
  • 32. © 2020, Amazon Web Services, Inc. or its Affiliates. Atualizando o EKS • O Kubernetes tem uma nova versão major todo trimetre • O Kubernetes tem novas versões minor frequentemente • Algumas vezes essas atualização são relacionadas a segurança • O EKS possui APIs para iniciar o processo de update do control plane • Você então precisa atualizar os worker nodes: • Geralmente os worker nodes estão em auto-scaling groups, o que significa atualizar as AMIs • Nós provemosAMIs para os worker nodes do EKS regularmente, além dos scripts necessários para atualização de suas próprias AMIs
  • 33. © 2020, Amazon Web Services, Inc. or its Affiliates. Monitoramento
  • 34. © 2020, Amazon Web Services, Inc. or its Affiliates. Duas formas para a coleta e monitoramento das métricas em seu cluster Você pode utilizar o CloudWatch Container Insights Para agregar, alertar e visualizer métricas no mesmo lugar onde você visualzar todas as outras métricas dos serviços da AWS. Você pode utilizar o Prometheus para agregar / alertar sobre seu Cluster, Nodes e métricas dos Pods e o Grafana para visualizar estas métricas em Dashboards.
  • 35. © 2020, Amazon Web Services, Inc. or its Affiliates. Duas formas para coletar e monitorar logs em seu cluster Você pode também utilizar o fluentd para enviar logs para o CloudWatch Logs. Isto pode atender as suas necessiadades, mas caso queira, você também pode enviar os logs para outros serviços. Um padrão comum, utilizando ferramenta open source é coletar logs com o fluentd e enviar os mesmos para o Elasticsearch onde você pode visualizá-las com o Kibana – um stack conhecido como EFK. Enquanto voce pode executar estes components por si só, nós recomendamos a utilização de serviços gerenciados como o Amazon ElasticSearch que também inclui o Kibana. Amazon Elasticsearch Service Amazon CloudWatch
  • 36. © 2020, Amazon Web Services, Inc. or its Affiliates. Multiplos NodePools /Tipos de instâncias (ex. misturando GPU, Spot eWindows)
  • 37. © 2020, Amazon Web Services, Inc. or its Affiliates. Você pode utilizar intâncias com GPU no EKS A AWS tem múltiplos tipos de instâncias que oferecem GPUs, como as insâncias da família p3. Estes tipos de instâncias são usadas para coisas como Machine Learning e necessidades de computação intense que se beneficiam de paralelismo massivo. É possível executar este tipo de instância em um NodeGroup separado e utilizar taints e tolerations para garantir que apenas workloads que precisem de GPU serão executados nestas instâncias.
  • 38. © 2020, Amazon Web Services, Inc. or its Affiliates. Você pode utilizar instâncias Spot com o EKS AWS oferece instâncias que não estão em uso no momento com descontos de até 90%. É possível possuir clusters sendo executados totalmente com instâncias Spot ou clusters mistos com instâncias Spot e Sob Demanda para atender as suas necessidades.
  • 39. © 2020, Amazon Web Services, Inc. or its Affiliates. Obrigado

Notas do Editor

  1. For those of you not too familiar with Kubernetes, let’s start with a quick overview of some core concepts. Pods - Co-located group of containers that share an IP, namespace, storage volume Replica Sets - Manages the lifecycle of pods and ensures specified number are running Services - Single, stable name for a set of pods, also acts as LB Labels - Used to organize and select group of objects
  2. Start with the basics of how Docker works. You have a Docker Daemon that pulls container images from a Registry and starts them turning them into running Containers. It then manages their lifecycle. You can control that process with the docker client or with an API.
  3. With Kubernetes this is exactly the same thing except: that instead of you running docker run commands yourself with the CLI the Kubernetes kubelet that runs on each machine does it on your behalf. The ECS version of the kublet is called the ECS Agent but it is much the same idea.
  4. kubelets are, told what to do by the Kubernetes control plane Kublets as pushes information about what is happening on each node back up to the control plane help to with its scheduling decisions. As you grow to many worker nodes an orchestrator like Kubernetes doing this for you becomes more and more essential.
  5. You can run Kubernetes yourself via virtual machines on our EC2 so what does EKS do for you over doing it yourself? (CLICK) We deploy the Kubernetes Control Plane and etcd in a highly-available configuration across 3 AZs (CLICK) And we manage that control plane for you in a similar way to our managed relational database service RDS (CLICK) We provide, and actually require that you use, a network (CNI) plugin we’ve opensourced that integrates Pod networking natively with AWS VPC (CLICK) And we integrate/federate user access to the Kubernetes CLI (kubectl) and API with AWS IAM via our aws-iam-authenticator plugin
  6. Things to mention: Amazon EKS runs upstream Kubernetes and is certified Kubernetes conformant, Applications managed by Amazon EKS are fully compatible with applications managed by any standard Kubernetes environment. 
  7. Things to mention: At a high level, the EKS architecture includes worker nodes in the form of EC2 Instances and a managed EKS control plane to provide capacity to run your Pods.
  8. Going a bit deeper, the control plane is made up of at least five EC2 instances we run dedicated for you and this cluster in our account. There are at least two API server instances in different Availability Zones and a quorum of three Etcd instances across three AZs. This means that every customer, and every cluster, is on its own single-tenant HA infrastructure. It is also why we charge for the control plane as we incur this five EC2 instance cost for each one you spin up.
  9. The first network consideration to be aware of with EKS is whether the control plane API endpoints, used by kubectl as well by your worker nodes to communicate with the control plane, are public or private.   EKS launched with this as being public-only but has since made this granular so you can have them be only-public, only-private or both public and private. In most situations I’d suggest making them only-private. We recently launched a capability, so that when only the private endpoint is enabled, Amazon EKS automatically advertises the private IP addresses of the private endpoint from the public endpoint. This means that you can easily connect to your EKS cluster over a peered VPC or over a Direct Connect.
  10. With EKS we require you to use our network, or CNI, plugin. This plugin turns everything back into normal ENIs and IPs within your AWS VPC network.   Under this model Pods each get their own additional ‘real’ VPC IP off an Elastic Network Interface or ENI. This means that EKS can have a high density of Pods to network interfaces and instances but that you can’t count fully leverage Security Groups bound to ENIs for network segregation - as two unrelated Pods can be using the same ENI and therefore security group. What happens is that when a pod is scheduled (CLICK) Our CNI plugin will go and get an additional IP, assign it to an ENI, and then (CLICK) Map that pod to that IP and network interface. (CLICK)
  11. The first item we’ll look at is Identity and Access Management.
  12. When we talk about Identity and Access Management it is about controlling who can do what in the platform and the container cluster. Usually there are two cases here – controlling what people can do and controlling what code or automated pipelines can do.
  13. Speaking of Automated Pipelines – you really should automate everything - for security reasons in addition to the usual operational ones. This includes: The underlying AWS account and its VPC network Your Code & Container Builds Which should embed security tests in addition to your unit and integration tests as a required step before, finally, Your deployments The goal here is to make it as fast and as easy as possible for your team to do the right thing!
  14. The reason why DevSecOps has taken off is that embedding security into your pipelines and processes, and making it as fast and easy as possible, makes it much more likely that it’ll happen and people won’t just go around it to get their work done and meet their deadlines!
  15. With EKS, and its required AWS IAM Authenticator, you sign into the cluster with an AWS IAM Identity – either an IAM User or IAM Role. But Kubernetes decides what they can do there via its RBAC.   The way that this process works is: (CLICK) 1) When a Kubectl call is made - let’s say I’ve made a get pods call, my IAM identity is passed along with the Kubernetes call by our IAM Authenticator plugin. It looks in the default credential chain for my IAM ID - config file in the .aws folder, IAM role assigned to instance, etc. (CLICK) 2) On the backend, Kubernetes verifies the IAM identity with AWS IAM. This is purely for authentication. (CLICK) 3) The auth response is sent back to Kubernetes, and K8s checks its internal RBAC mapping for this now authenticated principal. This determines if my original get pods call was allowed or denied. (CLICK) 4) The K8s API approves or denies the request and returns the results to me. (CLICK)
  16. I won’t go into exhaustive detail about Kubernetes RBAC as it is pretty well described in their documentation, and in the training for their Certified Kubernetes Administrator certification. But I’ll touch on some of the basics.   Kubernetes has Roles which are defined within and apply to a single namespace – which are the logical separation within Kubernetes similar to what accounts are within AWS. It also has ClusterRoles which apply cluster-wide across all namespaces.   With both you define rules describing resources, and the verbs that area allowed against them, by principals that are logged in as that Role.
  17. Kubernetes has a few built-in Roles that you can use to assign a least privilege to people or pipelines to complete their work. These are a bit blunt and often customers use them as inspiration to make their own more granular ones.
  18. Next we’ll talk about the platform services and settings required to be secure in the cloud with your containers.
  19. Having an audit trail of what happens – who did what when – is an important element of security and being able to successfully investigate any breaches of it. When creating an EKS cluster either via the console or via eksctl logging this to CloudWatch Logs defaults to disabled and you need to ask for it via turning it on or passing an additional parameter – you should definitely do that.  
  20. Next we’ll talk about the network and firewall configurations for ECS and EKS.
  21. The first step in using Network Policies, which is Kubernetes’ built-in network firewall functionality, is installing a Network Policy Provider. A common choice is Calico’s – and this is the one we explain how to install and use in our EKS documentation.
  22. So how do Network Polices on Kubernetes work?   Here is an example of 3 microservices that can all talk to each other. If I want to create segmentation boundary between these microservices, I can apply default-deny rule in the NetworkPolicy and apply to this namespace.
  23. Now none of them can communicate with each other or be reached from the Internet.
  24. If I want to expose only my frontend microservice to the Internet, I can do so with this example NetworkPolicy allowing 0.0.0.0 to talk to it as an Ingress rule.
  25. And now I have my Frontend open to the Internet once again.
  26. If I wanted to then allow the Frontend service to talk to the Cats service I can add this ingress rule which uses a PodSelector matching pods with the label “frontend” instead of on an IP subnet as before.
  27. There is another option in this space which is a paid commercial one. Tigera is the company behind Calico and they have a more advanced Enterprise version of the Network Policy Provider with more features.   The main ones are that it can enable automatic and seamless host-to-host encryption, it can provide flow logs enriched with the kubernetes context (ours would just list IPs without that) and it allows for integration with AWS Security Groups similar to ECS.
  28. This is useful to have rules to say that only these Pods can connect to this Cache or Database and others, which might even be on the same ENI, can’t.
  29. Your Amazon EKS cluster must be running Kubernetes version 1.17 and Amazon EKS platform version eks.3 or later. You can't use security groups for pods on Kubernetes clusters that you deployed to Amazon EC2. Traffic flow to and from pods with associated security groups are not subjected to Calico network policy enforcement and are limited to Amazon EC2 security group enforcement only. Community effort is underway to remove this limitation. Security groups for pods can't be used with pods deployed to Fargate. Security groups for pods can't be used with Windows nodes. Security groups for pods are supported by most Nitro-based Amazon EC2 instance families, including the m5, c5, r5, p3, m6g, cg6, and r6g instance families. The t3 instance family is not supported. For a complete list of supported instances, see Amazon EC2 supported instances and branch network interfaces. Your nodes must be one of the supported instance types. Source NAT is disabled for outbound traffic from pods with assigned security groups so that outbound security group rules are applied. To access the internet, pods with assigned security groups must be launched on nodes that are deployed in a private subnet configured with a NAT gateway or instance. Pods with assigned security groups deployed to public subnets are not able to access the internet. If you're using custom networking and security groups for pods together, the security group specified by security groups for pods is used instead of the security group specified in the ENIconfig.
  30. Next we’ll talk a bit about customer’s responsibilities around the Instances to run the containers. This covers not just management of the Instances within the platform but also everything at the Operating System level and up.
  31. Your Amazon EKS cluster must be running Kubernetes version 1.17 and Amazon EKS platform version eks.3 or later. You can't use security groups for pods on Kubernetes clusters that you deployed to Amazon EC2. Traffic flow to and from pods with associated security groups are not subjected to Calico network policy enforcement and are limited to Amazon EC2 security group enforcement only. Community effort is underway to remove this limitation. Security groups for pods can't be used with pods deployed to Fargate. Security groups for pods can't be used with Windows nodes. Security groups for pods are supported by most Nitro-based Amazon EC2 instance families, including the m5, c5, r5, p3, m6g, cg6, and r6g instance families. The t3 instance family is not supported. For a complete list of supported instances, see Amazon EC2 supported instances and branch network interfaces. Your nodes must be one of the supported instance types. Source NAT is disabled for outbound traffic from pods with assigned security groups so that outbound security group rules are applied. To access the internet, pods with assigned security groups must be launched on nodes that are deployed in a private subnet configured with a NAT gateway or instance. Pods with assigned security groups deployed to public subnets are not able to access the internet. If you're using custom networking and security groups for pods together, the security group specified by security groups for pods is used instead of the security group specified in the ENIconfig.
  32. Eliminates the need for customers to create or manage EC2 instances for their Amazon EKS clusters Customers no longer have to worry about patching, scaling, or securing a cluster of EC2 instances to run Kubernetes applications in the cloud.
  33. When we talk about patching, there is more to know when it comes to EKS. Kubernetes has a new major version every quarter and minor versions more often than that. Given that some of these minor versions contain critical security patches you need to be able to safely and seamlessly update both the control plane and its worker nodes at a moments notice.   EKS has an API to trigger an update to the control plane which is what you do first. You then need to update the worker nodes. Sometimes you may need to update the worker nodes just to patch their OS rather than to update Kubernetes as well.   Since these workers are usually in an Autoscaling group that means updating them via rolling out new instances from a new Launch Configuration and AMI. We provide both AMIs as well as instructions for how to build them and update them in our documentation.   It is very important that you learn how to do this and do it regularly to get the process down pat.
  34. Out of the box EKS doesn’t have a default setup for collecting, aggregating, alerting on or visualizing your metrics. There are two common patterns I am seeing that customers add to their cluster to get this functionality. The first is to leverage the tools that are part of the CNCF ecosystem, Prometheus and Grafana, to do this. This usually means running those on top of your cluster yourself. We cover how to set them up as part of our eksworkshop – which is worth checking out as it helps you to add the usual things you’ll need to make your cluster production-ready like this. Alternatively, we recently launched CloudWatch Container Insights so we can do this all for you as a managed service within CloudWatch – which if you do other things on the AWS platform is where all those other metrics will be.
  35. Of course there are many commercial SaaS vendors that can help you with your metrics. Here are just a few that work well with AWS and EKS.
  36. Of course there are many commercial SaaS vendors that can help you with your logs. Here are just a few that work well with AWS and EKS.
  37. - The Amazon EKS-optimized AMI with GPU support 
  38. Kubernetes version 1.14 or later