SlideShare a Scribd company logo
1 of 55
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Bruce Chen, Business Development Manager, AWS Taiwan
Tom Tsai, Site Reliability Engineer, MaiCoin
Amazon Elastic Container
Services for Kubernetes (EKS)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
?
•
•
•
•
•
•
Photo & Licence
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
•
•
•
• /
• ( Kernel)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
:
ECS EKS
EC2 Fargate EC2 Fargate
1.
2.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kubernetes?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cloud-native
C L O U D N A T I V E
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
K8S
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
57% Kubernetes AWS
— Cloud Native Computing Foundation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3x Kubernetes masters for HA
AWS Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API
server
Cloud
controller
Controller
manager
Scheduler Add-onsKubeDNS
Kubernetes master
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Availability
Zone 1
Etcd
Master
Etcd
Master
Etcd
Master
Availability
Zone 2
Availability
Zone 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Availability
Zone 1
Etcd
Master
Etcd
Master
Availability
Zone 2
Availability
Zone 3
Etcd
Master
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“ Kubernetes”
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS Production
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Availability
Zone 1
Master Master
Availability
Zone 2
Availability
Zone 3
Master
Workers Workers Workers
AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
mycluster.eks.amazonaws.com
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
Kubectl
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kubernetes
ü
ü
ü (Confirmability)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
APIAPIAPIAPI
EKS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
aws eks create-cluster –cluster-name reinvent2017 –desired-master-version 1.7
–role-arn arn:aws:iam::account-id:role/role-name
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
aws eks describe-cluster –cluster-name reinvent2017
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
HTTP/1.1 200 Content-type:
application/json
{ "cluster":
{
"clusterName": "string",
"createdAt": number,
"currentMasterVersion": "string",
"desiredMasterVersion": "string",
"masterEndpoint": "string",
"roleArn": "string",
"status": "string",
"statusMessage": "string"
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
aws eks list-clusters
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
aws eks delete-cluster –cluster-name
reinvent2017
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon
CloudWatch
AWS
CloudTrail
Master
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kubectl
3) RBAC AWS Identity
K8s API
1) AWS Identity
2) AWS Identity
4) / K8S
AWS Auth
IAM + Kubectl
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC
CNI
PODs
VPC
Github
…{ }
https://github.com/aws/amazon-vpc-cni-k8s
© 2018, 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
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1.9.11.9.2
Version
1.9
Version
1.10
Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Auto Scaling –
ü Horizontal Pod Autoscaler – K8S (CPU)
pods
ü
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Auto Scaling –
ü Auto Scaling K8S Cluster Auto Scaler
ü Cluster Autoscaler
ü AWS Auto Scaling Groups
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ü CoreOS ALB Ingress Controller: AWS
ü Ingress ALB Kubernetes
ü Layer 7
EKS
EKS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
HELLO!
I am Tom Tsai aka smalltown
- MaiCoin Site Reliability Engineer
- Former HTC Principal DevOps
- Former TrendMicro Senior DevOps
I am here because I want to share something with
you
You can find me at smalltown@awsug.tw
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
I Setup Kubernetes on AWS!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
You Setup Kubernetes on AWS! (Before)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why Not Just Use EKS? (Now)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Outline
✓ How EKS Save The Time
✓ Pluggable Worker Node Group
✓ Demo! Demo! Demo!
✓ Permission Control in EKS
✓ Community Feedback
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Self-Hosted Kubernetes Master
✓ There are 3 Most Important Things
○ Complicated Master Component
○ Overlay Network
○ Very Important Etcd Cluster
✓ Not to Mention… Scalability, Upgrade, Configuration
Management, Log Centralize...
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How to Setup EKS?
1. Create EKS IAM Role
- AmazonEKSClusterPolicy
- AmazonEKSServicePolicy
2. Create EKS Security Group
- Allow Worker Access
- Allow kubectl Communication
3. Create EKS Cluster
- Less 10 Mins
Don’t Need To Take Care It
Anymore
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Register Worker Nodes Also Easy
1. Prepare EC2 instance, EC2 IAM role,
security group
2. Install Docker CE
3. Install aws-cli
4. Install kubelet
5. Install heptio authenticator
6. Install cni plugin
7. Prepare kubeconfig
8. Prepare kubelet systemd service file
9. Start kubelet server to register
- Of Course, This
Can be Automated
- Replace with Any
Linux Distribution
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pluggable Worker Node Group
CPU Bound ASG Memory Bound ASG
...
Crazy Cheap Spot Fleet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo! Demo! Demo!
✓ Done
○ VPC Network
○ EKS Cluster
✓ To-Do
○ Register General ASG to EKS Cluster
○ Register Spot Fleet to EKS Cluster
Demo Script:
https://goo.gl/MwuATg
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
HashiCrop Terraform
✓ Something Like CloudFormation
✓ Infrastructure As Code
✓ Cross Platform (AWS, Azure, GCP...)
✓ Demo VPC Network, EKS Cluster, Node
Group Created By it
✓ There will be a Workshop which
Cooperates with AWS This Year
http://bit.ly/taipei-hug
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tightly Integrate With IAM
EC2 IAM Role
IAM User
heptio authenticator
1. Generate Signed
STS URL 2. Pass AWS Identity 3. Verify AWS Identity
4. K8S action allowed/denied
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Community Feedback I
✓ Can’t find Official Document demonstrating ”How to Customize
Worker Node AMI with other Linux Distribution"
✓ AWS team quickly feedback my blog to Seattle EKS team to
address this issue
✓ We expect the community could quickly leverage this solution
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Community Feedback II
✓ Only The IAM User Creating The EKS Cluster Can Access EKS
Cluster at First
✓ Need to Create Kubernetes ConfigMap aws-auth
○ Add The IAM User Want to Access EKS Cluster
○ Add The EC2 IAM Role Want to Register EKS Cluster
✓ Hope EKS team can streamline this process
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

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
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitArun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteArun Gupta
 
Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon Web Services
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSAmazon 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
 
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...Amazon Web Services
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Amazon 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 FargateAmazon 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
 
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Amazon Web Services
 
