tectonic summit 2016: kubernetes 1.5 and beyond

149
Kubernetes 1.5 and Beyond David Aronchick Product Manager at Google Container Engine & Kubernetes

Upload: coreos

Post on 08-Jan-2017

173 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes 1.5 and BeyondDavid Aronchick

Product Manager at Google Container Engine & Kubernetes

Page 2: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Velocity

1.0

1.1

1.2

1.3

Tota

l Com

mit

s

1.5

Commits Since July 2014

1.4

Page 3: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Adoption

~4k Commits

in 1.5

+25% Unique

Contributors

Top 0.01% of all Github Projects

3500+ ExternalProjects

Based on K8s

Companies Contributing

Companies Using

Page 4: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Give Everyone the Power to Run Agile, Reliable, Distributed

Systems at Scale

Page 5: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Introducing Kubernetes 1.5

Page 6: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes 1.5 Enterprise Highlights

Simple Setup (including multiple clusters!)

Sophisticated Scheduling

Network policy

Helm for application installation

Page 7: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Problem: Setting up a Kubernetes cluster is hard

Today: Use kube-up.sh (and hope you don’t have to

customize)Compile from HEAD and manually address securityUse a third-party tool (some of which are great!)

Simplified Setup

Page 8: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

Page 9: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm init

Page 10: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm initKubernetes master initialized successfully!You can now join any number of nodes by running the following command:kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

Page 11: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm initKubernetes master initialized successfully!You can now join any number of nodes by running the following command:kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

node-01.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cninode-01.myco.com# kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

Page 12: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm initKubernetes master initialized successfully!You can now join any number of nodes by running the following command:kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

node-01.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cninode-01.myco.com# kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3Node join complete.

Page 13: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm initKubernetes master initialized successfully!You can now join any number of nodes by running the following command:kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

node-01.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cninode-01.myco.com# kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3Node join complete.

master.myco.com# kubectl apply -f https://git.io/weave-kube

Page 14: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubeadm!

Simplified Setup

master.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cnimaster.myco.com# kubeadm initKubernetes master initialized successfully!You can now join any number of nodes by running the following command:kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3

node-01.myco.com# apt-get install -y kubelet kubeadm kubectl kubernetes-cninode-01.myco.com# kubeadm join --token 48b69e.b61e2d0dd5c 10.140.0.3Node join complete.

master.myco.com# kubectl apply -f https://git.io/weave-kubeNetwork setup complete.

Page 15: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Problem: Using multiple-clusters is hard

Today: Clusters as multiple independent silosUse Kubernetes federation from scratch

Simplified Setup: Federation Edition

Page 16: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

Page 17: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"

Page 18: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

Page 19: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowship

Page 20: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowshipswitched to context "Fellowship”

Page 21: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowshipswitched to context "Fellowship”

dc1.example.com# kubefed join gondor --host-cluster-context=fellowship

Page 22: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowshipswitched to context "Fellowship”

dc1.example.com# kubefed join gondor --host-cluster-context=fellowshipCluster “Gonder” joined to federation “Rivendell”.

Page 23: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowshipswitched to context "Fellowship”

dc1.example.com# kubefed join gondor --host-cluster-context=fellowshipCluster “Gonder” joined to federation “Rivendell”.

dc1.example.com# kubectl create -f multi-cluster-deployment.yml

Page 24: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: kubefed!

Simplified Setup: Federation Edition

dc1.example.com# kubefed init fellowship --host-cluster-context=rivendell --dns-zone-name="example.com"Federation “Rivendell” created.

dc1.example.com# kubectl config use-context fellowshipswitched to context "Fellowship”

dc1.example.com# kubefed join gondor --host-cluster-context=fellowshipCluster “Gonder” joined to federation “Rivendell”.

dc1.example.com# kubectl create -f multi-cluster-deployment.ymldeployment "multi-cluster-deployment" created

Page 25: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling

Problem: Deploying and managing workloads on large, heterogenous clusters is hard

Today: Liberal use of labels (and keeping your team in

sync)Manual toolingDidn’t you use Kubernetes to avoid this?

Page 26: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Sophisticated Scheduling!

Taints/tolerationsForgivenessDisruption budget

Sophisticated Scheduling

Page 27: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

SCENARIO: Specialized Hardware

Page 28: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

SCENARIO: Specialized Hardware

Page 29: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

SCENARIO: Specialized Hardware

Page 30: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

Any node with 4GB is good with me!

SCENARIO: Specialized Hardware

Page 31: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

SCENARIO: Specialized Hardware

