SlideShare ist ein Scribd-Unternehmen logo
1 von 58
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Mitch Beaumont
Solutions Architect, Amazon Web Services
Expert tips for successful Kubernetes
deployments on AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
We Give You The Power To Choose:
ECS EKS
EC2 Fargate EC2 Fargate
1. Choose your
orchestration tool
2. Choose your
launch type
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Started at Google
• Influenced by Google Borg
• Container Orchestrator
• Contributed to the CNCF
Kubernetes 101
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations as Code
Annotated Documentation
Frequent, small, reversible changes
Refine operation procedures frequently
Anticipate failure
Learn from operational failures
What does operational excellence look like on AWS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
$ kubectl get tips –n aws-summit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GET api/v1/namespaces/aws-summit/tips/{1}
Never build a Kubernetes Cluster the hard way!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Options for Kubernetes cluster setup
Community
• Kops – kubernetes-aws.io
• Kubeadm – toolkit for bootstrapping a cluster
• Kubespray – set of tools for deploying K8s clusters.
Enterprise
• Elastic Container Service for Kubernetes (EKS)
• Red Hat OpenShift
Other options
• CloudFormation, Terraform, Ansible, Puppet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kops – Kubernetes Operations
Community supported
• SIG AWS
• Kops office hours and Slack channel
Generate CloudFormation or Terraform scripts
kops create cluster 
--name cluster1.kubernetes-aws.io 
--zones ap-southeast-2a, ap-southeast-2b, ap-southeast-2c 
--master-count 3
--master-size m4.large
--node-count 5 
--state s3://kubernetes-aws-io 
--yes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Op er a t i o n al
Exc el len ce
Sec u r i t y
R el i a b i l i tyP er f o r m an ce
Ef f i c i en cy
C o s t
O p t i m i s a t i o n
M a s t er s
et c d
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Elastic Container Service for Kubernetes
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.
Elastic Container Service for Kubernetes
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
etcd
Master
etcd
Master
etcd
Master
AWS Managed
Customer
Managed
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
aws eks create-cluster --cluster-name summit-cluster 
--role-arn arn:aws:iam::1123581321:role/eks-vpc-
EksServiceRole-21345589144 
--vpc-id vpc-21345589144 
--region us-west-2
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Community tools like Kops, kubeadm and
kubespray help remove some of the
effort.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Community tools like Kops, kubeadm and
kubespray help remove some of the
effort.
• Kops provisions infrastructure, as well as
the Kubernetes cluster components.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Community tools like Kops, kubeadm and
kubespray help remove some of the
effort.
• Kops provisions infrastructure, as well as
the Kubernetes cluster components.
• Use CloudFormation or Terraform to
manage Operations as Code.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Community tools like Kops, kubeadm and
kubespray help remove some of the
effort.
• Kops provisions infrastructure, as well as
the Kubernetes cluster components.
• Use CloudFormation or Terraform to
manage Operations as Code.
• EKS provides a fully managed masters
and etcd. (control plane)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GET api/v1/namespaces/aws-summit /tips/{2}
Consider your networking options
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“Every pod should have it’s own IP
address, and all pods should be able to
talk to one and other”
Node Node
Pod Pod
Networking With Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What Is CNI
Network
Plugin
Runtime
Network
• A way for Kubernetes to tell an
underlying SDN that it wants to connect a
container to a network.
• Standards based pluggable architecture
for container networking.
• API for writing plugins to configure
network interfaces for containers.
• CNCF Project
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Popular Solutions For Kubernetes Networking
1 2 3 4 5 6 7 8
StarsonGithub
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ENI
VPC Subnet – 172.16.18.0/24
Bridge
Pod CIDR
10.244.10.0/24
Destination Via
10.244.10.0/24 172.16.18.101
10.244.11.0/24 172.16.18.102
… …
Node IP
172.16.18.101
“50 Route Limit”
AWS Route Table
Networking With Kubenet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Overlay Networks
• Can't get enough IP space? (subnets not
sized correctly)
• Your existing network cannot handle the
number of routes required (VPC route
tables have a limit of 50 routes).
• You want to tap in to additional
capabilities that a specific overlay
network provides – network policies
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
src: node
dst: node
ENI ENI
VPC Subnet – 10.0.0.0/24
Instance 2
Bridge Bridge
Flannel0
src: pod
dst: pod
Flannel0
Flannel Pod Cidr
10.244.0.0/16
Flannel Pod Cidr
10.244.0.0/16
Networking With Flannel
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Do I Need An Overlay Network?
© 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
Networking With Amazon VPC CNI
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
kind: NetworkPolicy
apiVersion: extensions/v1beta1
metadata:
name: default-deny
spec:
podSelector:
matchLabels: {}
prod-namespace
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
kind: NetworkPolicy
apiVersion: extensions/v1beta1
metadata:
name: default-deny
spec:
podSelector:
matchLabels: {}
prod-namespace
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
prod-namespace
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: public-to-frontend
spec:
podSelector:
matchLabels:
role: frontend
ingress:
- from:
- ipBlock:
cidr: "0.0.0.0/0"
ports:
- protocol: TCP
port: 80
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
prod-namespace
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: public-to-frontend
spec:
podSelector:
matchLabels:
role: frontend
ingress:
- from:
- ipBlock:
cidr: "0.0.0.0/0"
ports:
- protocol: TCP
port: 80
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
prod-namespace
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: frontend-to-cats
spec:
podSelector:
matchLabels:
role: cats
ingress:
- from:
- podSelector:
matchLabels:
role: “frontend”
ports:
- protocol: TCP
port: 80
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How Do I Achieve Segmentation?
Frontend
Cats Dogs
prod-namespace
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: frontend-to-cats
spec:
podSelector:
matchLabels:
role: cats
ingress:
- from:
- podSelector:
matchLabels:
role: “frontend”
ports:
- protocol: TCP
port: 80
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• All pods need a real IP and must be able
to communicate with each other.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• All pods need a real IP and must be able
to communicate with each other.
• Kops defaults to Kubenet.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• All pods need a real IP and must be able
to communicate with each other.
• Kops defaults to Kubenet.
• Kubernetes adopted the CNI container
networking standard.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• All pods need a real IP and must be able
to communicate with each other.
• Kops defaults to Kubenet.
• Kubernetes adopted the CNI container
networking standard.
• Amazon EKS supports the “amazon-vpc-
cni” plugin.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• All pods need a real IP and must be able
to communicate with each other.
• Kops defaults to Kubenet.
• Kubernetes adopted the CNI container
networking standard.
• Amazon EKS supports the “amazon-vpc-
cni” plugin.
• Segmentation can be achieved using
network policies.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GET api/v1/namespaces/aws-summit/tips/{3}
Monitor all the things!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility About Your Kubernetes Cluster
ApplicationContainerNodeCluster
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Building A Log Aggregator
An open source data collector providing a unified logging layer,
supported by 500+ plugins connecting to many types of systems.
A distributed, RESTful search and analytics engine.
(Amazon Elasticsearch)
Lets you visualise your Elasticsearch data.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WorkerWorkerMaster
WorkerWorkerMaster
ASG
AZ1
Region
AZ2
ASG
Amazon
CloudWatch
Logs
Amazon
Elasticsearch
Service
Kibana
Fluentd
DaemonSet
Kubectl logs
Elasticsearch (index),
Fluentd (store), and
Kibana (visualise)
Logs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Monitoring tools should compliment
dynamic nature of containers.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Monitoring tools should compliment
dynamic nature of containers.
• Application and cluster log data help us
Learn from operational failures.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Monitoring tools should compliment
dynamic nature of containers.
• Application and cluster log data help us
Learn from operational failures.
• It is essential that you Refine operation
procedures frequently.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Monitoring tools should compliment
dynamic nature of containers.
• Application and cluster log data help us
Learn from operational failures.
• It is essential that you Refine operation
procedures frequently.
• Partners like DataDog offer great
solutions.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GET api/v1/namespaces/aws-summit/tips/{4}
Build, Ship, Run …
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Continuous Deployment to Kubernetes
Developer
AWS CodePipeline
AWS CodeCommit AWS CodeBuild AWS Lambda
Amazon ECR Kubernetes
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Continuous Deployment to Kubernetes
Developer
AWS CodePipeline
AWS CodeCommit AWS CodeBuild AWS Lambda
Amazon ECR Kubernetes
• Code is committed to AWS CodeCommit.
• PR created for review of changes.
• Changes merged to master branch.
• AWS CodePipeline detects changes and starts
moving changes through the pipeline.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Continuous Deployment to Kubernetes
Developer
AWS CodePipeline
AWS CodeCommit AWS CodeBuild AWS Lambda
Amazon ECR Kubernetes
• AWS CodeBuild packages code changes
and dependencies and builds a Docker
image.
• Other pipeline stages can be included to
test code and the package, also using
AWS CodeBuild.
• The Docker Image is pushed to Amazon
ECR.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Continuous Deployment to Kubernetes
Developer
AWS CodePipeline
AWS CodeCommit AWS CodeBuild AWS Lambda
Amazon ECR Kubernetes
• AWS CodePipeline invokes an AWS
Lambda function which updates the
Kubernetes deployment file with the
image tag.
• AWS Lambda invokes Kubernetes API
(Python SDK) to update application
deployment.
• A rolling update is performed of the pods
to match the Docker image that was
created.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
mport yaml, boto3, botocore, json, zipfile
from os import path
from kubernetes import client, config
s3 = boto3.resource('s3')
code_pipeline = boto3.client('codepipeline')
ssm = boto3.client('ssm')
def lambda_handler(event, context):
cplJobId = event['CodePipeline.job']['id']
cplKey = event['CodePipeline.job']['data']['inputArtifacts'][0]['location']['s3Location']['objectKey']
cplBucket = event['CodePipeline.job']['data']['inputArtifacts'][0]['location']['s3Location']['bucketName']
s3.meta.client.download_file(cplBucket,cplKey,'/tmp/build.zip')
zip_ref = zipfile.ZipFile('/tmp/build.zip', 'r')
zip_ref.extractall('/tmp/')
zip_ref.close()
with open('/tmp/build.json') as json_data:
d = json.load(json_data)
s3.meta.client.download_file(d["template-bucket"], 'web-server-deployment.yml', '/tmp/web-server-deployment.yml')
s3.meta.client.download_file(d["template-bucket"], 'config', '/tmp/config')
print(d["repository-uri"], d["tag"], d["deployment-name"])
inplace_change("/tmp/web-server-deployment.yml", "$REPOSITORY_URI", d["repository-uri"])
inplace_change("/tmp/web-server-deployment.yml", "$TAG", d["tag"])
# Build config file from template and secrets in SSM
CA = ssm.get_parameter(Name='CA', WithDecryption=True)["Parameter"]["Value"]
CLIENT_CERT = ssm.get_parameter(Name='ClientCert', WithDecryption=True)["Parameter"]["Value"]
CLIENT_KEY = ssm.get_parameter(Name='ClientKey', WithDecryption=True)["Parameter"]["Value"]
inplace_change("/tmp/config", "$ENDPOINT", d["cluster-endpoint"])
inplace_change("/tmp/config", "$CA", CA)
inplace_change("/tmp/config", "$CLIENT_CERT", CLIENT_CERT)
inplace_change("/tmp/config", "$CLIENT_KEY", CLIENT_KEY)
config.load_kube_config('/tmp/config')
try:
with open(path.join(path.dirname(__file__), "/tmp/web-server-deployment.yml")) as f:
dep = yaml.load(f)
k8s_beta = client.ExtensionsV1beta1Api()
resp = k8s_beta.patch_namespaced_deployment(name=d["deployment-name"],
body=dep, namespace="default")
print("Deployment created. status='%s'" % str(resp.status))
code_pipeline.put_job_success_result(jobId=cplJobId)
return 'Success'
except Exception as e:
code_pipeline.put_job_failure_result(jobId=cplJobId, failureDetails={'message': 'Job Failed', 'type': 'JobFailed'})
print(e)
raise e
def inplace_change(filename, old_string, new_string):
with open(filename) as f:
s = f.read()
if old_string not in s:
# print '"{old_string}" not found in {filename}.'.format(**locals())
return
with open(filename, 'w') as f:
# print 'Changing "{old_string}" to "{new_string}" in {filename}'.format(**locals())
s = s.replace(old_string, new_string)
f.write(s)
config.load_kube_config('/tmp/config')
try:
with open(path.join(path.dirname(__file__), "/tmp/web-server-deployment.yml")) as
f:
dep = yaml.load(f)
k8s_beta = client.ExtensionsV1beta1Api()
resp = k8s_beta.patch_namespaced_deployment(name=d["deployment-name"],
body=dep, namespace="default")
print("Deployment created. status='%s'" % str(resp.status))
def inplace_change(filename, old_string, new_string):
with open(filename) as f:
s = f.read()
if old_string not in s:
# print '"{old_string}" not found in {filename}.'.format(**locals())
return
with open(filename, 'w') as f:
# print 'Changing "{old_string}" to "{new_string}" in
{filename}'.format(**locals())
s = s.replace(old_string, new_string)
f.write(s)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Deploy Frequently, and deploy small,
reversible changes.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Deploy Frequently, and deploy small,
reversible changes.
• Kubernetes Deployments resources
support roll-out histories.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
In Summary
• Deploy Frequently, and deploy small,
reversible changes.
• Kubernetes Deployments resources
support roll-out histories.
• Use liveness and readiness probes to
support reliable deployments.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GET api/v1/namespaces/aws-summit/tips/{summary}
• Understand what your networking
requirements are.
• There are lots of options available
for deploying clusters.
• It’s hard to know where you’re going
without know where you’ve come from,
logging and monitoring is critical!
• Strive for Operational Excellence.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Some Stuff For You …
Kubernetes on AWS Workshop
https://github.com/aws-samples/kubernetes-aws-workshop
Networking with Amazon EKS
https://aws.amazon.com/blogs/opensource/networking-foundation-
eks-aws-cni-calico/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Alexa, deploy a Kubernetes cluster for me!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
beaumonm@amazon.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Arun Gupta
 
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018Amazon Web Services
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)sriram_rajan
 
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
 
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
 
