Top Banner
What’s New in K8s 1. 3 Carter Morgan @_askcarter @_askcarter
57

What’s new in k8s 1.3

Jan 19, 2017

Download

Engineering

Carter Morgan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: What’s new in k8s 1.3

What’s New in K8s 1.3

Carter Morgan@_askcarter

@_askcarter

Page 2: What’s new in k8s 1.3

Background: 3 Hurdles

@_askcarter

Page 3: What’s new in k8s 1.3

The AppHow do I write scalable apps?

How do I package and distribute?

What runtimes am I locked into?

@_askcarter

Page 4: What’s new in k8s 1.3

The InfraCan I scale?

Is it automatic?

Am I locked in?

@_askcarter

Page 5: What’s new in k8s 1.3

The Wild Where are my machines?

How do I update?

@_askcarter

Page 6: What’s new in k8s 1.3

Kubernetes

Open Source Container Automation Framework

• Open API

• Based on Google’s experiences

@_askcarter

Page 7: What’s new in k8s 1.3

3 Claims

@_askcarter

Page 8: What’s new in k8s 1.3

How does k8s hold up?

@_askcarter

Page 9: What’s new in k8s 1.3

Kubernetes Pre 1.3

Horizontal ScalingAutomated RollbacksContainer SchedulingResource Quotas and LimitsSelf-healingService Discovery and Load BalancingSecret and Configuration ManagementDaemon SetsSecrets and Config MapsDeployments

(already had a lot)

@_askcarter

Page 10: What’s new in k8s 1.3

monolith

nginx

hello

nginx

Microservices

Monolith

auth

@_askcarter

Page 11: What’s new in k8s 1.3

Container BasedPhoto © ptnimages via Canva.com

@_askcarter

Page 12: What’s new in k8s 1.3

PodsLogical Application• One or more containers

and volumes• Shared namespaces• One IP per pod Pod

nginx

monolith

NFSiSCSIGCE

10.1.0.100

@_askcarter

Page 13: What’s new in k8s 1.3

LabelsArbitrary metadata attached to any API object• Queryable by Selectors• How Kubernetes does

groupingPod

nginx

monolith

Pod

nginx

monolith

labels: version: v1 track: stable

labels: version: v1 track: test

@_askcarter

Page 14: What’s new in k8s 1.3

Labels

selector: version=v1Pod

nginx

monolith

Pod

nginx

monolith

labels: version: v1 track: stable

labels: version: v1 track: test

@_askcarter

Page 15: What’s new in k8s 1.3

Labels

selector: track=stablePod

nginx

monolith

Pod

nginx

monolith

labels: version: v1 track: stable

labels: version: v1 track: test

@_askcarter

Page 16: What’s new in k8s 1.3

ServicesPersistent IPs for Pods• Uses Labels to

Target Pods• Internal or External IPs

Pod

nginx

monolith

Pod

nginx

monolith

Service10.8.244.100

10.1.0.210.1.0.1

@_askcarter

Page 17: What’s new in k8s 1.3

DeploymentsDrive current state towards desired state

Node 1

Pod

app: hello replicas: 1

hello

Node 2

@_askcarter

Page 18: What’s new in k8s 1.3

DeploymentsDrive current state towards desired state

Node 1

Pod

app: hello replicas: 2

hello

Node 2

Podhello

@_askcarter

Page 19: What’s new in k8s 1.3

DeploymentsDrive current state towards desired state

Node 1

Pod

app: hello replicas: 2

hello

Node 2

@_askcarter

Page 20: What’s new in k8s 1.3

DeploymentsDrive current state towards desired state

Node 1

Pod

app: hello replicas: 2

hello

Node 2

Podhello

@_askcarter

Page 21: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

Node

Podhello

Node

Podhello

Service

@_askcarter

Page 22: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

Node

Podhello

Node

Podhello

Service

Podgoodbye

@_askcarter

Page 23: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

Node

Podhello

Node

Podhello

Service

Podgoodbye

@_askcarter

Page 24: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

Node

Podhello

Node

Podhello

Service

Podgoodbye