Page 32: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 2(Need 4 GB + 2 GPU)

Node 3(4GB)

Pod 1(Need 4

GB)

SCENARIO: Specialized Hardware

Page 33: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 2(Need 4 GB + 2 GPU)

Node 3(4GB)

Oh noes! I guess I’ll have to give up.

Pod 1(Need 4

GB)

SCENARIO: Specialized Hardware

Page 34: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 2(Need 4 GB + 2 GPU)

Node 3(4GB)

I guess I’ll go with one of these nodes.

Pod 1(Need 4

GB)

SCENARIO: Specialized Hardware

Page 35: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

SCENARIO: Specialized Hardware

Page 36: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

I am very unhappy.

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

SCENARIO: Specialized Hardware

Page 37: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

I am very unhappy.

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

SCENARIO: Specialized Hardware

Page 38: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

taint: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 39: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

taint: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 40: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

taint: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 41: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

taint: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 42: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Pod 1(Need 4

GB)

Node 3(4GB)

I’ll try to avoid nodes with GPUs (but may end up there anyway)

taint: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 43: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Page 44: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

SCENARIO: Specialized Hardware

Pod 2(Need 4 GB + 2 GPU)

toleration: key: GPU effect: PreferNoSchedule

Page 45: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

toleration: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 46: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Yay! There’s a spot that’s a perfect fit!Pod 2

(Need 4 GB + 2 GPU)

toleration: key: GPU effect: PreferNoSchedule

SCENARIO: Specialized Hardware

Page 47: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

SCENARIO: Specialized Hardware

Page 48: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

SCENARIO: Specialized Hardware

We are both happy!We are both happy!

Page 49: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(4GB + 2 GPU)

Node 2(4GB)

Kubernetes Cluster

Node 3(4GB)

Pod 1(Need 4

GB)

Pod 2(Need 4 GB + 2 GPU)

We are both happy!We are both happy!

SCENARIO: Specialized Hardware

Page 50: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

SCENARIO: Reserved instances

Page 51: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

taint: key: user value: specialTeam effect: NoSchedule

SCENARIO: Reserved instances

Page 52: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

taint: key: user value: specialTeam effect: NoSchedule

SCENARIO: Reserved instances

Page 53: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

taint: key: user value: specialTeam effect: NoSchedule

SCENARIO: Reserved instancesPremiu

mPod

toleration: key: “user” value: specialTeam effect: NoSchedule

Premium

Pod

Page 54: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

taint: key: user value: specialTeam effect: NoSchedule

SCENARIO: Reserved instancesPremiu

mPod

toleration: key: “user” value: specialTeam effect: NoSchedule

Premium

Pod

Page 55: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

We can go anywhere!

taint: key: user value: specialTeam effect: NoSchedule

SCENARIO: Reserved instancesPremiu

mPod

toleration: key: “user” value: specialTeam effect: NoSchedule

Premium

Pod

Page 56: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

Premium

Pod

RegularPod

Premium

Pod

SCENARIO: Reserved instances

Page 57: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

Premium

Pod

RegularPod

Premium

Pod

SCENARIO: Reserved instances

Page 58: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1(Premium)

Node 2(Premium)

Kubernetes Cluster

Node 3(Regular)

I will fail to schedule even though there’s a spot for me.

Premium

Pod

RegularPod

Premium

Pod

SCENARIO: Reserved instances

Page 59: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

TPM

SCENARIO: Ensuring node meets spec

Page 60: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

SCENARIO: Ensuring node meets spec

Page 61: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

SCENARIO: Ensuring node meets spec

Page 62: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

I must wait until a node is available and trusted.

TPM

SCENARIO: Ensuring node meets spec

Page 63: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

I must wait until a node is available and trusted.

SCENARIO: Ensuring node meets spec

Page 64: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

I must wait until a node is available and trusted.

SCENARIO: Ensuring node meets spec

Page 65: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

I must wait until a node is available and trusted.

SCENARIO: Ensuring node meets spec

Page 66: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

TPM

I must wait until a node is available and trusted.

SCENARIO: Ensuring node meets spec

Page 67: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

I can be scheduled!

TPM

SCENARIO: Ensuring node meets spec

Page 68: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Pod

Node 3

I can be scheduled!

TPM

Pod

SCENARIO: Ensuring node meets spec

Page 69: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

TPM

Pod

SCENARIO: Ensuring node meets spec

Page 70: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

PodAPIServer

SCENARIO: Hardware failing (but not failed)

Page 71: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

PodAPIServer

