@briandorsey #kubernetes #GOTOber

Similar documents
Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

So, I have all these containers! Now what?

Kubernetes: What s New

Kubernetes The Path to Cloud Native

An Introduction to Kubernetes

Managing Compute and Storage at Scale with Kubernetes. Dan Paik / Google

Introduction to Kubernetes Storage Primitives for Stateful Workloads

Kubernetes: Twelve KeyFeatures

What s New in K8s 1.3

What s New in K8s 1.3

Code: Slides:

Running MarkLogic in Containers (Both Docker and Kubernetes)

agenda PAE Docker Docker PAE

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

Container Orchestration on Amazon Web Services. Arun

Scaling Jenkins with Docker and Kubernetes Carlos

/ Cloud Computing. Recitation 5 February 14th, 2017

Kubernetes 101. Doug Davis, STSM September, 2017

A REFERENCE ARCHITECTURE FOR DEPLOYING WSO2 MIDDLEWARE ON KUBERNETES

/ Cloud Computing. Recitation 5 September 26 th, 2017

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Package your Java Application using Docker and Kubernetes. Arun

Kuber-what?! Learn about Kubernetes

Important DevOps Technologies (3+2+3days) for Deployment

Docker All The Things

Cloud I - Introduction

Kubernetes: Container Orchestration and Micro-Services logo

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

Introduction to Kubernetes

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

UP! TO DOCKER PAAS. Ming

ovirt and Docker Integration

Introduction to Virtualization and Containers Phil Hopkins

Investigating Containers for Future Services and User Application Support

Ray Tsang Developer Advocate Google Cloud Platform

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

Containers Infrastructure for Advanced Management. Federico Simoncelli Associate Manager, Red Hat October 2016

Understanding and Evaluating Kubernetes. Haseeb Tariq Anubhavnidhi Archie Abhashkumar

Red Hat Atomic Details Dockah, Dockah, Dockah! Containerization as a shift of paradigm for the GNU/Linux OS

Kubernetes - Networking. Konstantinos Tsakalozos

CS-580K/480K Advanced Topics in Cloud Computing. Container III

Life of a Packet. KubeCon Europe Michael Rubin TL/TLM in GKE/Kubernetes github.com/matchstick. logo. Google Cloud Platform

DevOps Technologies. for Deployment

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

Upcoming Services in OpenStack Rohit Agarwalla, Technical DEVNET-1102

Allowing Users to Run Services at the OLCF with Kubernetes

Continuous Delivery of Micro Applications with Jenkins, Docker & Kubernetes at Apollo

Declarative Modeling for Cloud Deployments

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Triangle Kubernetes Meet Up #3 (June 9, 2016) From Beginner to Expert

Kubernetes Integration with Virtuozzo Storage

DevOps Course Content

Travis Cardwell Technical Meeting

Overview of Container Management

Software containers are likely to become a very important tool over the

EASILY DEPLOY AND SCALE KUBERNETES WITH RANCHER

Think Small to Scale Big

Using DC/OS for Continuous Delivery

Kubernetes 1.9 Features and Future

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

Secure Kubernetes Container Workloads

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

Container-Native Storage

Knative: Building serverless platforms on top of Kubernetes

Installation and setup guide of 1.1 demonstrator

Containers OpenStack. Murano brings Docker & Kubernetes to OpenStack. Serg Melikyan. software.mirantis.com. January 27, 2015

Hacking and Hardening Kubernetes

Kubernetes introduction. Container orchestration

SAMPLE CHAPTER. Marko Lukša MANNING

Oh.. You got this? Attack the modern web

Kubernetes. Introduction

One year of Deploying Applications for Docker, CoreOS, Kubernetes and Co.

Xen and CloudStack. Ewan Mellor. Director, Engineering, Open-source Cloud Platforms Citrix Systems

Designing MQ deployments for the cloud generation

Beyond 1001 Dedicated Data Service Instances

Onto Petaflops with Kubernetes

Simple custom Linux distributions with LinuxKit. Justin Cormack

São Paulo. August,

INSTALLATION RUNBOOK FOR Iron.io + IronWorker

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Kubernetes objects on Microsoft Azure

Building a Microservices Platform with Kubernetes. Matthew Mark

WHITE PAPER. Kubernetes Deployment Models: The Ultimate Guide

gcp / gke / k8s microservices

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

An introduction to Docker

KubeNow Documentation

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Cluster management at Google john wilkes / Principal Software Engineer

Making Immutable Infrastructure simpler with LinuxKit. Justin Cormack

INTRODUCING CONTAINER-NATIVE VIRTUALIZATION

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

Hystax Acura. Cloud Migration and Disaster Recovery Solution. Hystax. All rights reserved. 1

Two years of on Kubernetes

Getting to Know Apache CloudStack

LAB EXERCISE: RedHat OpenShift with Contrail 5.0

