Slide 1

Slide 1 text

All about rkt: Containers and K8s at CoreOS ContainerizeThis 2016 Josh Wood DocOps • CoreOS @joshixisjosh9 | [email protected] | github.com/joshix

Slide 2

Slide 2 text

We’re hiring in all departments! Email: [email protected] Positions: coreos.com/ careers 90+ Projects on GitHub, 1,000+ Contributors OPEN SOURCE CoreOS.com - @coreoslinux - github/coreos Secure solutions, support plans, training + more ENTERPRISE [email protected] - tectonic.com - quay.io CoreOS Runs the World’s Containers

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

A CLI for running app containers on Linux. Focuses on: ● Security ● Modularity ● Standards/Compatibility

Slide 5

Slide 5 text

A CLI for running app containers on Linux. Focuses on: ● Not reinventing the wheel: ○Systemd - init ○Overlayfs ○CNI networking

Slide 6

Slide 6 text

A CLI for running app containers on Linux. Security: ● Signed images ● GPG detached sigs (ACI) ● DTC integration with TPM

Slide 7

Slide 7 text

A CLI for running app containers on Linux. Modularity: External ● “Fits in” ● Systemd or other init ● CNI and plugins

Slide 8

Slide 8 text

A CLI for running app containers on Linux. Modularity: Internal ● Stages of execution ● Fly, cgroups/ns, KVM vm ○SAME CONTAINER

Slide 9

Slide 9 text

A CLI for running app containers on Linux. Standards/Compatibility: ● Appc ACI format & sigs ● rkt runs Docker images ○OCI support as develops

Slide 10

Slide 10 text

rkt run: default stage1 ● Isolates containers with the linux container primitives (cgroups, ns), systemd-nspawn ● Container apps in a machine slice PID namespace ● Manage with standard init tools: systemd ● Network isolation

Slide 11

Slide 11 text

rkt run: KVM isolation ● Isolates containers with the linux KVM hypervisor ● Container apps in a machine slice PID namespace ● Manage with standard init tools: systemd ● Network isolation

Slide 12

Slide 12 text

rkt fly ● Leverages the packaging, discovery, distribution, and validation features of rkt/appc ● Reduced isolation for privileged components ● chroot file system isolation only ● Has access to host-level mount, network, PID namespaces ● Method for k8s bootstrap in CoreOS Linux

Slide 13

Slide 13 text

rkt run: your stage1 ● stage1 can be replaced with custom implementations for security, performance, architecture, … ● KVM stage1 originated with Intel ClearContainers project and has seen at least two alternate external implementations

Slide 14

Slide 14 text

$ rkt run quay.io/josh_wood/caddy rkt: using image from local store for image name coreos.com/rkt/stage1-coreos:0.15.0 rkt: using image from local store for image name quay.io/josh_wood/caddy [ 1161.330635] caddy[4]: Activating privacy features... done. [ 1161.333482] caddy[4]: :2015 $ rkt run (demo)

Slide 15

Slide 15 text

Cluster-level container orchestration with #GIFEE baked in. Handles: ● Scheduling/Upgrades ● Failure recovery ● Scaling Kubernetes

Slide 16

Slide 16 text

worker kubelet worker kubelet worker kubelet scheduler & API worker kubelet w ku t worker kubelet

Slide 17

Slide 17 text

What is rkt in Kubernetes? ● “Rktnetes” was a nickname for the work in both rkt and kubernetes ● rkt is container execution engine, runs cluster work on nodes ● Add configuration to declare a node uses the rkt engine, or that a pod executes with rkt

Slide 18

Slide 18 text

What is rkt in Kubernetes?

Slide 19

Slide 19 text

Why rkt in Kubernetes? ● Ensure cleanliness and modularity of the critical interface between the orchestrator and the execution engine ● Spur innovation through community effects ● In short: standards and interfaces

Slide 20

Slide 20 text

Why rkt in Kubernetes? ● Obtain unique rkt features ● Externally modular: Refine runtime interface ● Internally modular: Pluggable “stage1” isolation environments ● Run pods as software-isolated (cgroups, ns) ● Run pods as VMs with hypervisor isolation ● OpenStack as a K8s app(s)

Slide 21

Slide 21 text

What’s up and what’s next? ● Rkt support in mainline Kubernetes @ v1.3 ● Bring up a cluster, node, or pod with rkt as the executor ● Now/Next (K8s v1.4 & beyond): ○ kubectl attach (CRI and pod mutability) ○ Port-forwarding for alternate stage1s ○ Your contributions, suggestions, and experiments!

Slide 22

Slide 22 text

What’s it all about? ● Decouple the Application from the OS ○ Then you can upgrade them both, and each ○ Containers: distribution and execution ● Automate OS upgrades ● Orchestrate the result as a unified resource ○ Apps evolve -- are continuously deployed and scaled ● Democratize access to utility computing ○ #GIFEE

Slide 23

Slide 23 text

Linux Prometheus

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Runs on any platform Consistency across clouds Trivial dev, test, & prod Faster time to market

Slide 27

Slide 27 text

Current Events ● CNI as Kubernetes network plugin model ● Docker refactor: runc, containerd ● Appc and OCI: Standard for container images ● ocid: Let 1000 runtimes bloom? ○ ocid: Inherits runc: Pro and Con

Slide 28

Slide 28 text

See also: ● coreos.com/rkt ● kubernetes.io/docs/getting-started-guides/rkt/ ● http://blog.kubernetes.io/2016/07/rktnetes-bri ngs-rkt-container-engine-to-Kubernetes.html ● http://blog.kubernetes.io/2016/01/why-Kubern etes-doesnt-use-libnetwork.html

Slide 29

Slide 29 text

See also: ● speakerdeck.com/joshix (these slides)

Slide 30

Slide 30 text

Thank you! Josh Wood @joshixisjosh9 | [email protected] | github.com/joshix We’re hiring! Email: [email protected] Positions: coreos.com/ careers