Slide 1

Slide 1 text

Docker & Pods The many forms of containers

Slide 2

Slide 2 text

Confidential & Proprietary Google Cloud Platform 2 Ian Lewis Developer Advocate - Google Cloud Platform Tokyo, Japan google.com/+IanLewis-hoge @IanMLewis

Slide 3

Slide 3 text

Confidential & Proprietary Google Cloud Platform 3 What are containers?

Slide 4

Slide 4 text

Confidential & Proprietary Google Cloud Platform 4 1. Linux cgroup 2. Linux Namespace a. IPC b. Network (eth & IP address) c. Mount d. PID e. User f. UTS (Hostname & NIS) Containers

Slide 5

Slide 5 text

Confidential & Proprietary Google Cloud Platform 5 1. Linux cgroup 2. Linux Namespace a. IPC b. Network (eth & IP address) c. Mount d. PID e. User f. UTS (Hostname & NIS) Containers Container Image File System Metadata

Slide 6

Slide 6 text

Confidential & Proprietary Google Cloud Platform 6 docker run nginx

Slide 7

Slide 7 text

Google Cloud Platform Docker Containers IPC Network PID Hostname Mount nginx IPC Network PID Hostname Mount nginx IPC Network PID Hostname Mount nginx

Slide 8

Slide 8 text

Google Cloud Platform IPC Network PID Hostname Mounts nginx IPC Network PID Hostname Mount git pull IPC Network PID Hostname Mount nginx Docker Containers

Slide 9

Slide 9 text

Google Cloud Platform IPC Network PID Hostname Mounts nginx IPC Network PID Hostname Mount git pull IPC Network PID Hostname Mount nginx Docker Containers VOLUME VOLUME Host Volume

Slide 10

Slide 10 text

Google Cloud Platform IPC Network PID Hostname IPC Network PID Hostname Mount git pull IPC Network PID Hostname Mount nginx Docker Containers nginx Host Volume

Slide 11

Slide 11 text

Copyright 2015 Google Inc Container Cluster Management Node Node Cluster Node

Slide 12

Slide 12 text

Copyright 2015 Google Inc Container Cluster Management Node Node Node VOLUME?? VOLUME?? Cluster

Slide 13

Slide 13 text

Copyright 2015 Google Inc Container Cluster Management Node VOLUME

Slide 14

Slide 14 text

Copyright 2015 Google Inc Container Cluster Management Node NFS NFS NAS

Slide 15

Slide 15 text

Copyright 2015 Google Inc Node Container Cluster Management Node N FS N FS NAS

Slide 16

Slide 16 text

Google Cloud Platform Pods & Docker? confd nginx HUP W RITE READ etcd CHANGE nginx.conf app app app IP Address LB

Slide 17

Slide 17 text

Google Cloud Platform Container Container Pods & Docker? confd nginx HUP W RITE READ etcd CHANGE ? ? ? ?

Slide 18

Slide 18 text

Google Cloud Platform Pods & Docker? Container nginx confd foreman

Slide 19

Slide 19 text

Google Cloud Platform Container foreman Pods & Docker? nginx confd

Slide 20

Slide 20 text

Google Cloud Platform Container foreman Pods & Docker? Everything’s A-OK!! nginx confd Crash-Restart Loop

Slide 21

Slide 21 text

Kubernetes κυβερνήτης: Greek for “pilot” or “helmsman of a ship” the open source cluster manager from Google

Slide 22

Slide 22 text

Google Cloud Platform Pods Small group of containers & volumes Tightly coupled The atom of scheduling & placement Shared namespace • share IP address & localhost • share IPC, etc. Managed lifecycle • bound to a node, restart in place • can die, cannot be reborn with same ID Example: data puller & web server Consumers Content Manager File Puller Web Server Volume Pod

Slide 23

Slide 23 text

Google Cloud Platform Pods & Docker? confd nginx HUP W RITE READ etcd CHANGE nginx.conf app app app IP Address LB

Slide 24

Slide 24 text

Google Cloud Platform IPC Network Pods docker … --net=container:id --ipc=container:id Hostname cgroup Web Server Pod cgroup File Puller localhost

Slide 25

Slide 25 text

Google Cloud Platform Pods (TODO) docker … --net=container:id --ipc=container:id --pid=container:id https://github.com/docker /docker/issues/10163 IPC Network PID Hostname cgroup Web Server cgroup File Puller localhost

Slide 26

Slide 26 text

Thank you! Thanks! Ian Lewis twitter.com/IanMLewis