$30 off During Our Annual Pro Sale. View Details »

Pods @ Container Meetup Tokyo

Ian Lewis
November 03, 2016

Pods @ Container Meetup Tokyo

Ian Lewis

November 03, 2016
Tweet

More Decks by Ian Lewis

Other Decks in Technology

Transcript

  1. Docker & Pods
    The many forms of containers

    View Slide

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

    View Slide

  3. Confidential & Proprietary
    Google Cloud Platform 3
    What are containers?

    View Slide

  4. 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

    View Slide

  5. 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

    View Slide

  6. Confidential & Proprietary
    Google Cloud Platform 6
    docker run nginx

    View Slide

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

    View Slide

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

    View Slide

  9. 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

    View Slide

  10. 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

    View Slide

  11. Copyright 2015 Google Inc
    Container Cluster Management
    Node Node
    Cluster
    Node

    View Slide

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

    View Slide

  13. Copyright 2015 Google Inc
    Container Cluster Management
    Node
    VOLUME

    View Slide

  14. Copyright 2015 Google Inc
    Container Cluster Management
    Node
    NFS
    NFS
    NAS

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  18. Google Cloud Platform
    Pods & Docker?
    Container
    nginx
    confd
    foreman

    View Slide

  19. Google Cloud Platform
    Container
    foreman
    Pods & Docker?
    nginx
    confd

    View Slide

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

    View Slide

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

    View Slide

  22. 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

    View Slide

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

    View Slide

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

    View Slide

  25. 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

    View Slide

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

    View Slide