@_askcarter

Page 25: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Podhello

Service

Podgoodbye

Podgoodbye

@_askcarter

Page 26: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Podhello

Service

Podgoodbye

Podgoodbye

@_askcarter

Page 27: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Podhello

Service

Podgoodbye

Podgoodbye

@_askcarter

Page 28: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Service

Podgoodbye

Podgoodbye

@_askcarter

Page 29: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Service

Podgoodbye

Podgoodbye

Podgoodbye

@_askcarter

Page 30: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Service

Podgoodbye

Podgoodbye

Podgoodbye

@_askcarter

Page 31: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node

Podhello

NodeNode

Service

Podgoodbye

Podgoodbye

Podgoodbye

@_askcarter

Page 32: What’s new in k8s 1.3

Rolling Update

Node 1

Podhello

Podhello

Node NodeNode

Service

Podgoodbye

Podgoodbye

Podgoodbye

@_askcarter

Page 33: What’s new in k8s 1.3

3 Claims: revisited

@_askcarter

Page 34: What’s new in k8s 1.3

Kubernetes 1.3

@_askcarter

Page 35: What’s new in k8s 1.3

Kubernetes 1.3

@_askcarter

Page 36: What’s new in k8s 1.3

Kubernetes 1.3

Init containers (alpha)Fixed PDsCluster Federation (alpha)Optional HTTP2Pod Level QoS PolicyTls secretskubectl set commandUIJobsRBAC (alpha, experimental)Garbage Collector (alpha)Pet Setsrkt Container runtimeNetwork policies(and more)

@_askcarter

Page 37: What’s new in k8s 1.3

Cluster Federation

Manage clusters across region and providers

@_askcarter

Page 38: What’s new in k8s 1.3

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

Page 39: What’s new in k8s 1.3

Job: Work Queue with Pod Per Work Item

@_askcarter

Page 40: What’s new in k8s 1.3

Init ContainersSequential Pod Initialization

@_askcarter

Pod

Init 1

monolith

NFS

10.1.0.100

Init 2 Init 3

Page 41: What’s new in k8s 1.3

Init Container: register pod to external service

@_askcarter

Page 42: What’s new in k8s 1.3

Init Container: clone a git repo into a volume

@_askcarter

Page 43: What’s new in k8s 1.3

Pet SetsPods with ego

Pods are fungible, stateless?

Pets are Pods with:

1. Stable hostname2. A unique name3. Stable storage

@_askcarter

Page 44: What’s new in k8s 1.3

Pet SetsPods with ego

@_askcarter

Page 45: What’s new in k8s 1.3

PetSet: example manifest

@_askcarter

Page 46: What’s new in k8s 1.3

PetSet: headless service

@_askcarter

Page 47: What’s new in k8s 1.3

Bonus

@_askcarter

Page 48: What’s new in k8s 1.3

Google Container

Engine(GKE)

Cluster autoscaling (beta)IAM supportLocal SSDContainer-VM Images (beta)Node pools

@_askcarter

Page 49: What’s new in k8s 1.3

minikube github.com/kubernetes/minikube

@_askcarter

Page 50: What’s new in k8s 1.3

Kube UIkubernetes.io/docs/user-guide/ui/

@_askcarter

Page 51: What’s new in k8s 1.3

Thing I learned (making this talk)

(making this talk)

@_askcarter

Page 52: What’s new in k8s 1.3

Recap

@_askcarter

Page 53: What’s new in k8s 1.3

3 HurdlesThe App

The Infra

The Wild

@_askcarter

Page 54: What’s new in k8s 1.3

3 ClaimsPlanet Scale

Never Outgrow

Run Anywhere

@_askcarter

Page 55: What’s new in k8s 1.3

Kubernetes 1.3Planet Scale - SLA 2000 nodes

Never Outgrow - minikube to prod

Run Anywhere - Cluster Federation

@_askcarter

Page 56: What’s new in k8s 1.3

Scalable Microservice

with Kubernetes

@_askcarter

Page 57: What’s new in k8s 1.3

Carter Morgan@_askcarter

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

@_askcarter