SlideShare ist ein Scribd-Unternehmen logo
1 von 31
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Nishi Davidson, Product Management, Amazon EKS
Dan Wilson, Principal Development Architect, SAP Concur
March 2018
Running Kubernetes on AWS
Managing workloads on-prem vs Amazon EKS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
63%
of Kubernetes workloads run
on AWS today
— CNCF survey
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Cloud agnostic design: Common design in AWS and on-prem in your data center.
• Self-healing hence Stable: Applications once created, are kept alive even if they failure.
• Standardized hence Consistent: Inconsistencies isolated in the container while rest of the infrastructure tools
are standardized.
• Flexible hence Fast: Containerized applications can be deployed in seconds on any hardware.
• Integrated with monitoring/logging/alerting: Frees engineering to innovate on application logic.
• Scalable: Design scales easily to 10s of 1000s of machines.
Why k8s helps your environment?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes @ SAP Concur
So how have some AWS customers
adopted Kubernetes in production?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Polyglot – golang, javascript, java, .net, etc.
• Mostly private data centers, some AWS
• Global – US, Europe, Japan, China, etc.
• Public Sector, Enterprise & Consumer Apps
• Started w/ production clusters on k8s v1.1
• Need k8s multi-cluster day 1 for HA & blue/green cluster upgrades
k8s @ SAP Concur – on-prem and in AWS Cloud
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
K8s Cluster
Master
Mastermaster
CoreOS
Master
Masteretcd
CoreOS
worker1
CoreOS
worker2
CoreOS
workerN
CoreOS
flannel
newRelic & prometheus
Logstash forwarder
svc
ELK
Monitoring
Load Balancers
API
svc svc
svc
k8s @ SAP Concur – v1 multi-cluster
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – v1 multi-cluster
K8s 1P
LBaaS
API
Load Balancers
K8s 2 K8s 3
pool
VIP
P P
deployment
service
deployment
service
deployment
service
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
N clusters
CI
k8s @ SAP Concur
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Skipper
Kubernetes Deployment API
Curlable API to deploy microservice apps
to multiple k8s clusters
Open Source - Apache 2.0
https://github.com/concur/skipper
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
deployment API
CI
Deploy petshop:v1
to prod
US14a, b & c
EMEA14a, b & c
APAC14a, b & c
K8s API calls for service,
deployment, etc.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
K8s 1
Ingress Controller
DNS
replicas sets & pods
Service
Ingress
internal
k8s @ SAP Concur – v2 clusters
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur - auth
K8s 1
Clients/Skipper
Token per namespace and jurisdiction
K8s 2 K8s 3
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur - oauth2 w/ dex
K8s 1
Clients/Skipper
Token per namespace and cluster
token 1 token 2 token 3
K8s 2 K8s 3
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – dns & routing
K8s 1Ingress Controller
DNS
replicas sets & pods
Service 1 & 2
Ingress
K8s 1
Ingress Controller
replicas sets & pods
Service 2 only
Ingress
?
Cluster 1 Cluster 2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – dns & routing
K8s 1
Ingress Controller
DNS
replicas sets & pods
Service 1 & 2
Ingress
K8s 1
Ingress Controller
replicas sets & pods
Service 2 only
Ingress
CNAME service1.domain.com
Cluster1.domain.com
CNAME service2.domain.com
Cluster1-2.domain.com
Cluster 1 Cluster 2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – dns & routing - redis
K8s 1
Ingress Controller
DNS
replicas sets & pods
redis1
Ingress
CNAME redis1.domain.com -> Cluster1.domain.com
CNAME redis2.domain.com -> Cluster2.domain.com
CNAME redis3.domain.com -> Cluster3.domain.com
Cluster 1
K8s 1
Ingress Controller
replicas sets & pods
redis2
Ingress
Cluster 2
K8s 1
Ingress Controller
replicas sets & pods
redis3
Ingress
Cluster 3
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – upgrades
Location US EUROPE
Zone A B C A B C
Cluster v.1.7 us17a us17b us17c eur17a eur17b eur17c
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8s @ SAP Concur – upgrades
Location US EUROPE
Zone A B C A B C
Cluster v.1.7 us17a us17b us17c eur17a eur17b eur17c
Cluster v.1.8 us18a us18b us18c eur18a eur18b eur18c
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
In place upgrades
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
k8S @ SAP Concur – monitoring and logging
• Add monitors for etcd and ingress
• Tune Prometheus
• monitor cluster capacity from the perspective of allocated resources instead of actual
resource usage
• configure alertmanager to route alerts appropriately
• tuning of some alert thresholds to get rid of the noise
• just added a monitor for error rate of kube2cnqrf5
• Many custom overrides on top of the 3rd party Prometheus operator
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How will AWS make k8s adoption
easier?
Intro to Amazon EKS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo – basic flow
Subnet
EKS
Master
EKS Node
Group 2
EKS Node
Group 1
aws clikubectl
Pre-requisites:
• Configure VPC and
EKSServiceRole
• Configure kubectl and
awscli
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IAM ROLE User
X
IAM ROLE
Service Account Y
kubectl → K8s APIs → CRUD Operations on K8s
aws-cli → EKS Service APIs → CRUD Operations on Infra
K8s Master Nodes
K8s Master Nodes
K8s Master Nodes
API Server
Controller Mgr
kubelet
etcd
Cloud Controller Mgr.
Scheduler
Authentication
Webhook Tokens
Authorization
RBAC Mode
Admission Control
NamespaceLifecyle,LimitRanger
ServiceAccount,DefaultStorageClass,Reso
urceQuota
Amazon EKS – access and auth
AWS STS
client side
Heptio-aws-authenticator
server side
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
172.16.0.0/16
User X
Service
Account Y
Kubectl
K8s Node 2K8s Node 1
kubelet
kube-proxy
kubelet
kube-proxy
VPC Subnet per AZ
172.16.0.1/24
ENI ENIPrimary Private IP:
172.16.1.118
Secondary IPs:
172.16.1.147, 172.16.1.224….
Service: Front end
POD 2 POD 3
eth0
Service: Back end
POD 1 POD 4
eth0
ec2.associateaddress()
L3 RouteTable
veth0 Bveth0 A
eth0
172.16.1.147/32
eth0
172.16.1.224/32
CNI
K8s Master NodesK8s Master NodesK8s Master Nodes
API Server
Controller Manager
kubelet
etcd
Scheduler
kube-proxy
Cloud Controller Mgr.
Amazon EKS – networking with CNI plugin
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EKS – networking with CNI plugin
1. Simplify networking options for customers
2. Support high throughput, high availability, low latency and minimal jitter.
3. Allow customers to reuse AWS VPC networking and security best practices such as use of:
• VPC flow logs for troubleshooting and compliance auditing,
• VPC routing polices for traffic engineering,
• Security groups for isolation and regulatory requirements
4. Setup Pod networking within seconds.
5. Support cluster scale to a min. of 5000+ (K8s scale).
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
S T A G E
S E P A R A T I O N
“ T E N A N T ”
S E P A R A T I O N
F I N E - G R A I N E D
F I R E W A L L S
C O M P L I A N C E
E.g., typically use namespaces
for different teams within
a company—but without
network policy, they are
not network isolated
Reduce attack surface within
microservice-based applications
Isolate dev, test, and prod E.g., PCI, HIPAA
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
172.16.0.0/16
User X
Service
Account Y
K8s Node 2K8s Node 1
kubelet
kube-proxy
kubelet
kube-proxy
VPC Subnet per AZ - 172.16.0.1/24
ENI ENI
Service: Front end
POD 2 POD 3
Service: Back end
POD 1 POD 4
CNI
K8s Master NodesK8s Master NodesK8s Master Nodes
API Server
Controller Manager
kubelet
etcd
Scheduler
kube-proxy
Cloud Controller Mgr.
Amazon EKS – dns, services and elb
DNS
kubedns
dnsmasq
healthz
DNS Service – Static IP
POD 2 POD 2
kind: Service
type: LoadBalancer
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EKS – monitoring and logging
• Cluster-wide Cloudwatch metrics and Cloudtrail logs for Control plane – EKS GA
• Cloudwatch metrics and Cloudtrail logs for Node groups – EKS Roadmap
Infra. metrics agents.– collectd,
cloudwatch
Logs Sink – ElasticSearch,
Cloudwatch, Cloudtrail
Log Text / Graphs –
Cloudwatch, Kibana
Metrics Sink – Prometheus,
InfluxDB, Graphite, Cloudwatch
Infra. log agents or exporters –
cloudwatch, fluentd, logstash
Metric Graphs – Grafana,
Cloudwatch
• Application container metrics / logs – Customer configured
K8sOptions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EKS – cluster management
• Control Plane high-availability and scale
• Control Plane auto-upgrades with version testing
• In-built Cluster DNS and Service Discovery
• Cluster-wide metrics and logs for control plane
• AWS AMIs bundled with necessary tools
• Packer scripts to run K8s with distros of your choice on AWS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Node Group
management
Master Auto-scale
Fargate for EKS
Add-Ons: UI, Helm,
Plugins, Brokers….
Amazon EKS – key roadmap and open source elements
Roadmap Items
Open Source @ AWS • Heptio aws-authenticator • CNI Plugin
https://github.com/heptiolabs/k
ubernetes-aws-authenticator
https://github.com/aws/amazon-vpc-cni-
k8s/blob/master/proposals/cni-
proposal.md
Privatelink
support
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you
d-nishi on github, dnishi@amazon.com k8s slack & gmail
danwilson on github, k8s slack & gmail, https://github.com/concur/skipper

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel AvivFinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
 
