Slide 1

Slide 1 text

What’s New in K8s 1.3 Carter Morgan @_askcarter @_askcarter

Slide 2

Slide 2 text

Background: 3 Hurdles @_askcarter

Slide 3

Slide 3 text

The App How do I write scalable apps? How do I package and distribute? What runtimes am I locked into? @_askcarter

Slide 4

Slide 4 text

The Infra Can I scale? Is it automatic? Am I locked in? @_askcarter

Slide 5

Slide 5 text

The Wild Where are my machines? How do I update? @_askcarter

Slide 6

Slide 6 text

Kubernetes Open Source Container Automation Framework • Open API • Based on Google’s experiences @_askcarter

Slide 7

Slide 7 text

3 Claims @_askcarter

Slide 8

Slide 8 text

How does k8s hold up? @_askcarter

Slide 9

Slide 9 text

Kubernetes Pre 1.3 Horizontal Scaling Automated Rollbacks Container Scheduling Resource Quotas and Limits Self-healing Service Discovery and Load Balancing Secret and Configuration Management Daemon Sets Secrets and Config Maps Deployments (already had a lot) @_askcarter

Slide 10

Slide 10 text

monolith nginx hello nginx Microservices Monolith auth @_askcarter

Slide 11

Slide 11 text

Container Based Photo © ptnimages via Canva.com @_askcarter

Slide 12

Slide 12 text

Pods Logical Application • One or more containers and volumes • Shared namespaces • One IP per pod Pod nginx monolith NFS iSCSI GCE 10.1.0.100 @_askcarter

Slide 13

Slide 13 text

Labels Arbitrary metadata attached to any API object • Queryable by Selectors • How Kubernetes does grouping Pod nginx monolith Pod nginx monolith labels: version: v1 track: stable labels: version: v1 track: test @_askcarter

Slide 14

Slide 14 text

Labels selector: version=v1 Pod nginx monolith Pod nginx monolith labels: version: v1 track: stable labels: version: v1 track: test @_askcarter

Slide 15

Slide 15 text

Labels selector: track=stable Pod nginx monolith Pod nginx monolith labels: version: v1 track: stable labels: version: v1 track: test @_askcarter

Slide 16

Slide 16 text

Services Persistent IPs for Pods • Uses Labels to Target Pods • Internal or External IPs Pod nginx monolith Pod nginx monolith Service 10.8.244.100 10.1.0.2 10.1.0.1 @_askcarter

Slide 17

Slide 17 text

Deployments Drive current state towards desired state Node 1 Pod app: hello replicas: 1 hello Node 2 @_askcarter

Slide 18

Slide 18 text

Deployments Drive current state towards desired state Node 1 Pod app: hello replicas: 2 hello Node 2 Pod hello @_askcarter

Slide 19

Slide 19 text

Deployments Drive current state towards desired state Node 1 Pod app: hello replicas: 2 hello Node 2 @_askcarter

Slide 20

Slide 20 text

Deployments Drive current state towards desired state Node 1 Pod app: hello replicas: 2 hello Node 2 Pod hello @_askcarter

Slide 21

Slide 21 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Pod hello Node Pod hello Service @_askcarter

Slide 22

Slide 22 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Pod hello Node Pod hello Service Pod goodbye @_askcarter

Slide 23

Slide 23 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Pod hello Node Pod hello Service Pod goodbye @_askcarter

Slide 24

Slide 24 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Pod hello Node Pod hello Service Pod goodbye @_askcarter

Slide 25

Slide 25 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Pod hello Service Pod goodbye Pod goodbye @_askcarter

Slide 26

Slide 26 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Pod hello Service Pod goodbye Pod goodbye @_askcarter

Slide 27

Slide 27 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Pod hello Service Pod goodbye Pod goodbye @_askcarter

Slide 28

Slide 28 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Service Pod goodbye Pod goodbye @_askcarter

Slide 29

Slide 29 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Service Pod goodbye Pod goodbye Pod goodbye @_askcarter

Slide 30

Slide 30 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Service Pod goodbye Pod goodbye Pod goodbye @_askcarter

Slide 31

Slide 31 text

Rolling Update Node 1 Pod hello Pod hello Node Pod hello Node Node Service Pod goodbye Pod goodbye Pod goodbye @_askcarter

Slide 32

Slide 32 text

Rolling Update Node 1 Pod hello Pod hello Node Node Node Service Pod goodbye Pod goodbye Pod goodbye @_askcarter

Slide 33

Slide 33 text

3 Claims: revisited @_askcarter

Slide 34

Slide 34 text

Kubernetes 1.3 @_askcarter

Slide 35

Slide 35 text

Kubernetes 1.3 @_askcarter

Slide 36

Slide 36 text

Kubernetes 1.3 Init containers (alpha) Fixed PDs Cluster Federation (alpha) Optional HTTP2 Pod Level QoS Policy Tls secrets kubectl set command UI Jobs RBAC (alpha, experimental) Garbage Collector (alpha) Pet Sets rkt Container runtime Network policies (and more) @_askcarter

Slide 37

Slide 37 text

Cluster Federation Manage clusters across region and providers @_askcarter

Slide 38

Slide 38 text

Jobs Pods *expected* to terminate Creates 1...n Pods and ensures that a certain number of them run to completion 3 types: non-parallel, fixed count parallel, and parallel with a work queue @_askcarter

Slide 39

Slide 39 text

Job: Work Queue with Pod Per Work Item @_askcarter

Slide 40

Slide 40 text

Init Containers Sequential Pod Initialization @_askcarter Pod Init 1 monolith NFS 10.1.0.100 Init 2 Init 3

Slide 41

Slide 41 text

Init Container: register pod to external service @_askcarter

Slide 42

Slide 42 text

Init Container: clone a git repo into a volume @_askcarter

Slide 43

Slide 43 text

Pet Sets Pods with ego Pods are fungible, stateless? Pets are Pods with: 1. Stable hostname 2. A unique name 3. Stable storage @_askcarter

Slide 44

Slide 44 text

Pet Sets Pods with ego @_askcarter

Slide 45

Slide 45 text

PetSet: example manifest @_askcarter

Slide 46

Slide 46 text

PetSet: headless service @_askcarter

Slide 47

Slide 47 text

Bonus @_askcarter

Slide 48

Slide 48 text

Google Container Engine (GKE) Cluster autoscaling (beta) IAM support Local SSD Container-VM Images (beta) Node pools @_askcarter

Slide 49

Slide 49 text

minikube github.com/kubernetes/minikube @_askcarter

Slide 50

Slide 50 text

Kube UI kubernetes.io/docs/user-guide/ui/ @_askcarter

Slide 51

Slide 51 text

Thing I learned (making this talk) (making this talk) @_askcarter

Slide 52

Slide 52 text

Recap @_askcarter

Slide 53

Slide 53 text

3 Hurdles The App The Infra The Wild @_askcarter

Slide 54

Slide 54 text

3 Claims Planet Scale Never Outgrow Run Anywhere @_askcarter

Slide 55

Slide 55 text

Kubernetes 1.3 Planet Scale - SLA 2000 nodes Never Outgrow - minikube to prod Run Anywhere - Cluster Federation @_askcarter

Slide 56

Slide 56 text

Scalable Microservice with Kubernetes @_askcarter

Slide 57

Slide 57 text

Carter Morgan @_askcarter Learn more here! http://blog.kubernetes.io/2016/07/kubernetes-1.3-bridging-cloud-native-and-enterprise-workloads.html @_askcarter