Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with...

106
rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Transcript of Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with...

Page 1: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt and KubernetesWhat's new (and coming) with

Container Runtimes and Orchestration

Page 2: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Jonathan Boullegithub.com/jonboulle - @baronboulle

Page 3: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why rkt and Kubernetes?

Page 4: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why rkt and Kubernetes?Why container runtimes

and orchestration?

Page 5: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

CoreOS, Inc (2013 - today)Mission: "Secure the Internet"

Started at the OS level: CoreOS Linux● Modern, minimal operating system● Self-updating (read-only) image● Updates must be automatic and seamless

Page 6: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Automatic and seamless● If the OS is always updating, what about

applications running on it?

Page 7: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Automatic and seamless● If the OS is always updating, what about

applications running on it?● Classic use case for containers and orchestration

○ containers decouple the application and OS update lifecycles (update at different cadences)

○ orchestration decouples application and OS uptime (services can remain unaffected during OS downtime)

Page 8: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why container runtimes?● So we can update the OS without affecting

application dependencies

Page 9: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

kernelsystemdrktsshdocker

pythonjavanginxmysqlopenssl

app

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro

Page 10: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

pythonjavanginxmysqlopenssl

app d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

kernelsystemdrktsshdocker

Page 11: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

pythonopenssl-A app1

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro

javaopenssl-B app2

javaopenssl-B app3

kernelsystemdrktsshdocker

Page 12: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

CoreOS

container

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro

container

container

Page 13: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

CoreOS

rkt container

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro

Docker container

nspawn container

Page 14: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why orchestration?● So we can update the OS without affecting

application uptime

Page 15: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

Page 16: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

updating...

Page 17: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

needs reboot

Page 18: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

rebooting...

Without orchestration

Page 19: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

rebooting...

Without orchestration

Page 20: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app1app2app3

server1

app4app5

server2

app6app7

server3

needs reboot

With orchestrationmagical

orchestrator

Page 21: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

server1

app4app5app1app3

server2

app6app7app2

server3

needs reboot

With orchestrationmagical

orchestrator

Page 22: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

server1

app4app5app1app3

server2

app6app7app2

server3

rebooting...

With orchestrationmagical

orchestrator

Page 23: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

server1

app4app5app1app3

server2

app6app7app2

server3

updated!

With orchestrationmagical

orchestrator

Page 24: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app2app3

server1

app4app5app1

server2

app6app7

server3

updated!

With orchestrationmagical

orchestrator

Page 25: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

app2app3

server1

app4app5app1

server2

app6app7

server3

With orchestration

Page 26: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why container runtimes and orchestration?

So we can provide seamless updates and push forward the security of application servers

Page 27: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why rkt?

Page 28: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

A long time ago in an ecosystem far, far away....

(2014, to be precise)

Page 29: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● Popular incumbent container tool (in CoreOS)● Common practices, but few best practices

○ unsigned images (curl | sudo sh -)○ inefficient/insecure images (FROM ubuntu:14.04)○ PID1 or not to PID1 (zombie reaping problem)

● New platforms emerging, difficult to integrate○ systemd + dockerd = sad times had by all

2014

Page 30: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● Enter rkt (and appc)○ Create an alternative container runtime (competition

drives innovation)○ Emphasise the importance of security and composability○ Spur conversation around standards in the application

container ecosystem

2014 (December)

Page 31: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

a modern, secure container runtimea simple, composable tool

an implementation of open standards

Page 32: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

a modern, secure container runtimea simple, composable tool

an implementation of open standards

Page 33: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

a standard application containeropen specificationassociated tooling

Page 34: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

appc spec in a nutshell● Image Format (ACI)

○ what does an application consist of?○ how can an image be located on the internet?○ how can an image be securely signed & distributed?

● Pods○ how can applications be grouped and run?

● Runtime format (ACE)○ what does the execution environment look like?

Page 35: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● grouping of applications executing in a shared context (network, namespaces, volumes)

● shared fate● the only execution primitive: single applications

are modelled as singleton pods

appc pods

Page 36: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

appc pods ≈ Kubernetes pods● grouping of applications executing in a shared

context (network, namespaces, volumes)● shared fate● the only execution primitive: single applications

are modelled as singleton pods

Page 37: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

a modern, secure container runtimea simple, composable tool

an implementation of open standards (appc)

Page 38: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● Docker and rkt both:○ post 1.0 ○ "production ready" (and actively used in production)

● Kubernetes too!● Container standards?

○ ongoing...

2016

Page 39: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● appc (December 2014)● OCI (June 2015)● CNCF (December 2015)

Container standards

Page 40: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

appc● Image format

○ Cryptographic identity○ Signing○ Discovery/federation

● Runtime format● Pods

2015: appc vs OCIOCI● Runtime format

Page 41: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● New OCI project: image format○ github.com/opencontainers/runtime-spec○ github.com/opencontainers/image-spec

● Merging the best of Docker + appc○ Container peace?!

2016: today

+

Page 42: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

OCI Image Format maintainers

● Vincent Batts, Red Hat● Brandon Philips, CoreOS● Brendan Burns, Google● Jason Bouzane, Google● John Starks, Microsoft● Jonathan Boulle, CoreOS● Stephen Day, Docker

