SlideShare a Scribd company logo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Pahud Hsieh, Solutions Architect
Mar 30, 2018
Kubernetes on AWS
Hands-On Workshop
DEV
DAY 2018
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is Kubernetes?
• Kubernetes comes from the Greek word κυβερνήτης:, which
means helmsman or ship pilot. With this analogy in mind, we can think of
Kubernetes as the manager for shipping containers.
• Kubernetes is also referred to as k8s, as there are 8 characters between k and s.
• Kubernetes is highly inspired by the Google Borg system, which we will explore in
this chapter. It is an open source project written in the Go language, and licensed
under the Apache License Version 2.0.
• Kubernetes was started by Google and, with its v1.0 release in July 2015, Google
donated it to the Cloud Native Computing Foundation (CNCF).
• Generally, Kubernetes has new releases every three months. The current stable
version is 1.10
"Kubernetes is an open-source system for
automating deployment, scaling, and
management of containerized applications."
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes Features I
• Automatic binpacking
Kubernetes automatically schedules the containers based on resource usage and
constraints, without sacrificing the availability.
• Self-healing
Kubernetes automatically replaces and reschedules the containers from failed
nodes. It also kills and restarts the containers which do not respond to health
checks, based on existing rules/policy.
• Horizontal scaling
Kubernetes can automatically scale applications based on resource usage like CPU
and memory. In some cases, it also supports dynamic scaling based on customer
metrics.
• Service discovery and Load balancing
Kubernetes groups sets of containers and refers to them via a DNS name. This DNS
name is also called a Kubernetes service. Kubernetes can discover these services
automatically, and load-balance requests between containers of a given service.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes Features II
• Automated rollouts and rollbacks
Kubernetes can roll out and roll back new versions/configurations of an application,
without introducing any downtime.
• Secrets and configuration management
Kubernetes can manage secrets and configuration details for an application without
re-building the respective images. With secrets, we can share confidential
information to our application without exposing it to the stack configuration, like
on GitHub.
• Storage orchestration
With Kubernetes and its plugins, we can automatically mount local, external, and
storage solutions to the containers in a seamless manner, based on Software
Defined Storage (SDS).
• Batch execution
Besides long running jobs, Kubernetes also supports batch execution.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Native Computing Foundation (CNCF)
• containerd for Container Runtime
• rkt for Container Runtime
• Kubernetes for Container Orchestration
• Linkerd for Service Mesh
• gRPC for Remote Procedure Call
• Container Network Interface (CNI) for Container Networking
• CoreDNS for Service Discovery
• Prometheus for Monitoring
• OpenTracing for Tracing
• Fluentd for Logging.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS and the CNCF
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Native Computing Foundation (CNCF)
© 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.
Kubernetes on AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Building our cluster(before)
$ brew install kops kubectl
$ kops create cluster
--name k8s.demothe.cloud
--state s3://k8s.demothe.cloud
--networking calico
--topology private
--zones eu-west-1a,eu-west-1b,eu-west-1c
--master-zones eu-west-1a,eu-west-1b,eu-west-1c
--master-size c4.large
--node-size c4.large
--node-count 3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Building our cluster(today)
// open cloud9 IDE
$ kops create cluster
--name example.cluster.k8s.local 
--zones $AWS_AVAILABILITY_ZONES
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spot instances for node group
machineType: t2.medium
maxPrice: "0.02"
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Verifying and deploying
$ kops edit ig --name=example.cluster.k8s.local nodes
…check YAML looks okay and set spot price…
$ kops update cluster example.cluster.k8s.local --yes
…make cup of coffee…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Here we go!
https://github.com/pahud/k8s-on-aws-workshop
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes concepts
Pods: Co-located group of
containers that share an IP,
namespace, storage volume
Replica Set: Manages the
lifecycle of pods and ensures
specified number are running
Service: Single, stable name
for a set of pods, also acts as LB
Label: Used to organize
and select group of objects
port 8080 port 8080
“web”
ReplicaSet
#Pods—2
label selector: v1
ReplicaSet
#Pods—1
label selector: v2
Pod
v1
Pod
v1
Pod
v2
Node
Docker
Pod
Containers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes concepts
“Virtual” clusters for users/projects
L7 load balancing
Declarative version updates
Run to completion
Automatically adjust number of Pods
AKA Security Groups for Pods
Support for long-term stateful distributed systems
More…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ingress and ALB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
405-ingress-controllers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Create your golang app
from scratch to Kubernetes
https://github.com/pahud/greeting
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We love Challenges!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Send me your ingress resource template
hunhsieh@amazon.com

