KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

28
Eric Lewis Web Developer Interactive News @ The New York Times @ericandrewlewis (short for Eric Andrew Lewis not Eric and Rew Lewis!)

Transcript of KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Page 1: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Eric LewisWeb DeveloperInteractive News @ The New York Times@ericandrewlewis (short for Eric AndrewLewis not Eric and Rew Lewis!)

Page 2: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Kubernetes in use atKubernetes in use atThe New York TimesThe New York Times

Page 3: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Interactive NewsInteractive NewsDeveloper-JournalistsDeveloper-Journalists

assisting with novel formsassisting with novel formsof news coverageof news coverage

Page 4: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

The (Photo) BackpackThe (Photo) Backpack

Page 5: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Parsing election dataParsing election data

https://github.com/newsdev/elex/

Page 6: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

QuizzesQuizzes

Page 7: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Electionresult datacollation

Quizmaker

Watermarktool

LiveCoverage

RealtimeQ&A

NYTimesen Español

+ manymore

Lots of applicationsLots of applications

Page 8: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

We're generalist,We're generalist,web-leaningweb-leaningdevelopersdevelopers

Page 9: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

In a deadline-drivenIn a deadline-drivenenvironment, developersenvironment, developers

need concentratedneed concentratedresponsibility.responsibility.

Page 10: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

We wanted a self-We wanted a self-service, dev-friendlyservice, dev-friendlyapplication platformapplication platform

Page 11: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

1. Give developer an application server2. Give developer an application

server without root access3. Let developer provision a server with Chef4. Automate the use of Chef5. Use containers loaded via Fleet6. Use containers loaded via Kubernetes

A brief history of ourA brief history of ourinfrastructureinfrastructure

Page 12: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

ContainerizationContainerizationbreaks down barriersbreaks down barriersbetween developerbetween developer

and sys adminand sys admin

Page 13: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Containers let you run VarnishContainers let you run Varnishin minutes to debug VCLin minutes to debug VCL

Page 14: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
Page 15: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

Self-service in VMs vs KubeSelf-service in VMs vs Kube

app app app

app app app

app app app

Page 16: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

Apps in VMs are expensiveApps in VMs are expensive

"You need sign off tocreate an app because a

VM costs money"

Page 17: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

SingleAppVM

VMs require configurationVMs require configuration

"We need to set upnetworking for your app"

"Only I have the cloud providercredentials to do that"

Page 18: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Creating an app inCreating an app inKubernetes isKubernetes is

nominalnominal

Page 19: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

We wanted moreWe wanted morethan kubectlthan kubectl

Page 20: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

App = service + rcApp = service + rc

Page 21: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Opinionated DeploysOpinionated Deploys

Page 22: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Add secretsAdd secrets

Page 23: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Next step: startNext step: startusing Kube Dashboardusing Kube Dashboard

Page 24: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Request FlowRequest Flow

Page 25: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
Page 26: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

some-app.pub.prod.int.nytimes.com=>

some-app.pub.svc.cluster.local

Default service domain namesDefault service domain names

www.nytimes.com/something => some-app

Path-based service routingPath-based service routing

Redirects + Static asset proxyRedirects + Static asset proxy

Page 27: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom
Page 28: KubeCon EU 2016: Kubernetes in Production in The New York Times newsroom

Eric Lewis@ericandrewlewis