Introduction to EKS (AWS User Group Slovakia)
Introduction to EKS (AWS User Group Slovakia)Introduction to EKS (AWS User Group Slovakia)
Introduction to EKS (AWS User Group Slovakia)Vladimir Simek
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateAmazon Web Services
 
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019AWS Summits
 
Eks and fargate
Eks and fargateEks and fargate
Eks and fargateAsaf Abres
 

What's hot (20)

Kubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKSKubernetes on AWS with Amazon EKS
Kubernetes on AWS with Amazon EKS
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Containers - Amazon EKS
Containers - Amazon EKSContainers - Amazon EKS
Containers - Amazon EKS
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for Kubernetes
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes 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
 
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...
Deep Dive on Container Networking at Scale on Amazon EKS, Amazon ECS, & Amazo...
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
 
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
 
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
 
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
 
Introduction to EKS (AWS User Group Slovakia)
Introduction to EKS (AWS User Group Slovakia)Introduction to EKS (AWS User Group Slovakia)
Introduction to EKS (AWS User Group Slovakia)
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & Fargate
 
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
 
Eks and fargate
Eks and fargateEks and fargate
Eks and fargate
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
AWS ECS vs EKS
AWS ECS vs EKSAWS ECS vs EKS
AWS ECS vs EKS
 

Similar to 使用 Amazon EKS 打造高效的服務架構設計

SRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKSSRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKSAmazon 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 SummitAmazon 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
 
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
 
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
 
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...Amazon Web Services
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWSAmazon Web Services
 
Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Amazon Elastic Container Service for Kubernetes (Amazon EKS)Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Amazon Elastic Container Service for Kubernetes (Amazon EKS)Amazon Web Services
 
Getting-started-with-containers on AWS
Getting-started-with-containers on AWSGetting-started-with-containers on AWS
Getting-started-with-containers on AWSAmazon Web Services
 
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 AWSAmazon Web Services
 
Containers-AWS-Webinar-13-11-2018.pdf
Containers-AWS-Webinar-13-11-2018.pdfContainers-AWS-Webinar-13-11-2018.pdf
Containers-AWS-Webinar-13-11-2018.pdfAmazon Web Services
 
Aws container services overview
Aws container services overviewAws container services overview
Aws container services overviewPatricio Vazquez
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveAmazon Web Services
 
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...Amazon Web Services Japan
 
[AWS Container Service] Getting Started with Kubernetes on AWS
[AWS Container Service] Getting Started with Kubernetes on AWS[AWS Container Service] Getting Started with Kubernetes on AWS
[AWS Container Service] Getting Started with Kubernetes on AWSAmazon Web Services Korea
 
