Slide 1

Slide 1 text

Infrastructure Management Using Kubernetes Dr. Omer Dawelbeit | @omerio | +OmerDawelbeit Annual Day 2017 Slides: https://goo.gl/HGgX5V

Slide 2

Slide 2 text

About me ‘omerio’ ● Co-founder GDG Reading, UK. 2015 - 2016 ● Co organizer GDG Cloud Emirates, UAE. 2017 - Now ● Google Developer Expert (Cloud) ● Open Source contributor (ecarf.io, cloudex.io) Google ● 16+ years as Tech Consultant (UK, Middle East & South East Asia) ● PhD Computer Science, University of Reading (Cloud + Big Data) ● Blog at omerio.com, Tweets @omerio Reading, UK Dubai, UAE

Slide 3

Slide 3 text

Content ● What is Kubernetes? ● What is a container? ● Virtualization Overview ● Where can I run it? ● What can Kubernetes do and why use it? ● Kubernets Cluster Overview

Slide 4

Slide 4 text

Kubernetes & Containers

Slide 5

Slide 5 text

What is Kubernetes? Greek for “Helmsman”; also the root of the words “governor” and “cybernetic” • An Open Source system that runs and manages containers • Inspired and informed by Google’s experiences and internal systems • Supports multiple cloud and bare-metal environments • Supports multiple container runtimes (Docker, Rocket) • 100% Open source, written in Go Manage applications, not machines

Slide 6

Slide 6 text

What is a container? ● Lightweight environment ● Static application environment ● No external dependencies ● Application isolation ● Reusable, runnable artifacts ● Loosely coupled ● Portable Run containers on bare metal already: https://www.youtube.com/watch?v=coFIEH3vXPw

Slide 7

Slide 7 text

Virtualization Overview Live migration

Slide 8

Slide 8 text

Virtual Infrastructure

Slide 9

Slide 9 text

Containers vs. VMs Typical VMs Containers on bare metal Containers on VMs

Slide 10

Slide 10 text

Containers Orchestration

Slide 11

Slide 11 text

Where can I run it? Laptop to high-availability multi-node cluster Hosted or self managed On-Premise or Cloud (GCP, AWS, Azure, Bluemix, ..) Bare Metal or Virtual Machines Most OSes (inc. RedHat Atomic, Fedora, CentOS) Or just a bunch of Raspberry PIs Many options, See Matrix for details Kubernetes Cluster Matrix: http://bit.ly/1MmhpMW

Slide 12

Slide 12 text

What can Kubernetes do and why use it? ● co-locating helper processes, ● mounting storage systems (volumes), ● application health checking, ● replicating application instances, ● horizontal auto-scaling, ● load balancing, ● rolling updates, ● and resource monitoring. ● manage applications, not machines, ● better resource utilisation and scheduling, ● better application performance monitoring (APM), ● consolidated logging and reporting, ● ease of deployment management, Source: Google

Slide 13

Slide 13 text

Cluster Overview ● Pods ● Containers ● Labels ● Replication Controllers* ● Services ● Nodes ● Kubernetes Master http://omerio.com/2015/12/18/learn-the-kubernetes-key-concepts-in-10-minutes/ A Deployment that configures a ReplicaSet is now the recommended way to set up replication

Slide 14

Slide 14 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 15

Slide 15 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 16

Slide 16 text

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

Slide 17

Slide 17 text

Replication Controllers / ReplicaSet ● 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 18

Slide 18 text

Replication Controllers

Slide 19

Slide 19 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 20

Slide 20 text

Services

Slide 21

Slide 21 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 22

Slide 22 text

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

Slide 23

Slide 23 text

Thank you Stay in touch Google+: +OmerDawelbeit Twitter: @omerio LinkedIn: OmerDawelbeit Blog: omerio.com Slides: https://goo.gl/HGgX5V