SlideShare a Scribd company logo
rkt and Kubernetes
What's new (and coming) with
Container Runtimes and Orchestration
Jonathan Boulle
github.com/jonboulle - @baronboulle
Why rkt and Kubernetes?
Why rkt and Kubernetes?
Why 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
Automatic and seamless
● If the OS is always updating, what about
applications running on it?
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)
Why container runtimes?
● So we can update the OS without affecting
application dependencies
kernel
systemd
rkt
ssh
docker
python
java
nginx
mysql
openssl
app
trodistrodistrodistrodistrodistro
python
java
nginx
mysql
openssl
apptrodistrodistrodistrodistrodistro
kernel
systemd
rkt
ssh
docker
python
openssl-A
app1
trodistrodistrodistrodistrodistro
java
openssl-B
app2
java
openssl-B
app3
kernel
systemd
rkt
ssh
docker
CoreOS
container
trodistrodistrodistrodistrodistro
container
container
CoreOS
rkt container
trodistrodistrodistrodistrodistro
Docker container
nspawn container
Why orchestration?
● So we can update the OS without affecting
application uptime
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
updating...
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
needs reboot
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
rebooting...
Without orchestration
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
rebooting...
Without orchestration
app1
app2
app3
server1
app4
app5
server2
app6
app7
server3
needs reboot
With orchestration
magical
orchestrator
server1
app4
app5
app1
app3
server2
app6
app7
app2
server3
needs reboot
With orchestration
magical
orchestrator
server1
app4
app5
app1
app3
server2
app6
app7
app2
server3
rebooting...
With orchestration
magical
orchestrator
server1
app4
app5
app1
app3
server2
app6
app7
app2
server3
updated!
With orchestration
magical
orchestrator
app2
app3
server1
app4
app5
app1
server2
app6
app7
server3
updated!
With orchestration
magical
orchestrator
app2
app3
server1
app4
app5
app1
server2
app6
app7
server3
With orchestration
Why container runtimes
and orchestration?
So we can provide seamless updates and push
forward the security of application servers
Why rkt?
A long time ago in an
ecosystem far, far away....
(2014, to be precise)
● 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
● 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)
a modern, secure container runtime
a simple, composable tool
an implementation of open standards
a modern, secure container runtime
a simple, composable tool
an implementation of open standards
a standard application container
open specification
associated tooling
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?
● 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
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
a modern, secure container runtime
a simple, composable tool
an implementation of open standards (appc)
● Docker and rkt both:
○ post 1.0
○ "production ready" (and actively used in production)
● Kubernetes too!
● Container standards?
○ ongoing...
2016
● appc (December 2014)
● OCI (June 2015)
● CNCF (December 2015)
Container standards
appc
● Image format
○ Cryptographic identity
○ Signing
○ Discovery/federation
● Runtime format
● Pods
2015: appc vs OCI
OCI
● Runtime format
● 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
+
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
Image Formats and standards
Docker 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
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
a modern, secure container runtime
a simple, composable tool
an implementation of open standards (appc)
rkt architecture
A quick introduction
no central daemon
no (mandatory) API
self-contained execution
apps run directly under spawning process
rkt - simple CLI tool
bash/systemd/kubelet
rkt run ...
application(s)
modular architecture
execution divided into stages
stage0 → stage1 → stage2
rkt internals
modular architecture
take advantage of different technologies
provide a consistent experience to users
rkt internals
bash/systemd/kubelet
rkt run ...
application(s)
bash/systemd/kubelet
rkt run ...
pod
rkt (stage0)
pod (stage1)
bash/systemd/kubelet... (invoking process)
app1 (stage2)
app2 (stage2)
● 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)
● 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)
● actual app execution
● independent filesystems (chroot)
● shared namespaces, volumes, IPC, ...
stage2 (inside the pod)
● 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!)
● 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!)
rkt TPM measurement (new!)
● 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!)
Why rkt?
Secure
Standards
Composable
+
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)
Kubelet + Container Runtimes
● Kubelet code provides a Runtime interface
○ SyncPod()
○ GetPod()
○ KillPod()
○ ...
● in theory, anyone can implement this
● in practise, lots of Docker assumptions
Kubelet + Docker (default)
kubelet dockerd
container container container
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
Kubelet + Docker (before 1.11+)
kubelet dockerd
container container container
Kubelet + Docker (1.11+ with containerd)
kubelet containerd
containerd
shim
containerd
shim
containerd
shim
container container container
dockerd
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
Kubelet + rkt (rktnetes - with systemd)
kubelet systemd
rkt rkt rkt
rkt api
service
pods
Kubelet + rkt (rktnetes - without systemd)
kubelet
rkt rkt rkt
rkt api
service
pods
Nearly complete!
~90% of end-to-end tests passing
http://rktnetes.io/
P0 for Kubernetes 1.3
rktnetes today
Kubelet + Container Runtimes
● Kubelet's Runtime interface rework
○ Granular control over applications in containers
○ Dynamic resource management
○ Directly managing containers?
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)
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)
rkt (stage0) - without fly
pod (stage1)
bash/systemd/... (invoking process)
app1 (stage2)
app2 (stage2)
rkt (stage0) - without fly
pod (stage1)
bash/systemd/... (invoking process)
app1 (stage2)
app2 (stage2)
Isolated mount (and PID, ...) namespace
rkt (stage0) - with fly
bash/systemd/... (invoking process)
application
rkt (stage0) - with fly
bash/systemd/... (invoking process)
application
Host mount (and PID, ...) namespace
rkt (stage0) - with fly
bash/systemd/... (invoking process)
kubelet
Host mount (and PID, ...) namespace
rkt networking
Plugin-based
IP(s)-per-pod
Container Networking Interface (CNI)
Container Runtime (e.g. rkt)
ptp macvlan ipvlan OVS
Container Networking Interface (CNI)
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, ...
CNI: example configuration
{
"name": "mynet",
"type": "ptp",
"ipam": {
"type": "host-local",
"subnet": "10.1.1.0/24"
}
}
$ rkt run --net=mynet coreos.com/etcd
exec()
exec()
create,
join
configure
via setns +
netlink
How rkt uses CNI
rkt
network plugins
(CNI)
systemd-nspawn
/var/lib/rkt/pods/run/$POD_UUID/netns
network
namespace
Kubernetes networking
Plugin-based (but never left alpha)
IP(s)-per-pod
(sound familiar?)
Kubernetes and CNI
Soon to be "the Kubernetes plugin model"
v0.2.0-rc1
Handles all networking in rkt
Integrations with Project Calico, Weaveworks
Hoping to donate to the CNCF
CNI today
Looking ahead
What's coming up for rkt and Kubernetes
rktnetes 1.0
2016Q2
Fully supported, full feature parity
Automated end-to-end testing on CoreOS
LKVM backend by default
Native support for OCI in Kubernetes API
TPM up to the Kubernetes level
rktnetes 1.0+
https://coreos.com/blog/coreos-trusted-computing.html
Tectonic Trusted Computing
Try rktnetes today!
https://gist.github.com/yifan-gu/091d258107f37ecdff48
rkt 1.0+
● Loads of bugfixes
● app exit status propagation
● Discover and fetch stage1 images
○ e.g. from coreos.com
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
What’s next?
● rkt fly as a top-level command
● IPv6 support on CNI
● Full SELinux enforcing on Fedora
● Packaged in Debian (almost there!)
Stable configuration
Stateless plugins (runtime responsibility)
IPv6
<your suggestions here>
CNI 1.0
Move all networking code into CNI plugins
Kubernetes 1.3
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 )
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
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
tl;dr:
● Use rkt
● Use Kubernetes
● Use rkt + Kubernetes (rktnetes)
● Get involved and help define the future of
application containers and Kubernetes
May 9 & 10, 2016 - Berlin, Germany
coreos.com/fest - @coreosfest
Questions?
Join us!
contribute: github.com/coreos/rkt
careers: coreos.com/careers (now in Berlin!)
Extra slides
Did I speak too fast?
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!)