AWS Compute Evolved Week: Running Kubernetes on AWS
AWS Compute Evolved Week: Running Kubernetes on AWSAWS Compute Evolved Week: Running Kubernetes on AWS
AWS Compute Evolved Week: Running Kubernetes on AWSAmazon Web Services
 
AWS 微服務中的 Container 選項比較 (Level 400)
AWS 微服務中的 Container 選項比較   (Level 400)AWS 微服務中的 Container 選項比較   (Level 400)
AWS 微服務中的 Container 選項比較 (Level 400)Amazon Web Services
 

Similar to 使用 Amazon EKS 打造高效的服務架構設計 (20)

SRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKSSRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKS
 
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
 
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
 
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
 
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...
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWS
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Amazon Elastic Container Service for Kubernetes (Amazon EKS)Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Amazon Elastic Container Service for Kubernetes (Amazon EKS)
 
Getting-started-with-containers on AWS
Getting-started-with-containers on AWSGetting-started-with-containers on AWS
Getting-started-with-containers on AWS
 
Running Kubernetes on AWS
Running Kubernetes on AWSRunning Kubernetes on AWS
Running Kubernetes on AWS
 
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
 
Containers-AWS-Webinar-13-11-2018.pdf
Containers-AWS-Webinar-13-11-2018.pdfContainers-AWS-Webinar-13-11-2018.pdf
Containers-AWS-Webinar-13-11-2018.pdf
 
Aws container services overview
Aws container services overviewAws container services overview
Aws container services overview
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
Run Kubernetes with Amazon EKS
Run Kubernetes with Amazon EKSRun Kubernetes with Amazon EKS
Run Kubernetes with Amazon EKS
 
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...
AWS Black Belt Online Seminar 2018 re:Invent Recap: Compute, Container and Ne...
 
[AWS Container Service] Getting Started with Kubernetes on AWS
[AWS Container Service] Getting Started with Kubernetes on AWS[AWS Container Service] Getting Started with Kubernetes on AWS
[AWS Container Service] Getting Started with Kubernetes on AWS
 
AWS Compute Evolved Week: Running Kubernetes on AWS
AWS Compute Evolved Week: Running Kubernetes on AWSAWS Compute Evolved Week: Running Kubernetes on AWS
AWS Compute Evolved Week: Running Kubernetes on AWS
 
AWS 微服務中的 Container 選項比較 (Level 400)
AWS 微服務中的 Container 選項比較   (Level 400)AWS 微服務中的 Container 選項比較   (Level 400)
AWS 微服務中的 Container 選項比較 (Level 400)
 

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 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
 

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
 

