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. 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
  2. What is a container? • Lightweight environment • Static application

    environment • No external dependencies • Application isolation • Reusable, runnable artifacts • Loosely coupled • Portable
  3. 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
  4. 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.
  5. 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/
  6. Cluster Overview • Pods • Containers • Labels • Replication

    Controllers • Services • Nodes • Kubernetes Master
  7. 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
  8. Pods Questions • How to persist data across container restarts?

    • How to create multiple copies of a Pod? • How can containers reference each other reliably?
  9. Labels • Key/value pairs (tier=frontend, app=myapp) • Metadata with semantic

    meaning • Membership identifier (services & rc) • Queryable by Selectors (grouping)
  10. 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
  11. 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
  12. 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"
  13. 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
  14. 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
  15. What we have covered • Why are containers so popular

    • What is Kubernetes? • What is Google Container Engine? • How to get started • Some demos