An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - Webinar
 
Azure Hybid
Azure HybidAzure Hybid
Azure Hybid
 
Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
 
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
Well-Architected Bootcamp
Well-Architected BootcampWell-Architected Bootcamp
Well-Architected Bootcamp
 
Setting up a Cloud Center of Excellence (CCoE) for Enterprise Customers
Setting up a Cloud Center of Excellence (CCoE) for Enterprise CustomersSetting up a Cloud Center of Excellence (CCoE) for Enterprise Customers
Setting up a Cloud Center of Excellence (CCoE) for Enterprise Customers
 
A Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence AdoptionA Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence Adoption
 
Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4
 
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
Introduction to the Well-Architected Framework and Tool - SVC208 - Anaheim AW...
 
Protecting Your Data With AWS KMS and AWS CloudHSM
Protecting Your Data With AWS KMS and AWS CloudHSM Protecting Your Data With AWS KMS and AWS CloudHSM
Protecting Your Data With AWS KMS and AWS CloudHSM
 
A Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence AdoptionA Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence Adoption
 
AWS Cloud Migration Insights Forum
AWS Cloud Migration Insights ForumAWS Cloud Migration Insights Forum
AWS Cloud Migration Insights Forum
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & Fargate
 

Ähnlich wie Running Kubernetes with Amazon EKS - AWS Online Tech Talks

