Containers with Google: from Borg to Kubernetes

Similar documents
Kubernetes-Murano Integration in Mirantis OpenStack 7.0

The Cloud to the rescue!

Kubernetes + Google. 5 lessons learned from 8+ years of containers. Victor Marmol (vmarmol@google.com) Tim Hockin (thockin@google.

Deploying complex applications to Google Cloud. Olia Kerzhner

Cisco Application-Centric Infrastructure (ACI) and Linux Containers

The Virtualization Practice

Linux A first-class citizen in Windows Azure. Bruno Terkaly bterkaly@microsoft.com Principal Software Engineer Mobile/Cloud/Startup/Enterprise

DevOps with Containers. for Microservices

Managing Kubernetes and OpenShift with ManageIQ. Alissa Bonas, Dublin 2015

the CONTAINER COLORING BOOK "Who's afraid of the big bad wolf?" MÁIRÍN DUFFY DAN WALSH illustrated by written by

Building a Kubernetes Cluster with Ansible. Patrick Galbraith, ATG Cloud Computing Expo, NYC, May 2016

Container Clusters on OpenStack

Containerization and the PaaS Cloud

OpenShift Dedicated 3.1 Architecture

Linstantiation of applications. Docker accelerate

Alfresco Enterprise on Azure: Reference Architecture. September 2014

Windows Azure Data Services (basics) 55093A; 3 Days

STeP-IN SUMMIT June 18 21, 2013 at Bangalore, INDIA. Performance Testing of an IAAS Cloud Software (A CloudStack Use Case)

An Analysis of Container-based Platforms for NFV

RED HAT CONTAINER STRATEGY

YouTube Vitess. Cloud-Native MySQL. Oracle OpenWorld Conference October 26, Anthony Yeh, Software Engineer, YouTube.

Docker : devops, shared registries, HPC and emerging use cases. François Moreews & Olivier Sallou

SAP NetWeaver High Availability and Business Continuity in Virtual Environments with VMware and Hyper-V on Microsoft Windows

A Complete Open Cloud Storage, Virt, IaaS, PaaS. Dave Neary Open Source and Standards, Red Hat

Distributed Scheduling with Apache Mesos in the Cloud. PhillyETE - April, 2015 Diptanu Gon

What it is and why you might use it

Private Cloud Management

DevOps. Josh Preston Solutions Architect Stardate

Sacha Dubois RED HAT TRENDS AND TECHNOLOGY PATH TO AN OPEN HYBRID CLOUD AND DEVELOPER AGILITY. Solution Architect Infrastructure

Using SUSE Cloud to Orchestrate Multiple Hypervisors and Storage at ADP

Hypertable Architecture Overview

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Large-Scale Web Applications

SERVER 101 COMPUTE MEMORY DISK NETWORK

Team: May15-17 Advisor: Dr. Mitra. Lighthouse Project Plan Client: Workiva Version 2.1

Introduction to Cloud Computing

Biznet GIO Cloud Connecting VM via Windows Remote Desktop

Red Hat Cloud Ecosystem

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Deployment of Private, Hybrid & Public Clouds with OpenNebula

24/11/14. During this course. Internet is everywhere. Frequency barrier hit. Management costs increase. Advanced Distributed Systems Cloud Computing

On- Prem MongoDB- as- a- Service Powered by the CumuLogic DBaaS Platform

Implementation Considerations for VMware App Volumes in a Citrix XenApp Environment WHITE PAPER

CUMULUX WHICH CLOUD PLATFORM IS RIGHT FOR YOU? COMPARING CLOUD PLATFORMS. Review Business and Technology Series

Load balancing MySQL with HaProxy. Peter Boros Percona 4/23/13 Santa Clara, CA

Do Containers fully 'contain' security issues? A closer look at Docker and Warden. By Farshad Abasi,

Google Cloud Platform The basics

Intro to Docker and Containers

Containerisation and the PaaS Cloud

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

Learning Management Redefined. Acadox Infrastructure & Architecture

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Building a big IaaS cloud with Apache CloudStack

Microsoft s Advantages and Goals for Hyper-V for Server 2016

CompTIA Cloud+ 9318; 5 Days, Instructor-led

1.1.1 Introduction to Cloud Computing

HP OO 10.X - SiteScope Monitoring Templates

Introduction to Windows Azure Cloud Computing Futures Group, Microsoft Research Roger Barga, Jared Jackson,Nelson Araujo, Dennis Gannon, Wei Lu, and

Use Cases for Docker in Enterprise Linux Environment CloudOpen North America, 2014 Linda Wang Sr. Software Engineering Manager Red Hat, Inc.

Platform as a Service and Container Clouds

CompTIA Cloud+ Course Content. Length: 5 Days. Who Should Attend:

Whither Enterprise Cloud Platform Linux, Docker and more Loo Chia Zyn Head of Sales Consulting, Japan & Asia Pacific Oracle Linux & Oracle VM

2015 Techstravaganza The Microsoft Cloud

Assignment # 1 (Cloud Computing Security)

CONTINUOUS DEPLOYMENT WITH SINGULARITY

A Comparison of Clouds: Amazon Web Services, Windows Azure, Google Cloud Platform, VMWare and Others (Fall 2012)

Traditional v/s CONVRGD

STRATEGIC WHITE PAPER. The next step in server virtualization: How containers are changing the cloud and application landscape

Red Hat CloudForms : OPENSTACK INFRASTRUCTURE MANAGEMENT. John Hardy Senior Principal Product Manager 24 rd June 2015

Apache HBase. Crazy dances on the elephant back

Server Virtualization with Windows Server Hyper-V and System Center

Amazon Elastic Beanstalk

2972 Linux Options and Best Practices for Scaleup Virtualization

Storage and Disaster Recovery

Implementing Microsoft Azure Infrastructure Solutions 20533B; 5 Days, Instructor-led

WHITEPAPER INTRODUCTION TO CONTAINER SECURITY. Introduction to Container Security

What s New with VMware vcloud Director 5.1

Course 20533B: Implementing Microsoft Azure Infrastructure Solutions

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Virtualization Management the ovirt way

RED HAT CLOUD SUITE FOR APPLICATIONS

With Red Hat Enterprise Virtualization, you can: Take advantage of existing people skills and investments

Big Data With Hadoop

Using Application Services

<Insert Picture Here> Oracle VM and Cloud Computing

Mirantis

CI Pipeline with Docker

ovirt and Gluster hyper-converged! HA solution for maximum resource utilization

ovirt and Gluster hyper-converged! HA solution for maximum resource utilization

Comparative analysis of mapreduce job by keeping data constant and varying cluster size technique

Server Virtualization with Windows Server Hyper-V and System Center

70-414: Implementing a Cloud Based Infrastructure. Course Overview

DB2 Connect for NT and the Microsoft Windows NT Load Balancing Service

How To Use Arcgis For Free On A Gdb (For A Gis Server) For A Small Business

Cloud Computing at Google. Architecture

Transcription:

Containers with Google: from Borg to Kubernetes Jens Bussmann Cloud Platform Lead, NACE Google Filip Grzadkowski Warsaw Kubernetes Team Lead Google

Building what s next 3 We set out to build a better cloud for us. Now, we re giving it to you. 3

Building what s next 4 4

Google Innovations in Software Kubernetes FlumeJava Borg Spanner Colossus Bigtable Dremel 2015 MapReduce 2012 GFS 2010 2006 2008 2004 2002 5

Google Innovations in Software Kubernetes FlumeJava Borg Spanner Colossus Bigtable Dremel 2015 MapReduce 2012 GFS 2010 2006 2008 2004 2002 6

Google Innovations in Software Kubernetes FlumeJava Borg Spanner Colossus Bigtable Dremel 2015 MapReduce 2012 GFS 2010 2006 2008 2004 2002 7

Google Innovations in Software Kubernetes FlumeJava Borg Spanner Colossus Bigtable Dremel 2015 MapReduce 2012 GFS 2010 2006 2008 2004 2002 8

Containers At Google, everything runs in a container

This is vanilla virtualization Guest environment app code libraries guest kernel Hypervisor 10

It has downsides: Not portable & opaque Guest environment app code libraries machine image locked into a platform guest kernel Hypervisor 11

It has downsides: No Isolation Guest environment app code app code??? dependency libraries guest kernel Hypervisor 12

It has downsides: Little Reuse redundant Guest environment Guest environment Guest environment app code app code app code libraries libraries libraries guest kernel guest kernel guest kernel Hypervisor 13

Containers create a better abstraction layer Guest environment app code cut here libraries guest kernel Hypervisor 14

Containers at Google Google is using container technology for more than 10 years Everything at Google runs in a container 15

Containers at Google Google is using container technology for more than 10 years Everything at Google runs in a container We launch over 2 billion new containers per week 16

Containers Google and containers Google and container technology Released CGroups Limited isolation 2004 Kubernetes Released LMCTFY 2006 2013 2014 Confidential & Proprietary 17

Containers Google and containers Google and container technology Released CGroups Limited isolation Kubernetes Released LMCTFY 2004 2006 Borg 2013 2014 10+ years of experience Confidential & Proprietary 18

Kubernetes Container orchestrator Builds on containers (Docker, Rocket) Handles container and node failure Multiple cloud and bare-metal environments 100% Open Source, written in Go Let users manage applications, not machines 19

Open Source 5k Commits in 1.2 +50% Unique Contributors Top 0.01% of all Github Projects 1200+ External Projects Based on K8s Companies Contributing Companies Using 20

Kubernetes Components Confidential & Proprietary 21

Pods A group of one or more containers sharing fate Containers in a pod run in a shared context (tcp/ip, sockets) Can communicate via localhost Considered to be relatively ephemeral (rather than durable) entities Pod Container 1 Container 2 22

Pod example apiversion: v1 kind: Pod metadata: name: wordpress spec: containers: - image: wordpress name: wordpress env: - name: WORDPRESS_USER value: wp_user Public image from Docker Hub. Private images have the form gcr.io/<your-project>/<your-image> 23

Nodes Pod 1 A worker machine in Kubernetes that will host one or many pods May be a VM or physical machine, depending on the cluster Restarted automatically after failure on GCE Pod 2 Node 1 24

Services Pod 1 Your load balancers, so to speak A stable endpoint that hides the implementation behind (pods or external) All pods will see your services as env variables or DNS entries Different Types: ClusterIP NodePort LoadBalancer Pod 2 Node 1 wordpress-service 146.148.3.114:80 Pod 3 Pod 4 Node 2 25

Labels type=wordpress Pod 1 Any combination of key-value pairs Pod 2 data-center=east release=production version=1.2 tier=front-end Can be applied to pods, services, nodes Node 1 wordpress-service 146.148.3.114:80 Pod 3 Pod 4 Node 2 26

Service example apiversion: v1 kind: Service metadata: name: wpfrontend spec: type: LoadBalancer ports: - port: 80 targetport: 80 protocol: TCP selector: name: wordpress Type of service: ClusterIP, NodePort, LoadBalancer Label to select the pods that will receive traffic 27

Replica Sets (since 1.2) Pod 1 Ensures a specified number of pod replicas are running with the specified labels Will react if a pod dies unexpectedly Can autoscale Pod 2 Node 1 wordpress-rc replicas: 4 Pod 3 Pod 4 Node 2 28

Replica Sets (1.2) vs Replication Controller (1.1) Replica Sets will replace Replication Controller The only difference is more flexible label selector support Not to be used directly. Use Deployment instead # equality-based environment = production tier!= frontend # set-based environment in (production, qa) tier notin (frontend, backend) partition!partition 29

Deployments (since 1.2) Provides declarative updates for Pods and Replica Sets Describe the desired state in a Deployment object, and the Deployment controller will get there at a controlled rate Pause, Resume, Rollback deployments Deployments keep a history 30

Deployment example apiversion: extensions/v1beta1 kind: Deployment spec: replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerport: 80 if too few, start new replicas if too many, kill some 31

Deployments $ kubectl create -f docs/user-guide/nginx-deployment.yaml deployment "nginx-deployment" created $ kubectl get deployments NAME DESIRED nginx-deployment 3 CURRENT 0 UP-TO-DATE 0 AVAILABLE 0 AGE 1s $ kubectl get deployments NAME DESIRED nginx-deployment 3 CURRENT 3 UP-TO-DATE 3 AVAILABLE 3 AGE 18s 32

Update a Deployment apiversion: extensions/v1beta1 kind: Deployment spec: replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerport: 80 apiversion: extensions/v1beta1 kind: Deployment spec: replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.9.1 ports: - containerport: 80 33

Update a Deployment $ kubectl apply -f docs/user-guide/new-nginx-deployment.yaml deployment "nginx-deployment" configured $ kubectl get deployments NAME DESIRED nginx-deployment 3 CURRENT 3 UP-TO-DATE 0 AVAILABLE 3 AGE 20s $ kubectl get deployments NAME DESIRED nginx-deployment 3 CURRENT 3 UP-TO-DATE 3 AVAILABLE 3 AGE 36s 34

Resources: Requests / Limit Set up required and maximum resources for the pod The pod can only be scheduled in a node with enough capacity for all its containers spec: containers: - name: db image: mysql resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" If a pod requests cpu: 0 it can always be scheduled 35

Ranking potential nodes Prefer node with most free resource left after the pod is deployed Minimise number of Pods from the same service on the same node CPU and memory are balanced after the Pod is deployed Node Affinity (since 1.2): use label filters to alter node selection 36

Other components Persistent Volume: attach a persistent disk to a pod. Secrets: inject sensitive information into your pods, reducing the risk of accidental exposure Namespaces: scope for object names. Names need to be unique within a namespace. Daemon Set: All nodes run a replica of a pod Jobs: creates pods and ensures that a specified number of them successfully terminate. 37

Host it in the cloud or on premise Confidential & Proprietary 38

Google Container Engine The easiest way of getting started with Kubernetes Managed by Google Cloud Logging and Monitoring integrated out-of-the-box Once connected, it s just Kubernetes # Create cluster gcloud container clusters create hello-world --num-nodes 3 # Connect Kubernetes gcloud container clusters get-credentials hello-world # Use Kubernetes kubectl get pods 39

(Coming soon) A collaboration between Google and Red Hat Deploy your Docker containers in a IaaS platform managed by Red Hat Migrate your application seamlessly between Google Cloud and your own premises Portable: move your application to your own Data Center using Open Shift Online or Open Shift Enterprise. Confidential & Proprietary 40

Hosting Kubernetes Hosting for Kubernetes in the hybrid cloud Online, Enterprise or Dedicated Managed by Red Hat or hosted yourself Hosting for Kubernetes in Managed by Google Scale with a click Confidential & Proprietary 41

Build What s Next