Launching StarlingX. The Journey to Drive Compute to the Edge Pilot Project Supported by the OpenStack

Implementing the Twelve-Factor App Methodology for Developing Cloud- Native Applications

POWERING THE INTERNET WITH APACHE MESOS

More Containers, More Problems

Transcription:

1

Kubernetes Changing the way we think and talk about computing GOTO Berlin - December 2015 2

What is this talk? Container 3

Brian Dorsey Developer Advocate - Google Cloud platform +BrianDorsey @briandorsey 4

Containers? Yes/No if yes GOTO slide 7; if no GOTO slide 15; 5

Containers

The Old Way: Shared Machines No isolation app app app app No namespacing Common libs Highly coupled apps and OS libs kernel Bare Metal 7

The Old Way: Virtual Machines Some isolation app app libs libs kernel kernel app app libs libs kernel kernel Expensive and inefficient Still highly coupled to the guest OS Hard to manage Hypervisor 8

The New Way: Containers App specific isolation Lightweight & efficient app app libs libs app app libs libs Independent of the host Linux distribution Lots of containers to manage kernel Hypervisor 9

Container Images An image is a stack of Read-Only file system layers. Usual process: build push to repository pull to execution host start container from image App PHP & Apache Libs Debian 10

Image Layers Read / Write A container is a process started with kernel restrictions a stack of shared Read-Only file system layers plus a process specific ReadWrite layer Read / Write Read / Write App PHP & Apache Libs Debian Every new container gets a new Read-Write later. All containers from the same image start from exactly the same state! 11

Mounting Host Directories It's possible to mount host directories into a container's filesystem. These are mutable and do outlive the container. Read / Write host dir App PHP & Apache Libs They're only available on that host. Debian 12

Why containers? Performance Repeatability Quality of service Accounting Portability A fundamentally different way of managing applications Images by Connie Zhou 13

Containers are awesome! Let s run lots of them! 14

Kubernetes

PaaS Virtual Machines Physical Computers 16

PaaS Container Clusters Virtual Machines Physical Computers 17

Kubernetes Greek for Helmsman ; also the root of the words governor and cybernetic 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 100% Open source, written in Go Manage applications, not machines 18

Everything at Google runs in containers: Gmail, Web Search, Maps,... MapReduce, batch,... GFS, Colossus,... Even Google s Cloud Platform: VMs run in containers! 19

Everything at Google runs in containers: Gmail, Web Search, Maps,... MapReduce, batch,... GFS, Colossus,... Even Google s Cloud Platform: VMs run in containers! We launch over 2 billion containers per week 20

A toolkit for running distributed systems in production co-locating helper processes naming and discovery mounting storage systems load balancing distributing secrets rolling updates application health checking resource monitoring replicating application instances log access and ingestion horizontal auto-scaling support for introspection and debugging 21

Start with a Cluster Laptop to high-availability multi-node cluster Hosted or self managed On-Premise or Cloud 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 22

Start with a Cluster Kubernetes Master Scheduler API Server Kubelet Kubelet Kubelet 23

Setting up a cluster Choose a platform: GCE, AWS, Azure, Rackspace, Ubuntu, Juju Then run: export KUBERNETES_PROVIDER=<your_provider>; curl -ss https://get.k8s.io bash Or choose a distro such as RedHat Atomic, CoreOS Tectonic, Mirantis Murano (OpenStack), Mesos Or use a recipes for bare metal configurations for Centos, Fedora, etc Use a hosted option such as Google Container Engine 24

Deploy containers $ kubectl run my-nginx --image=nginx --replicas=2 --port=80 25

26

A pod of whales containers Consumers The atom of scheduling for containers An application specific logical host Hosts containers and volumes Each has its own routable IP address (no NAT) Web Server Ephemeral s are functionally identical and therefore ephemeral and replaceable Volume 27

s Can be used to group multiple containers & shared volumes Consumers git Repo Containers within a pod are tightly coupled Shared namespaces Containers in a pod share IP, port and IPC namespaces Containers in a pod talk to each other through localhost Git Synchronizer Node.js App Container Volume 28

Networking (across nodes) s have IPs which are routable 10.1.2.106 s can reach each other without NAT Even across nodes 10.1.2.0/24 No Brokering of Port Numbers These are fundamental requirements 10.1.1.211 10.1.1.2 10.1.1.0/24 Many solutions Flannel, Weave, OpenVSwitch, Cloud Provider 10.1.3.45 10.1.3.17 10.1.3.0/24 10.1.3.0/24 29

Create a service $ kubectl expose rc my-nginx --port=80 --type=loadbalancer 30

Services Client A logical grouping of pods that perform the same function grouped by label selector VIP Load balances incoming requests across constituent pods Service Label selector: type = FE Choice of pod is random but supports session affinity (ClientIP) Gets a stable virtual IP and port also a DNS name Container type = FE Container type = FE Container Container type = FE 31

