Upgrade to Pro — share decks privately, control downloads, hide ads and more …

KubeCon Europe 2017: Running Workloads in Kubernetes

Janet Kuo
March 29, 2017

KubeCon Europe 2017: Running Workloads in Kubernetes

The slides of my talk at KubeCon Europe 2017. In this talk, I gave an overview of built-in controllers in Kubernetes. The intended audience is Kubernetes beginners.

https://medium.com/google-cloud/running-workloads-in-kubernetes-86194d133593

Janet Kuo

March 29, 2017
Tweet

More Decks by Janet Kuo

Other Decks in Technology

Transcript

  1. Running Workloads in Kubernetes
    Janet Kuo, Software Engineer, Google

    View Slide

  2. https://goo.gl/dWYJq4

    View Slide

  3. https://goo.gl/2NLT0f
    VP of Software Architecture @Spire.

    View Slide

  4. Concept
    | Kubernetes: a platform for application patterns
    | Pod: a single instance of an application in Kubernetes
    | Controller: manages replicated pods for an application pattern

    View Slide

  5. Master node Worker node
    Worker node

    View Slide

  6. Master node Worker node
    Worker node
    Pod
    Container Container
    Pod
    Container Container

    View Slide

  7. Master node Worker node
    Worker node
    Pod
    Container Container
    Pod
    Container Container
    C

    View Slide

  8. 4 Common, General Patterns
    | Stateless
    | Stateful
    | Daemon
    | Batch

    View Slide

  9. 4 Common, General Patterns
    | Stateless: web frontends, web servers
    | Stateful
    | Daemon
    | Batch

    View Slide

  10. 4 Common, General Patterns
    | Stateless: web frontends, web servers
    | Stateful: databases, message queues
    | Daemon
    | Batch

    View Slide

  11. 4 Common, General Patterns
    | Stateless: web frontends, web servers
    | Stateful: databases, message queues
    | Daemon: logs collection, node monitoring
    | Batch

    View Slide

  12. 4 Common, General Patterns
    | Stateless: web frontends, web servers
    | Stateful: databases, message queues
    | Daemon: logs collection, node monitoring
    | Batch: processing of independent work items

    View Slide

  13. Stateless: Deployment
    | Availability
    | Scale, Deploy, Rolling Update
    | e.g. Web apps, mobile backends, API servers, ...

    View Slide

  14. Master node Worker node
    Worker node
    Pod
    Container Container
    Pod
    Container Container
    Service
    C
    async
    Demo: github.com/janetkuo/k8s-demos/tree/master/dep

    View Slide

  15. Stateful: StatefulSet
    | Consistency
    | Stable identity and state
    | Ordered deployment, scaling, deletion
    | e.g. Databases, caches, message queues, ...

    View Slide

  16. Master node Worker node
    Worker node
    Pod 0
    Container Container
    Pod 1
    Container Container
    Service
    C
    async
    Demo: github.com/janetkuo/k8s-demos/tree/master/stateful

    View Slide

  17. Daemon: DaemonSet
    | One per node
    | Node labels
    | e.g. Logs collection daemon, node monitoring daemon, ...

    View Slide

  18. Master node Worker node
    Worker node
    Pod
    Container Container
    Pod
    Container Container
    Service
    C
    async
    Demo: github.com/janetkuo/k8s-demos/tree/master/ds

    View Slide

  19. Batch: Jobs
    | Parallel + Complete
    | Related but independent work
    | e.g. Emails to send, frames to render, ...

    View Slide

  20. Master node Worker node
    Worker node
    Pod
    Container Container
    Pod
    Container Container
    C
    async
    Demo: github.com/janetkuo/k8s-demos/tree/master/jobs

    View Slide

  21. Recap
    | Stateless: Deployment; availability
    | Stateful: StatefulSet; consistency
    | Daemon: DaemonSet; one per node
    | Batch: Job; parallel to completion

    View Slide

  22. Where do I start?
    | Helm: The Kubernetes Package Manager
    github.com/kubernetes/helm
    | Helm Charts: Curated applications for Kubernetes
    github.com/kubernetes/charts

    View Slide

  23. How do I customize?
    | Kubernetes is extensible!
    | Write your own controllers
    | e.g. github.com/upmc-enterprises/elasticsearch-operator
    github.com/coreos/etcd-operator

    View Slide

  24. Kubernetes is Open
    github.com/kubernetes/kubernetes
    kubernetes.io
    slack.k8s.io / @janet
    @kubernetesio / @janet_kuo

    View Slide