Ähnlich wie Running Kubernetes with Amazon EKS - AWS Online Tech Talks (20)

Run Kubernetes with Amazon EKS - SRV318 - Chicago AWS Summit
Run Kubernetes with Amazon EKS - SRV318 - Chicago AWS SummitRun Kubernetes with Amazon EKS - SRV318 - Chicago AWS Summit
Run Kubernetes with Amazon EKS - SRV318 - Chicago AWS Summit
 
Expert Tips for Successful Kubernetes Deployments on AWS
Expert Tips for Successful Kubernetes Deployments on AWSExpert Tips for Successful Kubernetes Deployments on AWS
Expert Tips for Successful Kubernetes Deployments on AWS
 
EKS Workshop
 EKS Workshop EKS Workshop
EKS Workshop
 
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
 
Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018
Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018
Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018
 
Expert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWSExpert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWS
 
SRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKSSRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKS
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
 
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
 
Builders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWSBuilders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWS
 
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo SummitExecutando Kubernetes com Amazon EKS -  DEV303 - Sao Paulo Summit
Executando Kubernetes com Amazon EKS - DEV303 - Sao Paulo Summit
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
 
Running Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech TalksRunning Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech Talks
 
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
 
Running Kubernetes on AWS.pdf
Running Kubernetes on AWS.pdfRunning Kubernetes on AWS.pdf
Running Kubernetes on AWS.pdf
 
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
 
게임 고객사를 위한 ‘AWS 컨테이너 교육’ 자료 - 유재석 솔루션즈 아키텍트, AWS :: Gaming Immersion Day 201...
게임 고객사를 위한 ‘AWS 컨테이너 교육’ 자료 -  유재석 솔루션즈 아키텍트, AWS :: Gaming Immersion Day 201...게임 고객사를 위한 ‘AWS 컨테이너 교육’ 자료 -  유재석 솔루션즈 아키텍트, AWS :: Gaming Immersion Day 201...
게임 고객사를 위한 ‘AWS 컨테이너 교육’ 자료 - 유재석 솔루션즈 아키텍트, AWS :: Gaming Immersion Day 201...
 