More Related Content

What's hot

Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
Amazon Web Services
 
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
Amazon Web Services
 
DXC and AWS : AWS Overview and Culture of Innovation
DXC and AWS : AWS Overview and Culture of InnovationDXC and AWS : AWS Overview and Culture of Innovation
DXC and AWS : AWS Overview and Culture of Innovation
Tom Laszewski
 
Accelerate your cloud migration
Accelerate your cloud migrationAccelerate your cloud migration
Accelerate your cloud migration
Amazon Web Services
 
Lambda Function Security
Lambda Function SecurityLambda Function Security
Lambda Function Security
Amazon Web Services
 
AWS-Vizalytics-March-2018 2.pdf
AWS-Vizalytics-March-2018 2.pdfAWS-Vizalytics-March-2018 2.pdf
AWS-Vizalytics-March-2018 2.pdf
Amazon Web Services
 
AWS 資料數據與 IoT
AWS 資料數據與 IoTAWS 資料數據與 IoT
AWS 資料數據與 IoT
Amazon Web Services
 
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
Amazon Web Services
 
AWS雲端自動化合規檢核與資安警訊通報管理
AWS雲端自動化合規檢核與資安警訊通報管理AWS雲端自動化合規檢核與資安警訊通報管理
AWS雲端自動化合規檢核與資安警訊通報管理
Amazon Web Services
 
Open Data on AWS
Open Data on AWSOpen Data on AWS
Open Data on AWS
Amazon Web Services
 
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Amazon Web Services
 
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
Amazon Web Services
 
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
Amazon Web Services
 
IoT Best Practices & Architecture | AWS IoT
IoT Best Practices & Architecture | AWS IoTIoT Best Practices & Architecture | AWS IoT
IoT Best Practices & Architecture | AWS IoT
Amazon Web Services
 
Hybrid Cloud on AWS
Hybrid Cloud on AWSHybrid Cloud on AWS
Hybrid Cloud on AWS
Tom Laszewski
 
SID303 Navigating GDPR Compliance on AWS
 SID303 Navigating GDPR Compliance on AWS SID303 Navigating GDPR Compliance on AWS
SID303 Navigating GDPR Compliance on AWS
Amazon Web Services
 
Enabling Compliance with GDPR on AWS.pdf
Enabling Compliance with GDPR on AWS.pdfEnabling Compliance with GDPR on AWS.pdf
Enabling Compliance with GDPR on AWS.pdf
Amazon Web Services
 
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019 Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
Amazon Web Services
 
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
Amazon Web Services
 
Enabling Compliance with the GDPR on AWS
Enabling Compliance with the GDPR on AWSEnabling Compliance with the GDPR on AWS
Enabling Compliance with the GDPR on AWS
Amazon Web Services
 

What's hot (20)

Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
Detect Abnormal Device Behavior with AWS IoT Device Defender (IOT313-R3) - AW...
 
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
Securing and Managing IoT Devices at Scale (SEC367-R1) - AWS re:Invent 2018
 
DXC and AWS : AWS Overview and Culture of Innovation
DXC and AWS : AWS Overview and Culture of InnovationDXC and AWS : AWS Overview and Culture of Innovation
DXC and AWS : AWS Overview and Culture of Innovation
 
Accelerate your cloud migration
Accelerate your cloud migrationAccelerate your cloud migration
Accelerate your cloud migration
 