More Related Content

PDF
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
PDF
[FOSDEM 2020] Lazy distribution of container images
PDF
Docker Introduction - DevOps Montreal Meetup
PDF
Docker London Meetup: Docker Engine Evolution
PDF
Rkt Container Engine
PDF
Kernel Recipes 2018 - 10 years of automated evolution in the Linux kernel - J...
PDF
App container rkt
PDF
[KubeCon NA 2020] containerd: Rootless Containers 2020
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
[FOSDEM 2020] Lazy distribution of container images
Docker Introduction - DevOps Montreal Meetup
Docker London Meetup: Docker Engine Evolution
Rkt Container Engine
Kernel Recipes 2018 - 10 years of automated evolution in the Linux kernel - J...
App container rkt
[KubeCon NA 2020] containerd: Rootless Containers 2020

What's hot (19)

PDF
Performance Profiling Tools and Tricks
PDF
Testing cloud and kubernetes applications - ElasTest
PDF
Enabling Security via Container Runtimes
PDF
Rootless Containers & Unresolved issues
PDF
kpatch.kgraft
PDF
Docker in Production
PDF
[KubeCon EU 2020] containerd Deep Dive
PDF
Build and run applications in a dockerless kubernetes world
PDF
Extended and embedding: containerd update & project use cases
PDF
Introduction and Deep Dive Into Containerd
PDF
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
PDF
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
PDF
BKK16-407 AOSP Toolchain Evolution and experimental languages on AOSP
PDF
Delivering a bleeding edge community-led openstack distribution: RDO
PDF
OpenStack Cinder On-Boarding Education - Boston Summit - 2017
PDF
Fantastic Buildpacks and Where to Find Them
PDF
ISC HPCW talks
PDF
Kubernetes on CRI-O
PDF
State of the Art OpenGL and Qt
 
