SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
James Chiang, AWS Solution Architect
2018/03
Kubernetes on AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Kubernetes?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes concepts
port 8080 port 8080
ReplicaSet
#Pods—2
label selector: v1
ReplicaSet
#Pods—1
label selector: v2
Node
Docker
Pod
Containers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes concepts
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes cluster
setup—choices
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD of apps
on Kubernetes
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Identity and Access
Management (IAM)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Visibility in cluster
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region
CloudWatch
Logs
Elasticsearch
Kibana
Fluentd
DaemonSet
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Networking Plugin
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CNI Plugins
• The Container Network Interface is a set of specs and libs for writing
networking plugins
• Handles standards around namespace and interface configuration
• Configured by passing “—networking CNI” flag in cluster spec; then
installing the desired plugin as a daemonset (run once on all hosts)
• CNI standards have allowed for a number of networking approaches in
Kubernetes, each with their own advantages and disadvantages
https://github.com/containernetworking/cni/blob/master/SPEC.md  you should read this
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Nginx Pod
Java Pod
ENI
Secondary IPs:
10.0.0.1
10.0.0.2
Veth IP: 10.0.0.1
Veth IP: 10.0.0.2
Nginx Pod
Java Pod
ENI
Veth IP: 10.0.0.20
Veth IP: 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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• CoreOS project
• Stores configuration data
in etcd
• VXLan for L2 encap
(default)
• Each pod gets a /24
subnet on the flannel /16
overlay
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Open source project
owned by Weaveworks
• No backing k/v store
required; cluster state
replicated in memory
• Supports multicast + NaCL
encryption
• Has DNS service
discovery and load
balancing built in
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Overlay Networks
• Agnostic to underlying topology
and platform
• Can easily span networks and
platforms
• Some offer cool functionality
(encryption, multicast)
• No cluster size limitations due to
routes or hosts
• Can be difficult to troubleshoot
due to encapsulation
• Require port mapping on host or
load balancers for access from
other networks
• Performance overhead
• Can’t use security groups
Pros: Cons:
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
VPC – 10.0.0.0/16
instance1
10.0.0.10
10.0.0.12
Calico Subnet –
172.16.1.0/16
172.16.0.1/24 172.16.0.2/24
Calico BGP
daemon
instance2
IF on Calico
Subnet –
172.16.0.2/24
instance2
10.0.0.12
Instance2 route table:
172.16.0.1/24 via 10.0.0.10
Src/dst
disabled
instance3
Calico Subnet –
172.16.1.0/16
172.16.0.3/24 172.16.0.4/24
instance4
10.0.1.2210.0.1.20
Calico IPIP tunnel
across subnets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Layer 3 networking (Calico)
• No encap/decap overhead*
• Easier debugging, well known
tools/protocols (iptables, BGP)
• Uses BGP for routing - supports
large clusters
• No cluster size limitations due to
routes or hosts
• Limited to UDP/ICMP/TCP
protocol support
• Uses BGP for routing -
complexity
• Can’t use security groups*
Pros: Cons:
*except across subnets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
VPC Networking (Kubenet)
• Default networking mode for
KOPS
• --network-plugin=kubenet
• Creates a bridge called
cbr0; connects a Veth pair
to each pods
• Manages an out-of-band
subnet across the cluster
(like Calico, so src/dst =
disabled is required)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
VPC Networking (Kubenet)
• Interacts directly with the VPC
• No encap/decap overhead
• Easier debugging
• Uses VPC routing tables*
• Cluster size limited to number of
routes per subnet
• Can’t use security groups
• Doesn’t automatically update
routes on scaling events
(userdata/lifecycle hooks?)
• Is recommended to be used in its
own subnet to prevent route table
conflicts
Pros: Cons:
*maybe also a negative
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

韓國AWS遊戲業經驗和架構分享
韓國AWS遊戲業經驗和架構分享韓國AWS遊戲業經驗和架構分享
韓國AWS遊戲業經驗和架構分享Amazon Web Services
 
GPSTEC324_STORAGE FOR HPC IN THE CLOUD
GPSTEC324_STORAGE FOR HPC IN THE CLOUDGPSTEC324_STORAGE FOR HPC IN THE CLOUD
GPSTEC324_STORAGE FOR HPC IN THE CLOUDAmazon Web Services
 
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSAmazon Web Services
 
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayDEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayAmazon Web Services
 
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...Amazon Web Services
 
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...Amazon Web Services
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfAmazon Web Services
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017Amazon Web Services
 
Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017Amazon Web Services
 
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2Amazon Web Services
 
IOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWSIOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWSAmazon Web Services
 
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeCTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeAmazon Web Services
 
Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)Amazon Web Services
 
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...Amazon Web Services
 
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and GluonMCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and GluonAmazon Web Services
 
DEV206_Life of a Code Change to a Tier 1 Service
DEV206_Life of a Code Change to a Tier 1 ServiceDEV206_Life of a Code Change to a Tier 1 Service
DEV206_Life of a Code Change to a Tier 1 ServiceAmazon Web Services
 
SID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaSID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaAmazon Web Services
 
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017Amazon Web Services
 

La actualidad más candente (20)

韓國AWS遊戲業經驗和架構分享
韓國AWS遊戲業經驗和架構分享韓國AWS遊戲業經驗和架構分享
韓國AWS遊戲業經驗和架構分享
 
GPSTEC324_STORAGE FOR HPC IN THE CLOUD
GPSTEC324_STORAGE FOR HPC IN THE CLOUDGPSTEC324_STORAGE FOR HPC IN THE CLOUD
GPSTEC324_STORAGE FOR HPC IN THE CLOUD
 
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
 
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-RayDEV204_Debugging Modern Applications Introduction to AWS X-Ray
DEV204_Debugging Modern Applications Introduction to AWS X-Ray
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
 
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...
SRV336_Build a Serverless, Face-Recognizing IoT Security System with Amazon R...
 
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdfDEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
DEV305_Manage Your Applications with AWS Elastic Beanstalk.pdf
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
 
Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017Storage State of the Union - STG201 - re:Invent 2017
Storage State of the Union - STG201 - re:Invent 2017
 
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
 
IOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWSIOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWS
 
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeCTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
 
Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)Building Serverless Real-time Data Processing (workshop)
Building Serverless Real-time Data Processing (workshop)
 
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
MBL309_User Engagement, Messaging, and Analytics Using Amazon Pinpoint from A...
 
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and GluonMCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
 
DEV206_Life of a Code Change to a Tier 1 Service
DEV206_Life of a Code Change to a Tier 1 ServiceDEV206_Life of a Code Change to a Tier 1 Service
DEV206_Life of a Code Change to a Tier 1 Service
 
遊戲數據解決方案
遊戲數據解決方案遊戲數據解決方案
遊戲數據解決方案
 
SID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and AlexaSID302_Force Multiply Your Security Team with Automation and Alexa
SID302_Force Multiply Your Security Team with Automation and Alexa
 
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017
NEW LAUNCH! Rapidly Build IoT applications - IOT216 - re:Invent 2017
 

Similar a Kubernetes on AWS

Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Amazon Web Services
 
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 AWSAmazon Web Services
 
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 2018Amazon Web Services
 
Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018PolarSeven Pty Ltd
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersAmazon Web Services
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Amazon Web Services
 
CMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesCMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesAmazon Web Services
 
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesIntroduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesAmazon Web Services
 
Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSAmazon Web Services
 
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 SummitAmazon Web Services
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Web Services
 
GPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryGPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryAmazon Web Services
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSAmazon Web Services
 
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...Amazon Web Services
 
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 2018AWS Germany
 
NET201_Creating Your Virtual Data Center
NET201_Creating Your Virtual Data CenterNET201_Creating Your Virtual Data Center
NET201_Creating Your Virtual Data CenterAmazon Web Services
 
AWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSAWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSShimon Tolts
 
Building Secure Services using Containers
Building Secure Services using ContainersBuilding Secure Services using Containers
Building Secure Services using ContainersAmazon Web Services
 

Similar a Kubernetes on AWS (20)

Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
 
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
 
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
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017
 
CMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 InstancesCMP315_Optimizing Network Performance for Amazon EC2 Instances
CMP315_Optimizing Network Performance for Amazon EC2 Instances
 
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for KubernetesIntroduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
Introduction to AWS Fargate & Amazon Elastic Container Service for Kubernetes
 
Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKS
 
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
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
GPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryGPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s Story
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...
Optimizing Network Performance for Amazon EC2 Instances (CMP308-R1) - AWS re:...
 
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
 