Microservices for Startups
Microservices for StartupsMicroservices for Startups
Microservices for Startups
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Running Kubernetes with Amazon EKS - AWS Online Tech Talks

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Nishi Davidson, Product Management, Amazon EKS Dan Wilson, Principal Development Architect, SAP Concur March 2018 Running Kubernetes on AWS Managing workloads on-prem vs Amazon EKS
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 63% of Kubernetes workloads run on AWS today — CNCF survey
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Cloud agnostic design: Common design in AWS and on-prem in your data center. • Self-healing hence Stable: Applications once created, are kept alive even if they failure. • Standardized hence Consistent: Inconsistencies isolated in the container while rest of the infrastructure tools are standardized. • Flexible hence Fast: Containerized applications can be deployed in seconds on any hardware. • Integrated with monitoring/logging/alerting: Frees engineering to innovate on application logic. • Scalable: Design scales easily to 10s of 1000s of machines. Why k8s helps your environment?
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes @ SAP Concur So how have some AWS customers adopted Kubernetes in production?
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Polyglot – golang, javascript, java, .net, etc. • Mostly private data centers, some AWS • Global – US, Europe, Japan, China, etc. • Public Sector, Enterprise & Consumer Apps • Started w/ production clusters on k8s v1.1 • Need k8s multi-cluster day 1 for HA & blue/green cluster upgrades k8s @ SAP Concur – on-prem and in AWS Cloud
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. K8s Cluster Master Mastermaster CoreOS Master Masteretcd CoreOS worker1 CoreOS worker2 CoreOS workerN CoreOS flannel newRelic & prometheus Logstash forwarder svc ELK Monitoring Load Balancers API svc svc svc k8s @ SAP Concur – v1 multi-cluster
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – v1 multi-cluster K8s 1P LBaaS API Load Balancers K8s 2 K8s 3 pool VIP P P deployment service deployment service deployment service
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. N clusters CI k8s @ SAP Concur
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Skipper Kubernetes Deployment API Curlable API to deploy microservice apps to multiple k8s clusters Open Source - Apache 2.0 https://github.com/concur/skipper
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. deployment API CI Deploy petshop:v1 to prod US14a, b & c EMEA14a, b & c APAC14a, b & c K8s API calls for service, deployment, etc.
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. K8s 1 Ingress Controller DNS replicas sets & pods Service Ingress internal k8s @ SAP Concur – v2 clusters
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur - auth K8s 1 Clients/Skipper Token per namespace and jurisdiction K8s 2 K8s 3
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur - oauth2 w/ dex K8s 1 Clients/Skipper Token per namespace and cluster token 1 token 2 token 3 K8s 2 K8s 3
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – dns & routing K8s 1Ingress Controller DNS replicas sets & pods Service 1 & 2 Ingress K8s 1 Ingress Controller replicas sets & pods Service 2 only Ingress ? Cluster 1 Cluster 2
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – dns & routing K8s 1 Ingress Controller DNS replicas sets & pods Service 1 & 2 Ingress K8s 1 Ingress Controller replicas sets & pods Service 2 only Ingress CNAME service1.domain.com Cluster1.domain.com CNAME service2.domain.com Cluster1-2.domain.com Cluster 1 Cluster 2
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – dns & routing - redis K8s 1 Ingress Controller DNS replicas sets & pods redis1 Ingress CNAME redis1.domain.com -> Cluster1.domain.com CNAME redis2.domain.com -> Cluster2.domain.com CNAME redis3.domain.com -> Cluster3.domain.com Cluster 1 K8s 1 Ingress Controller replicas sets & pods redis2 Ingress Cluster 2 K8s 1 Ingress Controller replicas sets & pods redis3 Ingress Cluster 3
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – upgrades Location US EUROPE Zone A B C A B C Cluster v.1.7 us17a us17b us17c eur17a eur17b eur17c
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8s @ SAP Concur – upgrades Location US EUROPE Zone A B C A B C Cluster v.1.7 us17a us17b us17c eur17a eur17b eur17c Cluster v.1.8 us18a us18b us18c eur18a eur18b eur18c
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. In place upgrades
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. k8S @ SAP Concur – monitoring and logging • Add monitors for etcd and ingress • Tune Prometheus • monitor cluster capacity from the perspective of allocated resources instead of actual resource usage • configure alertmanager to route alerts appropriately • tuning of some alert thresholds to get rid of the noise • just added a monitor for error rate of kube2cnqrf5 • Many custom overrides on top of the 3rd party Prometheus operator
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How will AWS make k8s adoption easier? Intro to Amazon EKS
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo – basic flow Subnet EKS Master EKS Node Group 2 EKS Node Group 1 aws clikubectl Pre-requisites: • Configure VPC and EKSServiceRole • Configure kubectl and awscli
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. IAM ROLE User X IAM ROLE Service Account Y kubectl → K8s APIs → CRUD Operations on K8s aws-cli → EKS Service APIs → CRUD Operations on Infra K8s Master Nodes K8s Master Nodes K8s Master Nodes API Server Controller Mgr kubelet etcd Cloud Controller Mgr. Scheduler Authentication Webhook Tokens Authorization RBAC Mode Admission Control NamespaceLifecyle,LimitRanger ServiceAccount,DefaultStorageClass,Reso urceQuota Amazon EKS – access and auth AWS STS client side Heptio-aws-authenticator server side
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 172.16.0.0/16 User X Service Account Y Kubectl K8s Node 2K8s Node 1 kubelet kube-proxy kubelet kube-proxy VPC Subnet per AZ 172.16.0.1/24 ENI ENIPrimary Private IP: 172.16.1.118 Secondary IPs: 172.16.1.147, 172.16.1.224…. Service: Front end POD 2 POD 3 eth0 Service: Back end POD 1 POD 4 eth0 ec2.associateaddress() L3 RouteTable veth0 Bveth0 A eth0 172.16.1.147/32 eth0 172.16.1.224/32 CNI K8s Master NodesK8s Master NodesK8s Master Nodes API Server Controller Manager kubelet etcd Scheduler kube-proxy Cloud Controller Mgr. Amazon EKS – networking with CNI plugin
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon EKS – networking with CNI plugin 1. Simplify networking options for customers 2. Support high throughput, high availability, low latency and minimal jitter. 3. Allow customers to reuse AWS VPC networking and security best practices such as use of: • VPC flow logs for troubleshooting and compliance auditing, • VPC routing polices for traffic engineering, • Security groups for isolation and regulatory requirements 4. Setup Pod networking within seconds. 5. Support cluster scale to a min. of 5000+ (K8s scale).
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. S T A G E S E P A R A T I O N “ T E N A N T ” S E P A R A T I O N F I N E - G R A I N E D F I R E W A L L S C O M P L I A N C E E.g., typically use namespaces for different teams within a company—but without network policy, they are not network isolated Reduce attack surface within microservice-based applications Isolate dev, test, and prod E.g., PCI, HIPAA
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 172.16.0.0/16 User X Service Account Y K8s Node 2K8s Node 1 kubelet kube-proxy kubelet kube-proxy VPC Subnet per AZ - 172.16.0.1/24 ENI ENI Service: Front end POD 2 POD 3 Service: Back end POD 1 POD 4 CNI K8s Master NodesK8s Master NodesK8s Master Nodes API Server Controller Manager kubelet etcd Scheduler kube-proxy Cloud Controller Mgr. Amazon EKS – dns, services and elb DNS kubedns dnsmasq healthz DNS Service – Static IP POD 2 POD 2 kind: Service type: LoadBalancer
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon EKS – monitoring and logging • Cluster-wide Cloudwatch metrics and Cloudtrail logs for Control plane – EKS GA • Cloudwatch metrics and Cloudtrail logs for Node groups – EKS Roadmap Infra. metrics agents.– collectd, cloudwatch Logs Sink – ElasticSearch, Cloudwatch, Cloudtrail Log Text / Graphs – Cloudwatch, Kibana Metrics Sink – Prometheus, InfluxDB, Graphite, Cloudwatch Infra. log agents or exporters – cloudwatch, fluentd, logstash Metric Graphs – Grafana, Cloudwatch • Application container metrics / logs – Customer configured K8sOptions
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon EKS – cluster management • Control Plane high-availability and scale • Control Plane auto-upgrades with version testing • In-built Cluster DNS and Service Discovery • Cluster-wide metrics and logs for control plane • AWS AMIs bundled with necessary tools • Packer scripts to run K8s with distros of your choice on AWS
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Node Group management Master Auto-scale Fargate for EKS Add-Ons: UI, Helm, Plugins, Brokers…. Amazon EKS – key roadmap and open source elements Roadmap Items Open Source @ AWS • Heptio aws-authenticator • CNI Plugin https://github.com/heptiolabs/k ubernetes-aws-authenticator https://github.com/aws/amazon-vpc-cni- k8s/blob/master/proposals/cni- proposal.md Privatelink support
  • 31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you d-nishi on github, dnishi@amazon.com k8s slack & gmail danwilson on github, k8s slack & gmail, https://github.com/concur/skipper