使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計Amazon Web Services
 
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...Amazon Web Services
 
Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKSMatthew Barlocker
 
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
 
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
 
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
 
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
 
Exciting world of Amazon container services with AWS Fargate and Amazon EKS
Exciting world of Amazon container services with AWS Fargate and Amazon EKSExciting world of Amazon container services with AWS Fargate and Amazon EKS
Exciting world of Amazon container services with AWS Fargate and Amazon EKSAmazon 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 into Container Networking (CON410-R1) - AWS re:Invent 2018
Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018
Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018Amazon 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
 

Was ist angesagt? (20)

Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018
Kubernetes Networking in Amazon EKS (CON412) - AWS re:Invent 2018
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (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 EKS Deep Dive
Amazon EKS Deep DiveAmazon EKS Deep Dive
Amazon EKS Deep Dive
 
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
 
使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計使用 Amazon EKS 打造高效的服務架構設計
使用 Amazon EKS 打造高效的服務架構設計
 
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...
Running a High-Performance Kubernetes Cluster with Amazon EKS (CON318-R1) - A...
 
Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWS
 
AWS Container services
AWS Container servicesAWS Container services
AWS Container 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 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
 
Run Kubernetes with Amazon EKS
Run Kubernetes with Amazon EKSRun Kubernetes with Amazon EKS
Run Kubernetes with 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
 
Exciting world of Amazon container services with AWS Fargate and Amazon EKS
Exciting world of Amazon container services with AWS Fargate and Amazon EKSExciting world of Amazon container services with AWS Fargate and Amazon EKS
Exciting world of Amazon container services with AWS Fargate and Amazon EKS
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
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 into Container Networking (CON410-R1) - AWS re:Invent 2018
Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018
Deep Dive into Container Networking (CON410-R1) - AWS re:Invent 2018
 
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
 

Ähnlich wie Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018

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
 
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
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Amazon Web Services
 
Aws container services overview
Aws container services overviewAws container services overview
Aws container services overviewPatricio Vazquez
 
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Amazon 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
 
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
 
Running Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech TalksRunning Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech TalksAmazon Web Services
 
CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2aspyker
 
[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
 
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...Amazon Web Services
 
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
 
Running Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech TalksRunning Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech TalksAmazon 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
 

Ähnlich wie Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018 (20)

SRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKSSRV318 Running Kubernetes with Amazon EKS
SRV318 Running Kubernetes with Amazon EKS
 
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
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
 
EKS Workshop
 EKS Workshop EKS Workshop
EKS Workshop
 
Aws container services overview
Aws container services overviewAws container services overview
Aws container services overview
 
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
 
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
 
Builders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering Kubernetes on AWSBuilders' Day- Mastering Kubernetes on AWS
Builders' Day- Mastering 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
 
Deep Dive into Amazon Fargate
Deep Dive into Amazon FargateDeep Dive into Amazon Fargate
Deep Dive into Amazon Fargate
 
Running Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech TalksRunning Kubernetes on AWS - AWS Online Tech Talks
Running Kubernetes on AWS - AWS Online Tech Talks
 
CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2CMP376 - Another Week, Another Million Containers on Amazon EC2
CMP376 - Another Week, Another Million Containers on Amazon EC2
 
[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
 
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
Another Week, Another Million Containers on Amazon EC2 (CMP376) - AWS re:Inve...
 
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...
 
Running Kubernetes on AWS
Running Kubernetes on AWSRunning Kubernetes on AWS
Running Kubernetes on AWS
 
Running Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech TalksRunning Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech Talks
 
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
 

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

Mehr von Amazon Web Services (20)

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

Expert Tips for Successful Kubernetes Deployment - AWS Summit Sydney 2018

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Mitch Beaumont Solutions Architect, Amazon Web Services Expert tips for successful Kubernetes deployments on AWS
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. We Give You The Power To Choose: ECS EKS EC2 Fargate EC2 Fargate 1. Choose your orchestration tool 2. Choose your launch type
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Started at Google • Influenced by Google Borg • Container Orchestrator • Contributed to the CNCF Kubernetes 101
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations as Code Annotated Documentation Frequent, small, reversible changes Refine operation procedures frequently Anticipate failure Learn from operational failures What does operational excellence look like on AWS?
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. $ kubectl get tips –n aws-summit
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GET api/v1/namespaces/aws-summit/tips/{1} Never build a Kubernetes Cluster the hard way!
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Options for Kubernetes cluster setup Community • Kops – kubernetes-aws.io • Kubeadm – toolkit for bootstrapping a cluster • Kubespray – set of tools for deploying K8s clusters. Enterprise • Elastic Container Service for Kubernetes (EKS) • Red Hat OpenShift Other options • CloudFormation, Terraform, Ansible, Puppet
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kops – Kubernetes Operations Community supported • SIG AWS • Kops office hours and Slack channel Generate CloudFormation or Terraform scripts kops create cluster --name cluster1.kubernetes-aws.io --zones ap-southeast-2a, ap-southeast-2b, ap-southeast-2c --master-count 3 --master-size m4.large --node-count 5 --state s3://kubernetes-aws-io --yes
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Op er a t i o n al Exc el len ce Sec u r i t y R el i a b i l i tyP er f o r m an ce Ef f i c i en cy C o s t O p t i m i s a t i o n M a s t er s et c d
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Elastic Container Service for Kubernetes mycluster.eks.amazonaws.com Availability Zone 1 Availability Zone 2 Availability Zone 3 Kubectl
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Elastic Container Service for Kubernetes Availability Zone 1 Availability Zone 2 Availability Zone 3 etcd Master etcd Master etcd Master AWS Managed Customer Managed
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. aws eks create-cluster --cluster-name summit-cluster --role-arn arn:aws:iam::1123581321:role/eks-vpc- EksServiceRole-21345589144 --vpc-id vpc-21345589144 --region us-west-2
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Community tools like Kops, kubeadm and kubespray help remove some of the effort.
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Community tools like Kops, kubeadm and kubespray help remove some of the effort. • Kops provisions infrastructure, as well as the Kubernetes cluster components.
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Community tools like Kops, kubeadm and kubespray help remove some of the effort. • Kops provisions infrastructure, as well as the Kubernetes cluster components. • Use CloudFormation or Terraform to manage Operations as Code.
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Community tools like Kops, kubeadm and kubespray help remove some of the effort. • Kops provisions infrastructure, as well as the Kubernetes cluster components. • Use CloudFormation or Terraform to manage Operations as Code. • EKS provides a fully managed masters and etcd. (control plane)
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GET api/v1/namespaces/aws-summit /tips/{2} Consider your networking options
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. “Every pod should have it’s own IP address, and all pods should be able to talk to one and other” Node Node Pod Pod Networking With Kubernetes
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What Is CNI Network Plugin Runtime Network • A way for Kubernetes to tell an underlying SDN that it wants to connect a container to a network. • Standards based pluggable architecture for container networking. • API for writing plugins to configure network interfaces for containers. • CNCF Project
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Popular Solutions For Kubernetes Networking 1 2 3 4 5 6 7 8 StarsonGithub
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ENI VPC Subnet – 172.16.18.0/24 Bridge Pod CIDR 10.244.10.0/24 Destination Via 10.244.10.0/24 172.16.18.101 10.244.11.0/24 172.16.18.102 … … Node IP 172.16.18.101 “50 Route Limit” AWS Route Table Networking With Kubenet
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Overlay Networks • Can't get enough IP space? (subnets not sized correctly) • Your existing network cannot handle the number of routes required (VPC route tables have a limit of 50 routes). • You want to tap in to additional capabilities that a specific overlay network provides – network policies
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. src: node dst: node ENI ENI VPC Subnet – 10.0.0.0/24 Instance 2 Bridge Bridge Flannel0 src: pod dst: pod Flannel0 Flannel Pod Cidr 10.244.0.0/16 Flannel Pod Cidr 10.244.0.0/16 Networking With Flannel
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Do I Need An Overlay Network?
  • 26. © 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 Networking With Amazon VPC CNI
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs kind: NetworkPolicy apiVersion: extensions/v1beta1 metadata: name: default-deny spec: podSelector: matchLabels: {} prod-namespace
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs kind: NetworkPolicy apiVersion: extensions/v1beta1 metadata: name: default-deny spec: podSelector: matchLabels: {} prod-namespace
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs prod-namespace apiVersion: extensions/v1beta1 kind: NetworkPolicy metadata: name: public-to-frontend spec: podSelector: matchLabels: role: frontend ingress: - from: - ipBlock: cidr: "0.0.0.0/0" ports: - protocol: TCP port: 80
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs prod-namespace apiVersion: extensions/v1beta1 kind: NetworkPolicy metadata: name: public-to-frontend spec: podSelector: matchLabels: role: frontend ingress: - from: - ipBlock: cidr: "0.0.0.0/0" ports: - protocol: TCP port: 80
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs prod-namespace apiVersion: extensions/v1beta1 kind: NetworkPolicy metadata: name: frontend-to-cats spec: podSelector: matchLabels: role: cats ingress: - from: - podSelector: matchLabels: role: “frontend” ports: - protocol: TCP port: 80
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Do I Achieve Segmentation? Frontend Cats Dogs prod-namespace apiVersion: extensions/v1beta1 kind: NetworkPolicy metadata: name: frontend-to-cats spec: podSelector: matchLabels: role: cats ingress: - from: - podSelector: matchLabels: role: “frontend” ports: - protocol: TCP port: 80
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • All pods need a real IP and must be able to communicate with each other.
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • All pods need a real IP and must be able to communicate with each other. • Kops defaults to Kubenet.
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • All pods need a real IP and must be able to communicate with each other. • Kops defaults to Kubenet. • Kubernetes adopted the CNI container networking standard.
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • All pods need a real IP and must be able to communicate with each other. • Kops defaults to Kubenet. • Kubernetes adopted the CNI container networking standard. • Amazon EKS supports the “amazon-vpc- cni” plugin.
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • All pods need a real IP and must be able to communicate with each other. • Kops defaults to Kubenet. • Kubernetes adopted the CNI container networking standard. • Amazon EKS supports the “amazon-vpc- cni” plugin. • Segmentation can be achieved using network policies.
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GET api/v1/namespaces/aws-summit/tips/{3} Monitor all the things!
  • 39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility About Your Kubernetes Cluster ApplicationContainerNodeCluster
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Building A Log Aggregator An open source data collector providing a unified logging layer, supported by 500+ plugins connecting to many types of systems. A distributed, RESTful search and analytics engine. (Amazon Elasticsearch) Lets you visualise your Elasticsearch data.
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. WorkerWorkerMaster WorkerWorkerMaster ASG AZ1 Region AZ2 ASG Amazon CloudWatch Logs Amazon Elasticsearch Service Kibana Fluentd DaemonSet Kubectl logs Elasticsearch (index), Fluentd (store), and Kibana (visualise) Logs
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Monitoring tools should compliment dynamic nature of containers.
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Monitoring tools should compliment dynamic nature of containers. • Application and cluster log data help us Learn from operational failures.
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Monitoring tools should compliment dynamic nature of containers. • Application and cluster log data help us Learn from operational failures. • It is essential that you Refine operation procedures frequently.
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Monitoring tools should compliment dynamic nature of containers. • Application and cluster log data help us Learn from operational failures. • It is essential that you Refine operation procedures frequently. • Partners like DataDog offer great solutions.
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GET api/v1/namespaces/aws-summit/tips/{4} Build, Ship, Run …
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Continuous Deployment to Kubernetes Developer AWS CodePipeline AWS CodeCommit AWS CodeBuild AWS Lambda Amazon ECR Kubernetes
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Continuous Deployment to Kubernetes Developer AWS CodePipeline AWS CodeCommit AWS CodeBuild AWS Lambda Amazon ECR Kubernetes • Code is committed to AWS CodeCommit. • PR created for review of changes. • Changes merged to master branch. • AWS CodePipeline detects changes and starts moving changes through the pipeline.
  • 49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Continuous Deployment to Kubernetes Developer AWS CodePipeline AWS CodeCommit AWS CodeBuild AWS Lambda Amazon ECR Kubernetes • AWS CodeBuild packages code changes and dependencies and builds a Docker image. • Other pipeline stages can be included to test code and the package, also using AWS CodeBuild. • The Docker Image is pushed to Amazon ECR.
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Continuous Deployment to Kubernetes Developer AWS CodePipeline AWS CodeCommit AWS CodeBuild AWS Lambda Amazon ECR Kubernetes • AWS CodePipeline invokes an AWS Lambda function which updates the Kubernetes deployment file with the image tag. • AWS Lambda invokes Kubernetes API (Python SDK) to update application deployment. • A rolling update is performed of the pods to match the Docker image that was created.
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. mport yaml, boto3, botocore, json, zipfile from os import path from kubernetes import client, config s3 = boto3.resource('s3') code_pipeline = boto3.client('codepipeline') ssm = boto3.client('ssm') def lambda_handler(event, context): cplJobId = event['CodePipeline.job']['id'] cplKey = event['CodePipeline.job']['data']['inputArtifacts'][0]['location']['s3Location']['objectKey'] cplBucket = event['CodePipeline.job']['data']['inputArtifacts'][0]['location']['s3Location']['bucketName'] s3.meta.client.download_file(cplBucket,cplKey,'/tmp/build.zip') zip_ref = zipfile.ZipFile('/tmp/build.zip', 'r') zip_ref.extractall('/tmp/') zip_ref.close() with open('/tmp/build.json') as json_data: d = json.load(json_data) s3.meta.client.download_file(d["template-bucket"], 'web-server-deployment.yml', '/tmp/web-server-deployment.yml') s3.meta.client.download_file(d["template-bucket"], 'config', '/tmp/config') print(d["repository-uri"], d["tag"], d["deployment-name"]) inplace_change("/tmp/web-server-deployment.yml", "$REPOSITORY_URI", d["repository-uri"]) inplace_change("/tmp/web-server-deployment.yml", "$TAG", d["tag"]) # Build config file from template and secrets in SSM CA = ssm.get_parameter(Name='CA', WithDecryption=True)["Parameter"]["Value"] CLIENT_CERT = ssm.get_parameter(Name='ClientCert', WithDecryption=True)["Parameter"]["Value"] CLIENT_KEY = ssm.get_parameter(Name='ClientKey', WithDecryption=True)["Parameter"]["Value"] inplace_change("/tmp/config", "$ENDPOINT", d["cluster-endpoint"]) inplace_change("/tmp/config", "$CA", CA) inplace_change("/tmp/config", "$CLIENT_CERT", CLIENT_CERT) inplace_change("/tmp/config", "$CLIENT_KEY", CLIENT_KEY) config.load_kube_config('/tmp/config') try: with open(path.join(path.dirname(__file__), "/tmp/web-server-deployment.yml")) as f: dep = yaml.load(f) k8s_beta = client.ExtensionsV1beta1Api() resp = k8s_beta.patch_namespaced_deployment(name=d["deployment-name"], body=dep, namespace="default") print("Deployment created. status='%s'" % str(resp.status)) code_pipeline.put_job_success_result(jobId=cplJobId) return 'Success' except Exception as e: code_pipeline.put_job_failure_result(jobId=cplJobId, failureDetails={'message': 'Job Failed', 'type': 'JobFailed'}) print(e) raise e def inplace_change(filename, old_string, new_string): with open(filename) as f: s = f.read() if old_string not in s: # print '"{old_string}" not found in {filename}.'.format(**locals()) return with open(filename, 'w') as f: # print 'Changing "{old_string}" to "{new_string}" in {filename}'.format(**locals()) s = s.replace(old_string, new_string) f.write(s) config.load_kube_config('/tmp/config') try: with open(path.join(path.dirname(__file__), "/tmp/web-server-deployment.yml")) as f: dep = yaml.load(f) k8s_beta = client.ExtensionsV1beta1Api() resp = k8s_beta.patch_namespaced_deployment(name=d["deployment-name"], body=dep, namespace="default") print("Deployment created. status='%s'" % str(resp.status)) def inplace_change(filename, old_string, new_string): with open(filename) as f: s = f.read() if old_string not in s: # print '"{old_string}" not found in {filename}.'.format(**locals()) return with open(filename, 'w') as f: # print 'Changing "{old_string}" to "{new_string}" in {filename}'.format(**locals()) s = s.replace(old_string, new_string) f.write(s)
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Deploy Frequently, and deploy small, reversible changes.
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Deploy Frequently, and deploy small, reversible changes. • Kubernetes Deployments resources support roll-out histories.
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Summary • Deploy Frequently, and deploy small, reversible changes. • Kubernetes Deployments resources support roll-out histories. • Use liveness and readiness probes to support reliable deployments.
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GET api/v1/namespaces/aws-summit/tips/{summary} • Understand what your networking requirements are. • There are lots of options available for deploying clusters. • It’s hard to know where you’re going without know where you’ve come from, logging and monitoring is critical! • Strive for Operational Excellence.
  • 56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Some Stuff For You … Kubernetes on AWS Workshop https://github.com/aws-samples/kubernetes-aws-workshop Networking with Amazon EKS https://aws.amazon.com/blogs/opensource/networking-foundation- eks-aws-cni-calico/
  • 57. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Alexa, deploy a Kubernetes cluster for me!
  • 58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! beaumonm@amazon.com