Page 43: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Image Formats and standardsDocker v1 appc Docker v2.2 OCI (in progress)

Introduced 2013 December 2014 April 2015 April 2016

Content-addressable

No Yes Yes Yes

Signable No Yes, optional Yes, optional Yes, optional

Federated namespace

Yes Yes Yes Yes

Delegatable DNS namespace

No Yes No Yes

Page 44: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Container standards

Why should you care?● For users, things should "just work":

○ docker run example.com/org/app:v1.0.0○ rkt run example.com/org/app,version=v1.0.0

● For administrators and operators:○ Stronger security primitives built-in○ Intercompatibility: mix and match tools, or write your own

Page 45: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

a modern, secure container runtimea simple, composable tool

an implementation of open standards (appc)

Page 46: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt architectureA quick introduction

Page 47: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

no central daemonno (mandatory) API

self-contained executionapps run directly under spawning process

rkt - simple CLI tool

Page 48: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

bash/systemd/kubelet

rkt run ...

application(s)

Page 49: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

modular architectureexecution divided into stages

stage0 → stage1 → stage2

rkt internals

Page 50: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

modular architecturetake advantage of different technologies provide a consistent experience to users

rkt internals

Page 51: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

bash/systemd/kubelet

rkt run ...

application(s)

Page 52: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

bash/systemd/kubelet

rkt run ...

pod

Page 53: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0)

pod (stage1)

bash/systemd/kubelet... (invoking process)

app1 (stage2)

app2 (stage2)

Page 54: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● primary interface to rkt ● discover, fetch, manage application images● set up pod filesystems● manage pod lifecycle

○ rkt run○ rkt image list○ rkt gc○ ...

stage0 (rkt binary)

Page 55: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● default implementation ○ based on systemd-nspawn+systemd ○ Linux namespaces + cgroups for isolation

● kvm implementation ○ based on lkvm+systemd ○ hardware virtualisation for isolation

● others?○ e.g. xhyve (OS X), unc (unprivileged containers)

stage1 (swappable execution engines)

Page 56: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● actual app execution● independent filesystems (chroot)● shared namespaces, volumes, IPC, ...

stage2 (inside the pod)

Page 57: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● TPM, Trusted Platform Module○ physical chip on the motherboard○ cryptographic keys + processor

● Used to "measure" system state● Historically just use to verify bootloader/OS (on

proprietary systems)

rkt TPM measurement (new!)

Page 58: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● CoreOS added support to GNU Grub● rkt can now record information about running

pods in the TPM● attestable record of what images and pods are

running on a system

rkt TPM measurement (new!)

Page 59: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt TPM measurement (new!)

Page 60: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

● optional, gRPC-based API daemon● exposes read-only information on pods/images● runs as unprivileged user● easier integration with other projects

rkt API service (new!)

Page 61: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Why rkt?Secure

StandardsComposable

Page 62: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

+

Page 63: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt + Kubernetes

rkt ♥ k8s in a few ways:● using rkt as container runtime (aka "rktnetes")● using rkt to run Kubernetes ("rkt fly")● integrating with rkt networking (CNI)

Page 64: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Container Runtimes

● Kubelet code provides a Runtime interface○ SyncPod()○ GetPod()○ KillPod()○ ...

● in theory, anyone can implement this● in practise, lots of Docker assumptions

Page 65: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Docker (default)

kubelet dockerd

container container container

Page 66: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Docker (default)

Problems:● Docker doesn't understand pods

○ kubelet must maintain pod<->container mapping○ "infra container" to hold namespaces for pod

● dockerd = SPOF for node○ if Docker goes down, so do all containers

● Docker doesn't interact well with systemd○ References

Page 67: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Docker (before 1.11+)

kubelet dockerd

container container container

Page 68: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Docker (1.11+ with containerd)

kubelet containerd

containerd shim

containerd shim

containerd shim

container container container

dockerd

Page 69: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + rkt (rktnetes)

Using rkt as the kubelet's container runtime● A pod-native runtime● First-class integration with systemd hosts● self-contained pods process model = no SPOF● Multi-image compatibility (e.g. docker2aci)● Transparently swappable

Page 70: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + rkt (rktnetes - with systemd)

kubelet systemd

rkt rkt rktrkt api service

pods

Page 71: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + rkt (rktnetes - without systemd)

kubelet

rkt rkt rktrkt api service

pods

Page 72: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Nearly complete!~90% of end-to-end tests passing

http://rktnetes.io/P0 for Kubernetes 1.3

rktnetes today

Page 73: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet + Container Runtimes

● Kubelet's Runtime interface rework○ Granular control over applications in containers○ Dynamic resource management○ Directly managing containers?

Page 74: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Using rkt to run Kubernetes

● Kubernetes components are largely self-hosting, but not entirely○ Need a way to bootstrap kubelet on the host○ kubelets can then host control plane components

● On CoreOS, this means in a container.. ○ ... but kubelet has some unique requirements

(like mounting volumes on the host)

Page 75: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Using rkt to run Kubernetes

