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/

81f81af7cc5d1e767303b83bd76a1e46?s=128

Omer Dawelbeit

February 04, 2016
Tweet

Transcript

  1. Introduction to Kubernetes and Google Container Engine Omer Dawelbeit |

    @omerio | +OmerDawelbeit
  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
  3. Content • Containers • Kubernetes • Container Engine • Getting

    Started • Demo Time • Wrap Up
  4. Containers

  5. What is a container? • Lightweight environment • Static application

    environment • No external dependencies • Application isolation • Reusable, runnable artifacts • Loosely coupled • Portable
  6. Containers vs. VMs

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

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

  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.
  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/
  12. Cluster Overview • Pods • Containers • Labels • Replication

    Controllers • Services • Nodes • Kubernetes Master
  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
  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?
  15. Labels • Key/value pairs (tier=frontend, app=myapp) • Metadata with semantic

    meaning • Membership identifier (services & rc) • Queryable by Selectors (grouping)
  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
  17. Replication Controllers

  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
  19. Services

  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"
  21. Google Container Engine

  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
  23. Google Container Engine Overview

  24. Getting Started

  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
  26. Demo Time

  27. Deploying a Graphviz cluster • Demo Slides

  28. Wrap Up

  29. What we have covered • Why are containers so popular

    • What is Kubernetes? • What is Google Container Engine? • How to get started • Some demos
  30. Kubernetes is Open Source Your help is needed! http://kubernetes.io https://github.com/kubernetes/kubernetes

    Slack: #kubernetes-users @kubernetesio
  31. Thank you Stay in touch about.me/omerd Google+: +OmerDawelbeit Twitter: @omerio

    Blog: omerio.com Slides: https://goo.gl/L9p09u