+ All Categories
Home > Technology > Kube-AWS

Kube-AWS

Date post: 23-Jan-2018
Category:
Upload: coreos
View: 660 times
Download: 0 times
Share this document with a friend
29
Colin Hom - Infrastructure Engineer github.com/colhom | colin.hom@coreos.com Kube-AWS: Production Kubernetes Clusters on AWS
Transcript
Page 1: Kube-AWS

Colin Hom - Infrastructure Engineergithub.com/colhom | [email protected]

Kube-AWS: Production Kubernetes Clusters on AWS

Page 2: Kube-AWS

Design Goals

Artifacts should be:

Page 3: Kube-AWS

Design Goals

Artifacts should be:

Secure

Page 4: Kube-AWS

Design Goals

Artifacts should be:

Secure

Reproducible

Page 5: Kube-AWS

Design Goals

Artifacts should be:

Secure

Reproducible

Auditable

Page 6: Kube-AWS
Page 7: Kube-AWS

CloudEC2, VPC, IAM, security groups,

Autoscaling groups

Page 8: Kube-AWS

CloudEC2, VPC, IAM, security groups,

Autoscaling groups

Hostdocker, flannel,

etcd

Page 9: Kube-AWS

CloudEC2, VPC, IAM, security groups,

Autoscaling groups

Hostdocker, flannel,

etcd

Clusterhyperkube

Page 10: Kube-AWS

CloudEC2, VPC, IAM, security groups,

Autoscaling groups

Hostdocker, flannel,

etcd

Clusterhyperkube

containers: - name: cat-pics-server image: quay.io/colin_hom/cat-pics:latest

Page 11: Kube-AWS

“Under the hood” demo

Page 12: Kube-AWS

$ kube-aws init \--cluster-name=demo-chom \--external-dns-name=my-cluster-endpoint \--region=us-west-1 \--availability-zone=us-west-1c \--key-name=key-pair-name \--kms-key-arn="arn:aws:kms:us-west-1:xxxxxxxxxx:key/xxxxxxxxxxxxxxxxxxx"

$ ls -R . > cluster.yaml

Step 1.

Initialize yourcluster configuration

Under the hood

Page 13: Kube-AWS

Under the hoodcluster.yaml

1.init

clusterName: demo-chom

externalDNSName: demo.coreos.com

availabilityZone: us-west-1c

#workerCount: 1

#workerInstanceType: m3.medium

#controllerInstanceType: m3.medium

Page 14: Kube-AWS

$ kube-aws render

$ ls -R . > userdata/ > credentials/ > stack-template.json > cluster.yaml > kubeconfig

Step 2.

Render cluster assets

Under the hood

Page 15: Kube-AWS

Under the hood

init

cluster.yaml

render

user data

TLS credentials

stack template

1. 2.

Page 16: Kube-AWS

Under the hood

init

cluster.yaml

render

user data

TLS credentials

stack template

1. 2.

"AutoScaleWorker": { "Properties": { "AvailabilityZones": [

"{{.AvailabilityZone}}"

], "DesiredCapacity": "{{.WorkerCount}}",….}

Page 17: Kube-AWS

$ kube-aws up

…. (get coffee)

$ kubectl get nodes > NAME STATUS AGE > node-1 READY 10m

Step 3.

Push the button!

Under the hood

Page 18: Kube-AWS

Under the hood

init

cluster.yaml

render

user data

TLS credentials

stack template

1. 2.

up

3.

stack template

user data

TLS credentials

Page 19: Kube-AWS

Under the hood

init

cluster.yaml

render

user data

TLS credentials

stack template

1. 2.

up

3.

stack template

user data

TLS credentials

Page 20: Kube-AWS

$ kube-aws up --export> Exporting demo-chom.stack-template.json

$ git add my-cluster.stack-template.json

$ git commit -am “first pass at my cluster!”

Step 4.

Save your state!

Under the hood

Page 21: Kube-AWS

render

Under the hood

init

cluster.yaml

user data

TLS credentials

stack template

1. 2.

up

3. j

stack template

user data

TLS credentials

4.

export

Page 22: Kube-AWS

Design Goals

Secure

Reproducible

Auditable

Page 23: Kube-AWS

$ git diff> --- a/cluster.yaml +++ b/cluster.yaml

# Instance type for worker nodes -#workerInstanceType: m3.medium +workerInstanceType: m3.large

$ kube-aws up --export

> Exporting demo-chom.stack-template.json

Let’s make some changes!Change the worker instance type from m3.medium to m3.large

Page 24: Kube-AWS

$ git diff> # Instance type for worker nodes -#workerInstanceType: m3.medium +workerInstanceType: m3.large

$ kube-aws up --export

> Exporting demo-chom.stack-template.json

Let’s make some changes!Change the worker instance type from m3.medium to m3.large

Page 25: Kube-AWS

$ git diff> # Instance type for worker nodes -#workerInstanceType: m3.medium +workerInstanceType: m3.large

$ kube-aws up --export

> Exporting demo-chom.stack-template.json

Let’s make some changes!Change the worker instance type from m3.medium to m3.large

Page 26: Kube-AWS

$ git diff> # Instance type for worker nodes -#workerInstanceType: m3.medium +workerInstanceType: m3.large

$ kube-aws up --export

> Exporting demo-chom.stack-template.json

$ git commit -am “workers are m3.large”

Let’s make some changes!Change the worker instance type from m3.medium to m3.large

Page 27: Kube-AWS

$ git diff HEAD~1 c542d5d8f20f6c059dfccc2b147f0097b1656381Author: Colin Hom <[email protected]>Date: Thu Apr 28 13:37:45 2016 -0700 # Instance type for worker nodes -#workerInstanceType: m3.medium +workerInstanceType: m3.large

j

Let’s make some changes!

Page 28: Kube-AWS

Road to Version 1.0Recently Completed:

- Calico for network policy- Route53 Integration- Existing VPC support

Future Work:

- Zero-downtime upgrade path- HA control plane- Automated TLS rotation

Page 29: Kube-AWS

github.com/coreos/coreos-kubernetes

Colin Homgithub.com/colhom | [email protected] | coreos.com

We’re hiring in all departments! Email: [email protected] Positions: coreos.com/ careers


Recommended