● rkt "fly" feature (new in 0.15.0+)● unlike rkt run, does *not* execute pods● execute a single application in an unconstrained

environment● all the other advantages of rkt (image

discovery, signing/verification, management)

Page 76: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0) - without fly

pod (stage1)

bash/systemd/... (invoking process)

app1 (stage2)

app2 (stage2)

Page 77: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0) - without fly

pod (stage1)

bash/systemd/... (invoking process)

app1 (stage2)

app2 (stage2)

Isolated mount (and PID, ...) namespace

Page 78: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0) - with fly

bash/systemd/... (invoking process)

application

Page 79: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0) - with fly

bash/systemd/... (invoking process)

application

Host mount (and PID, ...) namespace

Page 80: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt (stage0) - with fly

bash/systemd/... (invoking process)

kubelet

Host mount (and PID, ...) namespace

Page 81: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt networkingPlugin-basedIP(s)-per-pod

Container Networking Interface (CNI)

Page 82: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Container Runtime (e.g. rkt)

ptp macvlan ipvlan OVS

Container Networking Interface (CNI)

Page 83: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

CNI in a nutshell

● Container can join multiple networks● Network described by JSON config ● Plugin supports two commands

○ ADD container to the network○ REMOVE container from the network

● Plugins are responsible for all logic○ allocating IPs, talking to backend components, ...

Page 84: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

CNI: example configuration{

"name": "mynet",

"type": "ptp",

"ipam": {

"type": "host-local",

"subnet": "10.1.1.0/24"

}

}

$ rkt run --net=mynet coreos.com/etcd

Page 85: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

exec()

exec()

create, join

configurevia setns + netlink

How rkt uses CNI

rktnetwork plugins(CNI)

systemd-nspawn

/var/lib/rkt/pods/run/$POD_UUID/netns

network namespace

Page 86: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubernetes networkingPlugin-based (but never left alpha)

IP(s)-per-pod(sound familiar?)

Page 87: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubernetes and CNI

Soon to be "the Kubernetes plugin model"

Page 88: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

v0.2.0-rc1Handles all networking in rkt

Integrations with Project Calico, WeaveworksHoping to donate to the CNCF

CNI today

Page 89: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Looking aheadWhat's coming up for rkt and Kubernetes

Page 90: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rktnetes 1.02016Q2

Fully supported, full feature parityAutomated end-to-end testing on CoreOS

Page 91: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

LKVM backend by defaultNative support for OCI in Kubernetes API

TPM up to the Kubernetes level

rktnetes 1.0+

Page 92: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

https://coreos.com/blog/coreos-trusted-computing.html

Tectonic Trusted Computing

Page 93: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Try rktnetes today!https://gist.github.com/yifan-gu/091d258107f37ecdff48

Page 94: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt 1.0+ ● Loads of bugfixes● app exit status propagation● Discover and fetch stage1 images

○ e.g. from coreos.com

Page 95: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt 1.0+● rktnetes fixes

○ Hostname○ Docker volume semantics○ Improvements in the API Service

● SELinux support on Fedora○ Fixes in nspawn, selinux-policy and rkt

● Concurrent image fetching

Page 96: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

What’s next?● rkt fly as a top-level command● IPv6 support on CNI● Full SELinux enforcing on Fedora● Packaged in Debian (almost there!)

Page 97: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Stable configurationStateless plugins (runtime responsibility)

IPv6<your suggestions here>

CNI 1.0

Page 98: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Move all networking code into CNI plugins

Kubernetes 1.3

Page 99: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet upgrades

- Remember from CoreOS mission: "updates must be automatic and seamless"- If kubelet is in OS, must be upgraded in lock-step- But mixed-version clusters don't always work(e.g. upgrading from 1.07 - 1.1.1: https://github.com/kubernetes/kubernetes/issues/16961 )

Page 100: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Kubelet upgrades

- Solution: API driven upgrades- Small agent living on host, invoking kubelet (using rkt fly)- Reading annotations from the kubelet API server- Follow along:https://github.com/coreos/bugs/issues/1051

Page 101: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Graceful kubelet shutdown

● When an update is ready, locksmith signals kubelet to gracefully shut down

● Kubernetes can then gracefully migrate apps before shutdown

● https://github.com/coreos/bugs/issues/1112● https://github.com/kubernetes/kubernetes/issues/7351

Page 102: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

tl;dr:

● Use rkt● Use Kubernetes● Use rkt + Kubernetes (rktnetes)

● Get involved and help define the future of application containers and Kubernetes

Page 103: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

May 9 & 10, 2016 - Berlin, Germanycoreos.com/fest - @coreosfest

Page 104: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Questions?

Join us!

contribute: github.com/coreos/rktcareers: coreos.com/careers (now in Berlin!)

Page 105: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

Extra slidesDid I speak too fast?

Page 106: Container Runtimes and Orchestration rkt and … · rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

rkt security ("secure by default")

● image security○ cryptographic addressing○ signature verification

● privilege separation○ e.g. fetch images, expose API (new!) as non-root

● SELinux integration● lkvm stage1 for true hardware isolation● TPM attestation (new!)