The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on...

144
Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Transcript of The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on...

Page 1: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Containing InfrastructureThe Internet on Kubernetes

Brandon PhilipsCTO & Co-Founder, CoreOS

@BrandonPhilips

Page 2: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

3,424,000,000Internet Users

Source: https://www.infoq.com/news/2014/01/IDC-software-developers

Page 3: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

29,000,000Software Developers and IT Practioners

Source: http://www.internetlivestats.com/internet-users/

Page 4: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

We are Outnumbered!

Page 5: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

238,975,082New Internet Users in 2016

Source: http://www.internetlivestats.com/internet-users/

Page 6: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 7: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Documents

Commerce

Communications

Page 8: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

~100,000,000Servers Worldwide

Page 9: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

3 Per PersonIn the Software and IT Industry

Page 10: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

100+ Per PersonAt the Internet Giants

Page 11: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

How do they do it?

Page 12: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Software Systems:Containers, Clustering, Monitoring

Enabling Teams To:Organize, Specialize, Take Risks

Page 13: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

you

Page 14: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

you as a sw engineer

Page 15: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

with Ada.Text_IO;

procedure Hello_World is

use Ada.Text_IO;

begin

Put_Line("Hello, world!");

end;

#include <stdio.h>

int main()

{

printf("Hello, world!\n");

}

package main

import "fmt"

func main() {

fmt.Println("Hello, world!")

}

Page 16: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your containerimage

Page 17: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your /bin/java/opt/app.jar/lib/libc

Page 18: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your /bin/python/opt/app.py/lib/libc

Page 19: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

yourquay.io/coreos/etcd

Page 20: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

yourquay.io/coreos/etcd

sha256:d474e8c57737

Page 21: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your d474e8c57737625c

Signed By: Alice

Page 22: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

you as an ops engineer

Page 23: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

Page 24: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

quay.io/coreos/etcdx3

Page 25: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

quay.io/coreos/etcdx3

Page 26: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

quay.io/coreos/prometheusx1

Page 27: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

your

quay.io/coreos/dexx2

Page 28: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

ContainersApplication Packaging

Page 29: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

package main

import "fmt"

func main() {

fmt.Println("Hello, world!")

}

Page 30: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ git clone git://github.com/coreos/etcd

$ docker build . -t quay.io/coreos/etcd:v3.1.0

$ docker push quay.io/coreos/etcd:v3.1.0

Building and Hosting

Page 31: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Dockerfile Build System

$ cat DockerfileFROM golangADD . /go/src/github.com/coreos/etcdADD cmd/vendor /go/src/github.com/coreos/e...RUN go install github.com/coreos/etcdEXPOSE 2379 2380ENTRYPOINT ["etcd"]

Page 32: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

containerimage

Page 33: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

/bin/etcd/lib/libc

Page 34: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

quay.io/philips/etcd

Page 35: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 36: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Running ContainersApplication Packaging

Page 37: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ docker run -d quay.io/philips/etcd:v3.1.0 -d

$ pidof etcd

24725

$ cat /proc/24725/mounts | grep overlay

/ overlay workdir=/var/lib/docker/overlay/7134

Normal Linux Processes!

Page 38: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Abstract away app from the OS

OS App

Page 39: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Traditional Linux

Page 40: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Containers

Required Software

Page 41: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Clustering

Page 42: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

ClusteringServer Botnets!

Page 43: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

100+ Per PersonAt the Internet Giants

Page 44: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

100+ Per PersonToo many for manual placement

Page 45: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

100+ Per PersonToo many for manual placement

Page 46: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

100+ Per PersonToo many for manual placement

Page 47: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ while read host; ssh $host … < hosts

???

Page 48: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ while read host; ssh $host … < hosts

???

Page 49: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ while read host; ssh $host … < hosts

Problems: No monitoring, no state to recover

Page 50: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 51: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 52: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run --replicas=3 quay.io/coreos/dex

Page 53: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run --replicas=3 quay.io/coreos/dex

Solution: Monitoring, and state on computers

Page 54: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run --replicas=3 quay.io/coreos/dex

Page 55: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run --replicas=3 quay.io/coreos/dex

Page 56: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run --replicas=3 quay.io/coreos/dex

Page 57: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 58: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 59: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 60: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

???

Page 61: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

???

Page 62: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Simple cluster operations

Secure and Simple APIFriendly operational tools

Page 63: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

ClusteringFacing Failure

Page 64: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Simple cluster operations

Secure and Simple APIFriendly operational tools

Page 65: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

etcd Overview

Introduced in 2013 by CoreOSPersistent database of KubernetesAuto-leader election for availability

Page 66: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 67: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 68: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 69: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 70: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 71: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 72: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 73: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 74: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 75: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 76: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Consistent Infrastructure Everywhere

Kubernetes Everywhere

Page 77: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

AWS

APIs

k8s A

PIkubectl

AWS VPC

v1.5.2

EC2 EC2 EC2

EBSEBSEBS

Page 78: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Azur

e A

PIs

k8s A

PIkubectl

VirtualNet

v1.5.2

VM VM VM

DiskDiskDisk

Page 79: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Goog

le A

PIs

k8s A

PIkubectl

VirtualNet

v1.5.2

VM VM VM

PDPDPD

Page 80: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Digi

talo

cean

API

sk8

s API

kubectl

VirtualNet

v1.5.2

Droplet Droplet Droplet

VolVolVol

Page 81: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Ope

nSta

ck A

PIs

k8s A

PIkubectl

VirtualNet

v1.5.2

Instance Instance Instance

VolVolVol

Page 82: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

k8s A

PIkubectl

Ethernet

v1.5.2