Lambda Function Security
Lambda Function SecurityLambda Function Security
Lambda Function Security
 
AWS-Vizalytics-March-2018 2.pdf
AWS-Vizalytics-March-2018 2.pdfAWS-Vizalytics-March-2018 2.pdf
AWS-Vizalytics-March-2018 2.pdf
 
AWS 資料數據與 IoT
AWS 資料數據與 IoTAWS 資料數據與 IoT
AWS 資料數據與 IoT
 
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
Introducing the New Features of AWS Greengrass (IOT365) - AWS re:Invent 2018
 
AWS雲端自動化合規檢核與資安警訊通報管理
AWS雲端自動化合規檢核與資安警訊通報管理AWS雲端自動化合規檢核與資安警訊通報管理
AWS雲端自動化合規檢核與資安警訊通報管理
 
Open Data on AWS
Open Data on AWSOpen Data on AWS
Open Data on AWS
 
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
Achieving Visibility, Security and Real-Time Actionable Alerts Using VPC Flow...
 
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
Enable Your Smart Factory with the AWS Industrial IoT Reference Solution (MFG...
 
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
物聯網創新應用:車聯網解決方案 IoT Story of Connected Vehicle Solution(Level 300)
 
IoT Best Practices & Architecture | AWS IoT
IoT Best Practices & Architecture | AWS IoTIoT Best Practices & Architecture | AWS IoT
IoT Best Practices & Architecture | AWS IoT
 
Hybrid Cloud on AWS
Hybrid Cloud on AWSHybrid Cloud on AWS
Hybrid Cloud on AWS
 
SID303 Navigating GDPR Compliance on AWS
 SID303 Navigating GDPR Compliance on AWS SID303 Navigating GDPR Compliance on AWS
SID303 Navigating GDPR Compliance on AWS
 
Enabling Compliance with GDPR on AWS.pdf
Enabling Compliance with GDPR on AWS.pdfEnabling Compliance with GDPR on AWS.pdf
Enabling Compliance with GDPR on AWS.pdf
 
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019 Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
Securing the edge with AWS IoT services - FND330 - AWS re:Inforce 2019
 
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
AWS IoT for Frictionless Consumer Experiences in Retail (RET201) - AWS re:Inv...
 
Enabling Compliance with the GDPR on AWS
Enabling Compliance with the GDPR on AWSEnabling Compliance with the GDPR on AWS
Enabling Compliance with the GDPR on AWS
 

Similar to Kubernetes on AWS 實作工作坊

Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
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 Story
Amazon Web Services
 
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
Amazon Web Services
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
Amazon 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
 
Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKS
Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Amazon Web Services
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Amazon Web Services Korea
 
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
Shimon Tolts
 
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 Web Services
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
Amazon Web Services
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
Amazon 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 2017
Amazon Web Services
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
Amazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
Amazon Web Services
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
Amazon Web Services
 
Semplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSSemplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWS
Amazon Web Services
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
Amazon Web Services
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
Amazon Web Services
 
Builders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWSBuilders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWS
Amazon Web Services LATAM
 

Similar to Kubernetes on AWS 實作工作坊 (20)

Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
 
GPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryGPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s Story
 
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
 
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)
 
Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKS
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
 
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
 
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
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
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
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
CON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWSCON209_Interstella 8888 Learn How to Use Docker on AWS
CON209_Interstella 8888 Learn How to Use Docker on AWS
 
Semplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWSSemplificare la gestione dei container con i servizi AWS
Semplificare la gestione dei container con i servizi AWS
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
Builders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWSBuilders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWS
 

More from 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 Fargate
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon 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
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
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 Workloads
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon 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 sfatare
Amazon 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 NodeJS
Amazon 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 web
Amazon 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 sfatare
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
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 