Labels These are important Dashboard Dashboard show: type = FE type = FE frontend frontend type = FE show: version = v2 version = v2 version = v2 Behavior Benefits Metadata with semantic meaning Membership identifier The only Grouping Mechanism Allow for intent of many users (e.g. dashboards) Build higher level systems Queryable by Selectors 32

Replication Controllers Replication Replication Controller Controller #pods = 2 version = v1 version= v1 frontend frontend version = v1 version = v2 Replication Controller #pods = 1 version = v2 show: version = v2 show: version = v2 Behavior Keeps s running Gives direct control of #s Grouped by Label Selector Benefits Recreates s, maintains desired state Fine-grained control for scaling Standard grouping semantics 33

Replication Controller Replication Controllers Replication Controller Canonical example of control loops Have one job: ensure N copies of a pod if too few, start new ones if too many, kill some group == selector Replicated pods are fungible - Name = backend Selector = { name : backend } Template = {... } NumReplicas = 4 Start 1 more How many? 3 How many? OK 4 No implied order or identity API Server 34

Managing Deployments

Scale $ kubectl scale rc my-nginx --replicas=5 36

Scaling Example Replication Replication Controller Controller version = v1 type = FE 1 4 #pods = 2 frontend frontend version= v1 version = v1 version = v1 version = v1 type = FE type = FE type = FE type = FE show: version = v2 Service Service name = frontend Label selectors: version = 1.0 Label selector: type = Frontend type = FE 37

Canary Replication Replication Controller Controller version = v1 type = BE #pods = 2 frontend frontend version= v1 version = v1 version = v2 type = BE type = BE type = BE show: version = v2 Replication Replication Controller Controller version = v2 type = BE #pods = 1 show: version = v2 Service Service name = backend Label selectors: version = 1.0 Label selector: type = Frontend type = BE 38

Rolling Update $ kubectl rolling-update frontend --image=frontend:v2 39

Rolling Update Replication Replication Controller Controller version = v1 type = BE #pods = 2 frontend version= v1 version = v2 v1 version = v2 type = BE type = BE type = BE show: version = v2 Replication Controller version = v2 type = BE #pods = 2 show: version = v2 Service Service name = backend Label selectors: version = 1.0 Label selector: type = Frontend type = BE 40

Autoscale $ kubectl autoscale rc frontend --min=1 --max=20 41

Horizontal Autoscaling Beta (1.1) Replication Replication Controller Controller name=locust role=worker 2 1 #pods = 4 frontend frontend name=locust name=locust name=locust name=locust role=worker role=worker role=worker role=worker show: version = v2 70% CPU Scale CPU Target% = 50 40% CPU Heapster >< 50% CPU 42

Managing State

I still have questions about state! Database In a cluster of ephemeral containers Application state must exist outside of the container 44

Volumes Bound to the that encloses it Look like Directories to Containers What and where they are determined by Volume Type Many Volume options EmptyDir HostPath nfs, iscsi (and similar services) Cloud Provider Block Storage 45

Outside the Cluster Database e.g.: MySQL managed by DBAs or managed cloud services App App App App App App App App App 46

Adapt to run in the Cluster App App App App App App App App App Database e.g.: MySQL runs in a pod and mounts a filesystem provided by the cluster 47

Cluster Native App App App App App App App App App ex: run Cassandra or Riak inside the cluster 48

Cluster native - MySQL on Vitess Open source MySQL scaling solution Vitess has been serving all YouTube database traffic since 2011 Replication, dynamic sharding, caching and more Designed for a distributed, containerized world Kubernetes configs included http://vitess.io/ 49

Secrets Problem: how to grant a pod access to a secured something? don t put secrets in the container image! 12-factor says: config comes from the environment Kubernetes is the environment Secret node Manage secrets via the Kubernetes API Inject them as virtual volumes into s late-binding tmpfs - never touches disk App 50

Wrap-up

Kubernetes status & plans Open sourced in June, 2014 v1.0 in July, 2015, v1.1 in November 2015 Google Container Engine (GKE) hosted Kubernetes - don t think about cluster setup GA in August, 2015 PaaSes: RedHat OpenShift, Deis, Stratos Distros: CoreOS Tectonic, Mirantis Murano (OpenStack), RedHat Atomic, Mesos Working towards a 1.2 release 52

Google Container Engine (GA) -- Demo Managed Kubernetes (Kubernetes v1.1) Manages Kubernetes master uptime Manages Updates Cluster Resize via Managed Instance Groups Cluster Node Autoscaling Centralized Logging Google Cloud VPN support 53

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

PaaS Yo ap ur p? Container Clusters Virtual Machines Physical Computers 55

Tweet questions afterwards to: @briandorsey Slides: goo.gl/ni1gam Questions 56

57