Bare Metal Bare Metal Bare Metal

SANSANSAN

Page 83: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Consistency on all major components

● Compute: Physical, Virtual Machine, Cloud

● Networking: VXLAN, BGP, IPIP, forwarding, etc

● Storage: EBS, NFS, GlusterFS, Cinder, etc

● Load Balancing: ELB, nginx, Cloud LB, etc

Page 84: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

FederationHandling Too Much Success

Page 85: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 86: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 87: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 88: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 89: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 90: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 91: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

work-in-progress

Page 92: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Labels, The Kubernetes Way

Service Discovery

Page 93: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

frontend

philips

prod

frontend

rithu

dev

backend

rithu

dev

backend

philips

prod

Page 94: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

frontend

philips

prod

frontend

rithu

dev

backend

rithu

dev

backend

philips

prod

Page 95: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

frontend

philips

prod

frontend

rithu

dev

backend

rithu

dev

backend

philips

prod

Page 96: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

frontend

philips

dev

frontend

rithu

prod

backend

rithu

dev

backend

philips

prod

Page 97: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Scaling ApplicationsReacting to Demand

Page 98: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

ReplicaSet

Page 99: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

ReplicaSet

Page 100: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 101: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Overview

Scaling Complex Apps

Page 102: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ kubectl run db --image=quay.io/my/db

Creating a Database is Easy on Kubernetes

Page 103: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

● Resize/Upgrade - coordination for availability

● Reconfigure - tedious generation / templating

● Backup - requires coordination on instances

● Healing - observe and act for recovery

Managing a Distributed Database is Harder

Page 104: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Introducing

Operators

Page 105: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ cat my-db-cluster.yamlspec: clusterSize: 3 readReplicas: 2 version: v4.0.1

The Dream

Page 106: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 107: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

$ cat etcd-cluster.yamlspec: clusterSize: 3 version: v3.1.0

etcd Operator Resource

Page 108: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

etcd Operator

Page 109: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

MonitoringFoundation of Production

Page 110: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Prometheus Operator

● Operates Prometheus on k8s● Handles common tasks:

○ Create/Destroy○ Monitor Configuration○ Services Targets via Labels

● Configured by resources

Page 111: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 112: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 113: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

What's Next?Kubernetes Next Steps

Page 114: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Kubernetes Next Steps

● Healthy growth of the open source community● Better metrics and monitoring● Ever improving security defaults● Support for more cloud platforms● More pre-packaged applications● https://github.com/kubernetes/features

Page 115: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

CoreOS MissionSecure the Internet

Page 116: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 117: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Documents

Commerce

Communications

Page 118: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

~100,000,000Servers Worldwide

Page 119: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Self Driving Infrastructure

Page 120: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

CoreOS Confidential - Do Not Distribute

What is self-driving infrastructure

Applying updates to our infrastructure software

much like the way updates are applied to our phones

1 1

Page 121: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

CoreOS Confidential - Do Not Distribute

Why self driving infrastructure

Patching Software is important

Page 122: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 123: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 124: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips
Page 125: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Container Linux

Updating Container Linux

VM / Bare MetalOS

Update

Page 126: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Updating Container Linux

Container Linux

OSUpdateVM / Bare Metal

Page 127: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Updating Container Linux

Container Linux

VM / Bare Metal

Page 128: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Kubernetes

Updating Kubernetes

DeploymentAPI ServerContainer

Page 129: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Kubernetes

Updating Kubernetes

API ServerContainerDeployment

Page 130: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Kubernetes

Updating Kubernetes

Deployment

Page 131: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Azur

e A

PIs

k8s A

PIkubectl

VirtualNet

v1.5.1

VM VM VM

PDPDPD

Page 132: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Azur

e A

PIs

k8s A

PIkubectl

VirtualNet

v1.5.2

VM VM VM

PDPDPD

Page 133: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Free StuffGet Kubernetes For Yourself

Page 134: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Minikube - Kubernetes on your laptop

All-in-one Virtual Machine

Single file download

Latest Kubernetes

github.com/kubernetes/minikube

Page 135: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Tectonic Free Tier

Pure upstream Kubernetes

Production configuration

Bare metal and AWS installer(more coming soon)

coreos.com/tectonic

Page 136: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Join UsBuild great code

Page 137: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

github.com/coreos

Container Focused Operating System

Clustered Database

Identity & Federation

Hack on Operating Systems

Build distributed systems

Geek out on internet identity protocols

10+ other major projects

Page 138: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

github.com/kubernetes

Most active project on GitHub

Dozens of special interest groups

Not just code! Docs, PM, and more

Page 139: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Work WIth UsCommunity is taking off

Page 140: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

What container and PaaS tools are used to manage OpenStack applications?

OpenStack User Survey, April 2016, openstack.org.

Developer engagement

“The Further Evolution of Kubernetes,” March 2016.

Page 141: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

CoreOS is running the world’s containersWe’re hiring: [email protected]

[email protected]

90+ Projects on GitHub, 1,000+ Contributors

coreos.com

Support plans, training and more

OPEN SOURCE ENTERPRISE

Page 142: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

coreos.com/fest@coreosfest

May 31 - June 1, 2017San Francisco

Page 143: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

[email protected]

@BrandonPhilips

linkedin.com/in/brandonphilips

QUESTIONS?

Thanks!

We’re hiring: coreos.com/careers

Let’s talk!

IRC

More events: coreos.com/community

LONGER CHAT?

Page 144: The Internet on Kubernetes Containing Infrastructure · Containing Infrastructure The Internet on Kubernetes Brandon Philips CTO & Co-Founder, CoreOS @BrandonPhilips

Self-Driving KubernetesPreview