More from 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. Pahud Hsieh, Solutions Architect Mar 30, 2018 Kubernetes on AWS Hands-On Workshop DEV DAY 2018
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Kubernetes? • Kubernetes comes from the Greek word κυβερνήτης:, which means helmsman or ship pilot. With this analogy in mind, we can think of Kubernetes as the manager for shipping containers. • Kubernetes is also referred to as k8s, as there are 8 characters between k and s. • Kubernetes is highly inspired by the Google Borg system, which we will explore in this chapter. It is an open source project written in the Go language, and licensed under the Apache License Version 2.0. • Kubernetes was started by Google and, with its v1.0 release in July 2015, Google donated it to the Cloud Native Computing Foundation (CNCF). • Generally, Kubernetes has new releases every three months. The current stable version is 1.10 "Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications."
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes Features I • Automatic binpacking Kubernetes automatically schedules the containers based on resource usage and constraints, without sacrificing the availability. • Self-healing Kubernetes automatically replaces and reschedules the containers from failed nodes. It also kills and restarts the containers which do not respond to health checks, based on existing rules/policy. • Horizontal scaling Kubernetes can automatically scale applications based on resource usage like CPU and memory. In some cases, it also supports dynamic scaling based on customer metrics. • Service discovery and Load balancing Kubernetes groups sets of containers and refers to them via a DNS name. This DNS name is also called a Kubernetes service. Kubernetes can discover these services automatically, and load-balance requests between containers of a given service.
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes Features II • Automated rollouts and rollbacks Kubernetes can roll out and roll back new versions/configurations of an application, without introducing any downtime. • Secrets and configuration management Kubernetes can manage secrets and configuration details for an application without re-building the respective images. With secrets, we can share confidential information to our application without exposing it to the stack configuration, like on GitHub. • Storage orchestration With Kubernetes and its plugins, we can automatically mount local, external, and storage solutions to the containers in a seamless manner, based on Software Defined Storage (SDS). • Batch execution Besides long running jobs, Kubernetes also supports batch execution.
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud Native Computing Foundation (CNCF) • containerd for Container Runtime • rkt for Container Runtime • Kubernetes for Container Orchestration • Linkerd for Service Mesh • gRPC for Remote Procedure Call • Container Network Interface (CNI) for Container Networking • CoreDNS for Service Discovery • Prometheus for Monitoring • OpenTracing for Tracing • Fluentd for Logging.
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS and the CNCF
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud Native Computing Foundation (CNCF)
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes on AWS
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building our cluster(before) $ brew install kops kubectl $ kops create cluster --name k8s.demothe.cloud --state s3://k8s.demothe.cloud --networking calico --topology private --zones eu-west-1a,eu-west-1b,eu-west-1c --master-zones eu-west-1a,eu-west-1b,eu-west-1c --master-size c4.large --node-size c4.large --node-count 3
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Building our cluster(today) // open cloud9 IDE $ kops create cluster --name example.cluster.k8s.local --zones $AWS_AVAILABILITY_ZONES
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot instances for node group machineType: t2.medium maxPrice: "0.02"
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Verifying and deploying $ kops edit ig --name=example.cluster.k8s.local nodes …check YAML looks okay and set spot price… $ kops update cluster example.cluster.k8s.local --yes …make cup of coffee…
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Here we go! https://github.com/pahud/k8s-on-aws-workshop
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes concepts Pods: Co-located group of containers that share an IP, namespace, storage volume Replica Set: Manages the lifecycle of pods and ensures specified number are running Service: Single, stable name for a set of pods, also acts as LB Label: Used to organize and select group of objects port 8080 port 8080 “web” ReplicaSet #Pods—2 label selector: v1 ReplicaSet #Pods—1 label selector: v2 Pod v1 Pod v1 Pod v2 Node Docker Pod Containers
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes concepts “Virtual” clusters for users/projects L7 load balancing Declarative version updates Run to completion Automatically adjust number of Pods AKA Security Groups for Pods Support for long-term stateful distributed systems More…
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ingress and ALB
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 405-ingress-controllers
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Create your golang app from scratch to Kubernetes https://github.com/pahud/greeting
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We love Challenges!
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Send me your ingress resource template hunhsieh@amazon.com