Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Containers

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

Containers vs. VMs

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Containers Orchestration

Slide 10

Slide 10 text

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.

Slide 11

Slide 11 text

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/

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

Replication Controllers

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

Services

Slide 20

Slide 20 text

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"

Slide 21

Slide 21 text

Google Container Engine

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

Google Container Engine Overview

Slide 24

Slide 24 text

Getting Started

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

Demo Time

Slide 27

Slide 27 text

Deploying a Graphviz cluster ● Demo Slides

Slide 28

Slide 28 text

Wrap Up

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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