SCENARIO: Hardware failing (but not failed)

Page 72: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

PodAPIServer

SCENARIO: Hardware failing (but not failed)

Page 73: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Taints/Toleration

Node 1 Node 2

Kubernetes Cluster

Node 3

PodAPIServer

This node’s disk is failing!

SCENARIO: Hardware failing (but not failed)

Page 74: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

APIServer

Taint thenode

SCENARIO: Hardware failing (but not failed)

Page 75: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

APIServer

Taint thenode

SCENARIO: Hardware failing (but not failed)

Page 76: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

APIServer

SCENARIO: Hardware failing (but not failed)

Taint thenode

Page 77: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

Schedule new pod and kill the old one

APIServer

SCENARIO: Hardware failing (but not failed)

Page 78: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

Schedule new pod and kill the old one

NewPod

APIServer

SCENARIO: Hardware failing (but not failed)

Page 79: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Node 1

Pod

Kubernetes Cluster

Node 2 Node 3

Sophisticated Scheduling: Taints/Toleration

Schedule new pod and kill the old one

NewPod

APIServer

SCENARIO: Hardware failing (but not failed)

Page 80: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Pod(t=5m)

All is well.

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 81: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 1m since I heard from Node 1

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 82: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 2m since I heard from Node 1

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 83: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 3m since I heard from Node 1

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 84: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 4m since I heard from Node 1

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 85: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 5m since I heard from Node 1

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 86: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

!!!

Pod(t=5m)

Pod(t=30m

)API

Server

SCENARIO: Supporting network failure

Page 87: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Treat pod as dead &

schedule new 5m Pod

Pod(t=30m

)API

ServerPod

(t=5m)

SCENARIO: Supporting network failure

Page 88: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Treat pod as dead &

schedule new 5m Pod

Pod(t=30m

)API

ServerPod

(t=5m)

SCENARIO: Supporting network failure

Page 89: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Treat pod as dead &

schedule new 5m Pod

Pod(t=30m

)API

ServerPod

(t=5m)Pod

(t=5m)

SCENARIO: Supporting network failure

Page 90: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Treat pod as dead &

schedule new 5m Pod

Pod(t=30m

)API

ServerPod

(t=5m)Pod

(t=5m)

SCENARIO: Supporting network failure

Page 91: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

It’s been 30m since I heard from

Node 1

Pod(t=30m

)API

ServerPod

(t=5m)Pod

(t=5m)

SCENARIO: Supporting network failure

Page 92: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

Pod(t=30m

)API

ServerPod

(t=5m)

!!!

Pod(t=5m)

SCENARIO: Supporting network failure

Page 93: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Pod(t=5m)

Treat pod as dead &

schedule a new 30m pod

Pod(t=5m)

Pod(t=30m

)

SCENARIO: Supporting network failure

Page 94: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Pod(t=5m)

Treat pod as dead &

schedule a new 30m pod

Pod(t=5m)

Pod(t=30m

)

SCENARIO: Supporting network failure

Page 95: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Pod(t=5m)

Treat pod as dead &

schedule a new 30m pod

Pod(t=5m)

Pod(t=30m

)

SCENARIO: Supporting network failure

Page 96: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Pod(t=5m)

Treat pod as dead &

schedule a new 30m pod

Pod(t=5m)

Pod(t=30m

)

Pod(t=30m

)

SCENARIO: Supporting network failure

Page 97: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Forgiveness

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Pod(t=5m)

Treat pod as dead &

schedule a new 30m pod

Pod(t=5m)

Pod(t=30m

)

Pod(t=30m

)

SCENARIO: Supporting network failure

Page 98: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

Server

Time to upgrade to Kubernetes

1.5!

Two Pod

Set (B)

SCENARIO: Cluster upgrades with stateful workloads

Page 99: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

“Evict A!”

SCENARIO: Cluster upgrades with stateful workloads

Page 100: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)“Shut down”

SCENARIO: Cluster upgrades with stateful workloads

Page 101: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

SCENARIO: Cluster upgrades with stateful workloads

Page 102: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

“Evict B!”

SCENARIO: Cluster upgrades with stateful workloads

Page 103: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

“Sorry, can’t!”

SCENARIO: Cluster upgrades with stateful workloads

Page 104: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

SCENARIO: Cluster upgrades with stateful workloads

Page 105: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

SCENARIO: Cluster upgrades with stateful workloads

Page 106: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

Two Pod

Set (A)API

ServerTwo Pod

Set (B)

“Ok, now Evict B!”

SCENARIO: Cluster upgrades with stateful workloads