Performance Profiling Tools and Tricks
Testing cloud and kubernetes applications - ElasTest
Enabling Security via Container Runtimes
Rootless Containers & Unresolved issues
kpatch.kgraft
Docker in Production
[KubeCon EU 2020] containerd Deep Dive
Build and run applications in a dockerless kubernetes world
Extended and embedding: containerd update & project use cases
Introduction and Deep Dive Into Containerd
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
BKK16-407 AOSP Toolchain Evolution and experimental languages on AOSP
Delivering a bleeding edge community-led openstack distribution: RDO
OpenStack Cinder On-Boarding Education - Boston Summit - 2017
Fantastic Buildpacks and Where to Find Them
ISC HPCW talks
Kubernetes on CRI-O
State of the Art OpenGL and Qt
 
Ad

Similar to OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orchestration by Jonathan Boulle (20)

PDF
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
PDF
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
PDF
JOSA TechTalks - Docker in Production
PDF
Looking Under The Hood: containerD
PDF
Future of Microservices - Jakub Hadvig
PDF
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
PDF
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
PPTX
Run automated tests in Docker
PPTX
Kubernetes 101
PPTX
Accelerate your development with Docker
PDF
Accelerate your software development with Docker
PDF
Odo improving the developer experience on OpenShift - hack &amp; sangria
PPTX
Containerization using docker and its applications
PPTX
Containerization using docker and its applications
PDF
Javantura v4 - Self-service app deployment with Kubernetes and OpenShift - Ma...
PDF
LXC, Docker, and the future of software delivery | LinuxCon 2013
PDF
LXC Docker and the Future of Software Delivery
PDF
Docker handons-workshop-for-charity
PDF
Containers: from development to production at DevNation 2015
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
JOSA TechTalks - Docker in Production
Looking Under The Hood: containerD
Future of Microservices - Jakub Hadvig
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
Introduction to Docker, December 2014 "Tour de France" Edition
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Run automated tests in Docker
Kubernetes 101
Accelerate your development with Docker
Accelerate your software development with Docker
Odo improving the developer experience on OpenShift - hack &amp; sangria
Containerization using docker and its applications
Containerization using docker and its applications
Javantura v4 - Self-service app deployment with Kubernetes and OpenShift - Ma...
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC Docker and the Future of Software Delivery
Docker handons-workshop-for-charity
Containers: from development to production at DevNation 2015
Ad

Recently uploaded (20)

PDF
AI in Product Development-omnex systems
PPTX
L1 - Introduction to python Backend.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
history of c programming in notes for students .pptx
PPTX
ai tools demonstartion for schools and inter college
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
AI in Product Development-omnex systems
L1 - Introduction to python Backend.pptx
How Creative Agencies Leverage Project Management Software.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PTS Company Brochure 2025 (1).pdf.......
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Migrate SBCGlobal Email to Yahoo Easily
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
history of c programming in notes for students .pptx
ai tools demonstartion for schools and inter college
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
How to Choose the Right IT Partner for Your Business in Malaysia
VVF-Customer-Presentation2025-Ver1.9.pptx
Reimagine Home Health with the Power of Agentic AI​
Upgrade and Innovation Strategies for SAP ERP Customers

OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orchestration by Jonathan Boulle