kubernetes is for monoliths too

12

Click here to load reader

Upload: kubeacademy

Post on 16-Apr-2017

358 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Kubernetes is for Monoliths Too

KUBERNETES IS FOR MONOLITHS TOOKUBECON 2015, NOV 10, 2015

Steve Reed (@_smreed)

Page 2: Kubernetes is for Monoliths Too

ABOUT MEEarly Kubernetes adopter:

v0.5 in GCE ~Nov 2014One of the first production workloads12 commits, ~143 lines survive today

"GCE PD Data Loss"I have nothing to sell you today :)#3965

Page 3: Kubernetes is for Monoliths Too

MOTIVATIONEverybody should be considering Kubernetes

Google Searches For "Kubernetes" and "Microservices"

Not just for microservices

Page 4: Kubernetes is for Monoliths Too

HELMSMAN OF THE TITANIC

Probably don't do this.Remove this slide if someone else uses the title.

Page 5: Kubernetes is for Monoliths Too

OBJECT ORIENTED INFRASTRUCTURE?

Kubernetes Primitivesthey describe your applicationthey also describe requirements

Pods, Services, etc are the "interface" between yourinfrastructure and application.

Page 6: Kubernetes is for Monoliths Too

CONTAINERIZE...Monolithic Pod

"Megapod?" "Podolith?"Volume mounts where possible

configurationpersistent storagelogs

SecretsResource Limits?

Page 7: Kubernetes is for Monoliths Too

MONOLITHIC PODEverything's localhostDependencies are specified, enforcableNow make it better!

Demo

Page 8: Kubernetes is for Monoliths Too

REFACTORDatabase, SMTP

Needs to scale independentlyMight be used by other pods as they are addedWant ability to proxyWant dev environment "mocks"

Page 9: Kubernetes is for Monoliths Too

HARDCODE STUFF!Service hostnames are "guaranteed"monolith-db.default.svc.cluster.localsmtp-server.default.svc.cluster.local

localhost for everything inside the podstorage paths/var/log/monolith

Page 10: Kubernetes is for Monoliths Too

MORE IDEAS"Services without selectors"reverse proxy "adapter" container

ssl-terminationauthentication

pgpool "ambassador" to postgres"semantic pipelines"Secrets for certs, auth credentialsDefault ports (80 for HTTP, 443 for HTTPS)replace crond with sidecars, Jobs

Page 11: Kubernetes is for Monoliths Too

BONUS CONTENT?"dueling" replication controllers

Page 12: Kubernetes is for Monoliths Too

THANK YOUJust try Kubernetes.If you want to refactor your app, Kubernetes can help youget started!slides, code, examples@_smreed