NET201_Creating Your Virtual Data Center
NET201_Creating Your Virtual Data CenterNET201_Creating Your Virtual Data Center
NET201_Creating Your Virtual Data Center
 
AWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSAWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECS
 
Building Secure Services using Containers
Building Secure Services using ContainersBuilding Secure Services using Containers
Building Secure Services using Containers
 

Más de Amazon Web Services

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...Amazon Web Services
 
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...Amazon Web Services
 
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 FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
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 Amazon Web Services
 
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...Amazon Web Services
 
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...Amazon Web Services
 
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 WorkloadsAmazon Web Services
 
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 sfatareAmazon Web Services
 
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 NodeJSAmazon Web Services
 
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 webAmazon Web Services
 
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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Más de 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
 

Kubernetes on AWS

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. James Chiang, AWS Solution Architect 2018/03 Kubernetes on AWS
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Kubernetes?
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes concepts port 8080 port 8080 ReplicaSet #Pods—2 label selector: v1 ReplicaSet #Pods—1 label selector: v2 Node Docker Pod Containers
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes concepts
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes cluster setup—choices
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CI/CD of apps on Kubernetes
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Identity and Access Management (IAM)
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Visibility in cluster
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region CloudWatch Logs Elasticsearch Kibana Fluentd DaemonSet
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Networking Plugin
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNI Plugins • The Container Network Interface is a set of specs and libs for writing networking plugins • Handles standards around namespace and interface configuration • Configured by passing “—networking CNI” flag in cluster spec; then installing the desired plugin as a daemonset (run once on all hosts) • CNI standards have allowed for a number of networking approaches in Kubernetes, each with their own advantages and disadvantages https://github.com/containernetworking/cni/blob/master/SPEC.md  you should read this
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Nginx Pod Java Pod ENI Secondary IPs: 10.0.0.1 10.0.0.2 Veth IP: 10.0.0.1 Veth IP: 10.0.0.2 Nginx Pod Java Pod ENI Veth IP: 10.0.0.20 Veth IP: 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
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • CoreOS project • Stores configuration data in etcd • VXLan for L2 encap (default) • Each pod gets a /24 subnet on the flannel /16 overlay
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Open source project owned by Weaveworks • No backing k/v store required; cluster state replicated in memory • Supports multicast + NaCL encryption • Has DNS service discovery and load balancing built in
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Overlay Networks • Agnostic to underlying topology and platform • Can easily span networks and platforms • Some offer cool functionality (encryption, multicast) • No cluster size limitations due to routes or hosts • Can be difficult to troubleshoot due to encapsulation • Require port mapping on host or load balancers for access from other networks • Performance overhead • Can’t use security groups Pros: Cons:
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. VPC – 10.0.0.0/16 instance1 10.0.0.10 10.0.0.12 Calico Subnet – 172.16.1.0/16 172.16.0.1/24 172.16.0.2/24 Calico BGP daemon instance2 IF on Calico Subnet – 172.16.0.2/24 instance2 10.0.0.12 Instance2 route table: 172.16.0.1/24 via 10.0.0.10 Src/dst disabled instance3 Calico Subnet – 172.16.1.0/16 172.16.0.3/24 172.16.0.4/24 instance4 10.0.1.2210.0.1.20 Calico IPIP tunnel across subnets
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Layer 3 networking (Calico) • No encap/decap overhead* • Easier debugging, well known tools/protocols (iptables, BGP) • Uses BGP for routing - supports large clusters • No cluster size limitations due to routes or hosts • Limited to UDP/ICMP/TCP protocol support • Uses BGP for routing - complexity • Can’t use security groups* Pros: Cons: *except across subnets
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. VPC Networking (Kubenet) • Default networking mode for KOPS • --network-plugin=kubenet • Creates a bridge called cbr0; connects a Veth pair to each pods • Manages an out-of-band subnet across the cluster (like Calico, so src/dst = disabled is required)
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. VPC Networking (Kubenet) • Interacts directly with the VPC • No encap/decap overhead • Easier debugging • Uses VPC routing tables* • Cluster size limited to number of routes per subnet • Can’t use security groups • Doesn’t automatically update routes on scaling events (userdata/lifecycle hooks?) • Is recommended to be used in its own subnet to prevent route table conflicts Pros: Cons: *maybe also a negative
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.