使用 Amazon EKS 打造高效的服務架構設計

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Bruce Chen, Business Development Manager, AWS Taiwan Tom Tsai, Site Reliability Engineer, MaiCoin Amazon Elastic Container Services for Kubernetes (EKS)
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ? • • • • • • Photo & Licence
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • • • • / • ( Kernel)
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. : ECS EKS EC2 Fargate EC2 Fargate 1. 2.
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kubernetes?
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cloud-native C L O U D N A T I V E
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. K8S
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 57% Kubernetes AWS — Cloud Native Computing Foundation
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3x Kubernetes masters for HA AWS Kubernetes
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. API server Cloud controller Controller manager Scheduler Add-onsKubeDNS Kubernetes master
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Availability Zone 1 Etcd Master Etcd Master Etcd Master Availability Zone 2 Availability Zone 3
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Availability Zone 1 Etcd Master Etcd Master Availability Zone 2 Availability Zone 3 Etcd Master
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. “ Kubernetes”
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EKS Production
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EKS Kubernetes
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EKS AWS
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EKS Kubernetes
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Availability Zone 1 Master Master Availability Zone 2 Availability Zone 3 Master Workers Workers Workers AWS
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. mycluster.eks.amazonaws.com Availability Zone 1 Availability Zone 2 Availability Zone 3 Kubectl
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EKS Kubernetes
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kubernetes ü ü ü (Confirmability)
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. APIAPIAPIAPI EKS
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws eks create-cluster –cluster-name reinvent2017 –desired-master-version 1.7 –role-arn arn:aws:iam::account-id:role/role-name
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws eks describe-cluster –cluster-name reinvent2017
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. HTTP/1.1 200 Content-type: application/json { "cluster": { "clusterName": "string", "createdAt": number, "currentMasterVersion": "string", "desiredMasterVersion": "string", "masterEndpoint": "string", "roleArn": "string", "status": "string", "statusMessage": "string" } }
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws eks list-clusters
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws eks delete-cluster –cluster-name reinvent2017
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon CloudWatch AWS CloudTrail Master
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kubectl 3) RBAC AWS Identity K8s API 1) AWS Identity 2) AWS Identity 4) / K8S AWS Auth IAM + Kubectl
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. VPC CNI PODs VPC Github …{ } https://github.com/aws/amazon-vpc-cni-k8s
  • 33. © 2018, 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
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.9.11.9.2 Version 1.9 Version 1.10 Kubernetes
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Auto Scaling – ü Horizontal Pod Autoscaler – K8S (CPU) pods ü
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Auto Scaling – ü Auto Scaling K8S Cluster Auto Scaler ü Cluster Autoscaler ü AWS Auto Scaling Groups
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ü CoreOS ALB Ingress Controller: AWS ü Ingress ALB Kubernetes ü Layer 7
  • 39. EKS
  • 40. EKS
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. HELLO! I am Tom Tsai aka smalltown - MaiCoin Site Reliability Engineer - Former HTC Principal DevOps - Former TrendMicro Senior DevOps I am here because I want to share something with you You can find me at smalltown@awsug.tw
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. I Setup Kubernetes on AWS!
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. You Setup Kubernetes on AWS! (Before)
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why Not Just Use EKS? (Now)
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Outline ✓ How EKS Save The Time ✓ Pluggable Worker Node Group ✓ Demo! Demo! Demo! ✓ Permission Control in EKS ✓ Community Feedback
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Self-Hosted Kubernetes Master ✓ There are 3 Most Important Things ○ Complicated Master Component ○ Overlay Network ○ Very Important Etcd Cluster ✓ Not to Mention… Scalability, Upgrade, Configuration Management, Log Centralize...
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How to Setup EKS? 1. Create EKS IAM Role - AmazonEKSClusterPolicy - AmazonEKSServicePolicy 2. Create EKS Security Group - Allow Worker Access - Allow kubectl Communication 3. Create EKS Cluster - Less 10 Mins Don’t Need To Take Care It Anymore
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Register Worker Nodes Also Easy 1. Prepare EC2 instance, EC2 IAM role, security group 2. Install Docker CE 3. Install aws-cli 4. Install kubelet 5. Install heptio authenticator 6. Install cni plugin 7. Prepare kubeconfig 8. Prepare kubelet systemd service file 9. Start kubelet server to register - Of Course, This Can be Automated - Replace with Any Linux Distribution
  • 49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pluggable Worker Node Group CPU Bound ASG Memory Bound ASG ... Crazy Cheap Spot Fleet
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Demo! Demo! Demo! ✓ Done ○ VPC Network ○ EKS Cluster ✓ To-Do ○ Register General ASG to EKS Cluster ○ Register Spot Fleet to EKS Cluster Demo Script: https://goo.gl/MwuATg
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. HashiCrop Terraform ✓ Something Like CloudFormation ✓ Infrastructure As Code ✓ Cross Platform (AWS, Azure, GCP...) ✓ Demo VPC Network, EKS Cluster, Node Group Created By it ✓ There will be a Workshop which Cooperates with AWS This Year http://bit.ly/taipei-hug
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tightly Integrate With IAM EC2 IAM Role IAM User heptio authenticator 1. Generate Signed STS URL 2. Pass AWS Identity 3. Verify AWS Identity 4. K8S action allowed/denied
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Community Feedback I ✓ Can’t find Official Document demonstrating ”How to Customize Worker Node AMI with other Linux Distribution" ✓ AWS team quickly feedback my blog to Seattle EKS team to address this issue ✓ We expect the community could quickly leverage this solution
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Community Feedback II ✓ Only The IAM User Creating The EKS Cluster Can Access EKS Cluster at First ✓ Need to Create Kubernetes ConfigMap aws-auth ○ Add The IAM User Want to Access EKS Cluster ○ Add The EC2 IAM Role Want to Register EKS Cluster ✓ Hope EKS team can streamline this process
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.