kubernetes 1.3 - highlights

20
Kubernetes 1.3 What’s New Matt Bates Co-founder @JetstackHQ

Upload: mjbarks

Post on 11-Jan-2017

194 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Kubernetes 1.3 - Highlights

Kubernetes 1.3What’s New

Matt BatesCo-founder @JetstackHQ

Page 2: Kubernetes 1.3 - Highlights

5000+COMMITS

350+ CONTRIBUTORS

Page 3: Kubernetes 1.3 - Highlights
Page 4: Kubernetes 1.3 - Highlights

Headlines of 1.3

- Cluster Federation- PetSet- Init Containers- Rktnetes 1.0- Scalability- Minikube

Page 5: Kubernetes 1.3 - Highlights

Init Containers (#23567)

– Alpha feature– Run container(s) before the long-running main

pod container(s) are launched– Executed in sequential order– Only if init containers succeed do the main

container(s) start– Use cases:

– download files / clone repos– write out config files– etc

init-1 init-2

main-container

Page 6: Kubernetes 1.3 - Highlights

Stateful services (1.2)

- ReplicaSets (nee controllers) ensure N replicas of a pod template exist

- Only attribute that differs between pods is the name- Therefore same volume(s)

- Pods have no stable network identity other than an assigned pod IP- e.g. no fixed and predictable hostname

- Best for ‘shared-nothing, zero-coordination systems’

Photo credit: http://delectabledeliciousness.blogspot.co.uk

Page 7: Kubernetes 1.3 - Highlights

PetSet (#18016)

– New Alpha resource (apps/v1alpha1)– Stable and unique identity associated

with that instance of the storage– Consistent network identity– Predictable number of instances to ensure

that systems can form a quorum– Ability to migrate from node to node with

stable network identity (DNS name)– Scale up/down in a controlled fashion

Page 8: Kubernetes 1.3 - Highlights

PetSet (#18016)

PetSet pet-0.pet.default...

PetSetController

(KCM)

PV-0 PVC-0

API Server

Watches

Creates claim from template

BindsMounts

Creates and waits until ready

Service

1:1 mapping

Page 9: Kubernetes 1.3 - Highlights

PetSet (#18016)

PetSet pet-0.pet.default...

PetSetController

(KCM)

PV-0 PVC-0

API Server

Servicepet-1.

pet.default... PV-1 PVC-1

pet-2.pet.default... PV-2 PVC-2

Page 10: Kubernetes 1.3 - Highlights

eu-west-1beu-west-1a eu-west-1c

Recap: Cross-AZ clusters

Cross-AZ clusters (Ubernetes ‘Lite’) baked into 1.2

worker worker worker

Control Plane$ kubectl describe node worker1

...failure-domain.beta.kubernetes.io/region=eu-west1

failure-domain.beta.kubernetes.io/zone=eu-west1-a...

Page 11: Kubernetes 1.3 - Highlights

Cluster Federation/Ubernetes (#19313)

eu-central-1eu-west-1

worker worker worker

Cluster A Control Plane

worker worker worker

Cluster B Control Plane

Page 12: Kubernetes 1.3 - Highlights

Cluster Federation/Ubernetes (#19313)

eu-central-1eu-west-1

worker worker worker

Cluster A Control Plane

worker worker worker

Cluster B Control Plane

Federation Control PlaneFederation Controller Manager Federation API Server

Page 13: Kubernetes 1.3 - Highlights

Cluster Federation/Ubernetes (#19313)

– Focused on Federated Services at this stage– Create a Service at the Federation API Server:

– Creates matching Kubernetes Services in every cluster– Monitors the health of service “shards”– Manages DNS records in a public DNS provider (ie Google Cloud

DNS or AWS Route 53)– Note: backend Pods are currently added directly against the cluster API

endpoints

Page 14: Kubernetes 1.3 - Highlights

Federation Control PlaneFederation Controller Manager Federation API Server

DNS Provider

(Route 53, Google DNS)

kube-dnskube-dns

myservice.mynamespace.myfederation

myservice.mynamespace.myfederation.svc.jetstack.net

myservice.jetstack.net

myservice.mynamespace.myfederation.svc.eu-west-1.jetstack.net

myservice.mynamespace.myfederation.svc.eu-central-1.jetstack.net

Page 15: Kubernetes 1.3 - Highlights

Federation Control PlaneFederation Controller Manager Federation API Server

DNS Provider

(Route 53, Google DNS)

kube-dnskube-dns

myservice.jetstack.net

eu-west-1.jetstack.net eu-central-1.jetstack.net

Page 16: Kubernetes 1.3 - Highlights

rktnetes 1.0

– Kubernetes was built to ultimately be container runtime-agnostic

– First stable release that integrates the CoreOS rkt runtime, that can be used in-place of Docker

– Why Rkt?– rkt implements the open App Container Spec– Compatibility with init systems such as systemd

(nspawn)– Ability to launch VMs in pods for greater isolation

guarantee (using LKVM stage1)

Page 17: Kubernetes 1.3 - Highlights

Scalability

– Supports 2000-node clusters with decreased end-to-end pod startup time

– Under the bonnet, uses Protocol Buffer-based serialization in the API instead of JSON

Page 18: Kubernetes 1.3 - Highlights

Minikube

– Minikube starts a single node kubernetes cluster locally for purposes of development and testing.

– Packages and configures a Linux VM, Docker and all Kubernetes components, optimized for local development.

– Supports:– DNS– NodePorts– ConfigMaps and Secrets– Dashboards

– Does not support cloud-provider functionality (LoadBalancers, PersistentVolumes, Ingress)

Page 19: Kubernetes 1.3 - Highlights

More Hidden Gems..

https://blog.jetstack.io/blog/kubernetes-1-3-hidden-gems