Page 107: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Two Pod

Set (B)

“OK!”

Two Pod

Set (A)

SCENARIO: Cluster upgrades with stateful workloads

Page 108: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Two Pod

Set (B)

Two Pod

Set (A)“Shutdown”

SCENARIO: Cluster upgrades with stateful workloads

Page 109: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Sophisticated Scheduling: Disruption Budget

Node 1 Node 2

Kubernetes Cluster

Node 3

APIServer

Two Pod

Set (B)

Two Pod

Set (A)

SCENARIO: Cluster upgrades with stateful workloads

Page 110: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy

Problem: Network policy is complicated!

Today: Use VM tooling to support security (but limit VM

utilization)Managing port level securityProxy-ing everything

Page 111: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Network Policy Object!

Network Policy

Page 112: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy Object

VM 1 VM 2 VM 3

SCENARIO: Two-tier app needs to be locked down

Page 113: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy Object

VM 1 VM 2 VM 3

SCENARIO: Two-tier app needs to be locked down

Page 114: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy Object

VM 1 VM 2 VM 3

SCENARIO: Two-tier app needs to be locked down

Page 115: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy Object

VM 1 VM 2 VM 3

SCENARIO: Two-tier app needs to be locked down

Page 116: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Network Policy Object

VM 1 VM 2 VM 3

SCENARIO: Two-tier app needs to be locked down

Page 117: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

Page 118: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

Page 119: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

??

Page 120: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

??

Page 121: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

?

???

Page 122: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

?

???

Nothing can talk to

anything!

Page 123: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

Nothing can talk to

anything!

Page 124: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

“Green” can talk to “Red”

Page 125: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

“Green” can talk to “Red”

Page 126: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

“Green” can talk to “Red”

Page 127: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes Cluster

Network Policy ObjectSCENARIO: Two-tier app needs to be locked down

VM 1 VM 2 VM 3

“Green” can talk to “Red”

Page 128: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Problem: I need to deploy complicated apps!

Today:Manually deploy applications once per clusterManually publish global endpoints and load balanceBuild a control plane for monitoring application

Helm

Page 129: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Think “apt-get/yum”Supports Kubernetes objects natively

DeploymentsDaemonSetsSecrets & configMulti-tier appsUpgrades

Helm

Page 130: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Helm

DaemonSets: DataDog

Node 1 Node 2

Kubernetes Cluster

Node 3

Page 131: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Helm

DaemonSets: DataDog

Node 1 Node 2

Kubernetes Cluster

Node 3

helm install --name datadog --set datadog.apiKey=<APIKEY> stable/datadog

Page 132: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Helm

DaemonSets: DataDog

Node 1 Node 2

Kubernetes Cluster

Node 3

helm install --name datadog --set datadog.apiKey=<APIKEY> stable/datadog

Page 133: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Helm

Page 134: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Helm

Page 135: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Helm

Page 136: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Helm

Page 137: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Solution: Helm - The Package manager for Kubernetes

Helm

helm install sapho

Page 138: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Page 139: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Management of storage and data for stateful applications on Kubernetes

Page 140: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Management of storage and data for stateful applications on KubernetesManagement of Kubernetes at enterprise scale

Page 141: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Container-optimized servers for compute and storage

Management of storage and data for stateful applications on KubernetesManagement of Kubernetes at enterprise scale

Page 142: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Container-optimized servers for compute and storage

Management of storage and data for stateful applications on KubernetesManagement of Kubernetes at enterprise scale

+

Page 143: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Accelerating Stateful Applications

Container-optimized servers for compute and storage

Management of storage and data for stateful applications on KubernetesManagement of Kubernetes at enterprise scale

+

Automated Stateful Apps on K8S

Page 144: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

What’s Next

Page 145: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

What’s Next

Page 146: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

What’s Next

Nothing!*

Page 147: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

What’s Next

Nothing!*

* for large values of “Nothing”

Page 148: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

What’s Next

Nothing!*

* for large values of “Nothing”

Bringing many features from alpha to beta & GA, including:Federated deployments and daemon setsImproved RBACStatefulSet upgrades

Improved scaling & etcd 3

Easy cluster setup for high availability configuration

Integrated Metrics API

Page 149: Tectonic Summit 2016: Kubernetes 1.5 and Beyond

Kubernetes is Open• open community• open design• open source• open to ideas

Twitter: @aronchickEmail: [email protected]

• kubernetes.io• github.com/kubernetes/kubernetes• slack.kubernetes.io• twitter: @kubernetesio