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

Introduction to Kubernetes and Google Container Engine

Introduction to Kubernetes and Google Container Engine

Gives a quick introduction to Kubernetes and Google Container Engine.

Was presented at Google Developer Group Oxford
http://www.meetup.com/GDG-Oxford/events/227474697/

Omer Dawelbeit

February 04, 2016
Tweet

More Decks by Omer Dawelbeit

Other Decks in Technology

Transcript

  1. Introduction to Kubernetes
    and Google Container Engine
    Omer Dawelbeit | @omerio | +OmerDawelbeit

    View Slide

  2. About me
    ● Software Dev & Architecture Consultant @ iNetria
    ● Founder @ OfficeMA.biz
    ● Google Developer Expert (2015)
    ● Part-time PhD researcher @ Uni of Reading
    ● Blog at omerio.com
    ● @omerio

    View Slide

  3. Content
    ● Containers
    ● Kubernetes
    ● Container Engine
    ● Getting Started
    ● Demo Time
    ● Wrap Up

    View Slide

  4. Containers

    View Slide

  5. What is a container?
    ● Lightweight environment
    ● Static application environment
    ● No external dependencies
    ● Application isolation
    ● Reusable, runnable artifacts
    ● Loosely coupled
    ● Portable

    View Slide

  6. Containers vs. VMs

    View Slide

  7. Kubernetes (k8s)
    /koo-ber-nay'-tace/
    From κυβερνήτης: Greek for "helmsman" or "pilot"

    View Slide

  8. What is Kubernetes?
    ● Containers orchestrator (Docker, Rocket)
    ● Open source
    ● Run on dev machine, own hardware or cloud
    ● Inspired by Google’s experience
    ● Written in Go
    ● Manages applications, not machines

    View Slide

  9. Containers Orchestration

    View Slide

  10. What can Kubernetes do?
    ● co-locating helper processes,
    ● mounting storage systems (volumes),
    ● application health checking,
    ● replicating application instances,
    ● horizontal auto-scaling,
    ● load balancing,
    ● rolling updates,
    ● and resource monitoring.

    View Slide

  11. Kubernetes in 10 minutes
    145 users!
    It’s so quiet!
    600 users!
    http://omerio.com/2015/12/18/learn-the-kubernetes-key-concepts-in-10-minutes/

    View Slide

  12. Cluster Overview
    ● Pods
    ● Containers
    ● Labels
    ● Replication Controllers
    ● Services
    ● Nodes
    ● Kubernetes Master

    View Slide

  13. Pods
    ● Smallest deployable unit
    ● Scheduled to nodes
    ● Hosts containers and volumes
    ● Ephemeral
    ● Each has its own routable IP (no NAT)
    ● Containers in a pod
    ○ Tightly coupled
    ○ Share IP, port and IPC namespaces
    ○ Talk to each other through localhost
    http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

    View Slide

  14. Pods Questions
    ● How to persist data across container restarts?
    ● How to create multiple copies of a Pod?
    ● How can containers reference each other reliably?

    View Slide

  15. Labels
    ● Key/value pairs (tier=frontend,
    app=myapp)
    ● Metadata with semantic meaning
    ● Membership identifier (services & rc)
    ● Queryable by Selectors (grouping)

    View Slide

  16. Replication Controllers
    ● Keeps Pods running
    ● Ensures N copies of Pods are
    running
    ● Provides direct control of Pods
    ● Uses a Pod template
    ● Determines constituent Pods
    using Label Selector

    View Slide

  17. Replication Controllers

    View Slide

  18. Services
    ● An abstraction
    ● Logical grouping of Pods
    ● Determines constituent Pods
    using Label Selector
    ● Load balancing between
    constituent Pods
    ● Gets a stable virtual IP, port &
    DNS name

    View Slide

  19. Services

    View Slide

  20. A few more...
    ● Volumes
    ● Secrets
    ● Namespaces
    ● Resource based scheduling
    ...
    spec:
    containers:
    - name: locust
    image: gcr.io/rabbit-skateboard/guestbook:gdg-rtv
    resources:
    requests:
    memory: "300Mi"
    cpu: "300m"
    limits:
    memory: "300Mi"
    cpu: "300m"

    View Slide

  21. Google Container
    Engine

    View Slide

  22. Hosted Kubernetes Environment
    ● GA in August 2015
    ● Managed Kubernetes (v1)
    ● Manages Kubernetes master
    ● Manages updates
    ● Cluster resize via Managed Instance Groups
    ● Cluster node autoscaling (Cloud Monitoring)
    ● Centralised logging
    ● Google Cloud VPN support

    View Slide

  23. Google Container Engine Overview

    View Slide

  24. Getting Started

    View Slide

  25. Resources
    ● A hands-on introduction to Kubernetes - Mandy Waite @ Google
    ● Kubernetes Documentations
    ● Google Container Engine Docs
    Starting from scratch? check my blog
    ● Building & Testing Docker Containers using Google Cloud Shell
    ● Learn the Kubernetes Key Concepts in 10 Minutes
    ● Getting Started with Kubernetes on Google Container Engine
    ○ Youtube tutorial

    View Slide

  26. Demo Time

    View Slide

  27. Deploying a Graphviz cluster
    ● Demo Slides

    View Slide

  28. Wrap Up

    View Slide

  29. What we have covered
    ● Why are containers so popular
    ● What is Kubernetes?
    ● What is Google Container Engine?
    ● How to get started
    ● Some demos

    View Slide

  30. Kubernetes is Open Source
    Your help is needed!
    http://kubernetes.io
    https://github.com/kubernetes/kubernetes
    Slack: #kubernetes-users
    @kubernetesio

    View Slide

  31. Thank you
    Stay in touch
    about.me/omerd
    Google+: +OmerDawelbeit
    Twitter: @omerio
    Blog: omerio.com
    Slides: https://goo.gl/L9p09u

    View Slide