Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Containers, Clusters & 
Kubernetes 
Brendan Burns 
Staff Software Engineer
Motivations 
Make writing 
BigTable a CS 101 
Exercise
What is a container? 
What is a container? 
● Lightweight Linux environment 
● Hermetically sealed, deployable 
application 
● Introspectable, runnable artifact 
● Recently popularized by Docker
What is a cluster?
The transition to logical compute 
VM 
Container 
Container 
Container 
Logical Compute Substrate 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
Container 
VM VM VM VM VM VM VM VM VM
Modular Application Design 
VM 
Database 
Dependencies 
WebServer 
MiddleWare 
Database 
Container 
Dependency 
VM 
WebServer 
Container 
Dependency 
Middleware 
Container 
Dependency 
vs.
Modular Scaling 
VM 
Datab 
ase 
Depende 
ncies 
WebSer 
ver 
Middle 
Ware 
Database 
Container 
Dependency 
WebServer 
Container 
Dependency 
Middleware 
Container 
Dependency 
vs. 
VM 
Depende 
ncies 
WebSer 
ver 
Middle 
Ware 
Datab 
ase 
VM 
Depende 
ncies 
WebSer 
ver 
Middle 
Ware 
Datab 
ase 
Middleware 
Container 
Dependency 
WebServer 
Container 
Dependency 
VM VM 
WebServer 
Container 
Dependency
What is Kubernetes? 
● Open source container cluster manager 
● Inspired by the technology that drives 
Google 
● Runs anywhere: 
○ Public Cloud 
○ Private Cloud 
○ Bare Metal 
● Strong ecosystem 
○ Partners: Red Hat, VMWare, CoreOS, 
Microsoft, ... 
○ Community: Client libs, integration, ...
The Cloud Dichotomy 
IaaS 
PaaS
A brief history of programming languages 
Assembly 
Assembly 
PostScript
A brief history of programming languages 
Assembly 
OAbsjseecmt Oblryiented Languages 
PostScript
The Cloud Dichotomy 
IaaS 
ICaaaaSS 
PaaS
Components
Components: Pods 
Kubernetes Pod 
Container-1 Container-2 
Shared 
Volume(s)
Components: Sidecars 
Kubernetes Pod 
Serving 
Container 
Git Sync 
Container 
Shared 
Volume 
Git Repo 
Sidecars Extend and Enhance
Components: Adapters 
Kubernetes Pod 
Redis Service Redis 
Adapter 
Kubernetes Pod 
MongoDB 
Service 
MongoDB 
Adapter 
Kubernetes Pod 
MySQL 
Service 
MySQL 
Adapter 
Monitoring Service 
Adapters Normalize and Abstract
Components: Ambassadors 
Kubernetes Pod 
Frontend 
Container 
MySQL 
Ambassador 
Container Container Container 
Read Slaves 
Container 
Write Master 
localhost 
Ambassadors Proxy and Represent
Encapsulation
Abstractions, ftw! : Reliability 
{Container, Health Check} 
Kubernetes 
Container 
Web: http://<container>/some/path/to/health 
Shell: exec /some/path/health.sh 
TCP: open <container> <port>
Abstractions, ftw! : Replication 
{Template, Identifier, Num. Replicas} 
Replication 
Controller 
Container Container Container Container
Abstractions, ftw! : Services 
{IP:Port, Identifier, Name} 
Discoverable 
Service 
Container Container Container Container 
DNS 
Service IP 
Container
Patterns
Patterns and Interfaces: Master Election 
Lock Service 
Cluster Manager 
http://<container>/healthz 
Container Container Container Container
Patterns and Interfaces: Master Election 
Lock Service 
Cluster Manager 
http://.../master?master=container1 
Container Container Container Container
Patterns: Sharded HTTP Service 
http://foo.com/alpha 
http://foo.com/beta 
http://foo.com/gamma 
Kubernetes Service 
Container Container Container 
http://foo.com/alpha http://foo.com/beta http://foo.com/gamma
Patterns: Hot Sharded HTTP Service 
http://foo.com/alpha @ 20 qps 
http://foo.com/beta @ 5 qps 
http://foo.com/gamma @ 5 qps 
Kubernetes Service 
Container Container Container 
http://foo.com/alpha http://foo.com/beta 
http://foo.com/gamma 
http://foo.com/alpha
Patterns: Bigtable 
Kubernetes Service 
http://.../api/get?key=<key> 
http://.../api/set?key=<k>&val=<v> 
Container 
http://.../manage/shard/<shard>/split 
http://.../manage/shard/<shard>/merge 
http://.../manage/shard/<shard>/load 
http://.../manage/shard/<shard>/unload 
Data 
Interface 
Management 
Interface
We’re building an os for the datacenter. 
Join us! 
#google-containers on FreeNode 
https://github.com/GoogleCloudPlatform/kubernetes 
https://cloud.google.com/container-engine/
Stop

More Related Content

Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014

  • 1. Containers, Clusters & Kubernetes Brendan Burns Staff Software Engineer
  • 2. Motivations Make writing BigTable a CS 101 Exercise
  • 3. What is a container? What is a container? ● Lightweight Linux environment ● Hermetically sealed, deployable application ● Introspectable, runnable artifact ● Recently popularized by Docker
  • 4. What is a cluster?
  • 5. The transition to logical compute VM Container Container Container Logical Compute Substrate Container Container Container Container Container Container Container Container Container Container Container Container Container Container Container VM VM VM VM VM VM VM VM VM
  • 6. Modular Application Design VM Database Dependencies WebServer MiddleWare Database Container Dependency VM WebServer Container Dependency Middleware Container Dependency vs.
  • 7. Modular Scaling VM Datab ase Depende ncies WebSer ver Middle Ware Database Container Dependency WebServer Container Dependency Middleware Container Dependency vs. VM Depende ncies WebSer ver Middle Ware Datab ase VM Depende ncies WebSer ver Middle Ware Datab ase Middleware Container Dependency WebServer Container Dependency VM VM WebServer Container Dependency
  • 8. What is Kubernetes? ● Open source container cluster manager ● Inspired by the technology that drives Google ● Runs anywhere: ○ Public Cloud ○ Private Cloud ○ Bare Metal ● Strong ecosystem ○ Partners: Red Hat, VMWare, CoreOS, Microsoft, ... ○ Community: Client libs, integration, ...
  • 10. A brief history of programming languages Assembly Assembly PostScript
  • 11. A brief history of programming languages Assembly OAbsjseecmt Oblryiented Languages PostScript
  • 12. The Cloud Dichotomy IaaS ICaaaaSS PaaS
  • 14. Components: Pods Kubernetes Pod Container-1 Container-2 Shared Volume(s)
  • 15. Components: Sidecars Kubernetes Pod Serving Container Git Sync Container Shared Volume Git Repo Sidecars Extend and Enhance
  • 16. Components: Adapters Kubernetes Pod Redis Service Redis Adapter Kubernetes Pod MongoDB Service MongoDB Adapter Kubernetes Pod MySQL Service MySQL Adapter Monitoring Service Adapters Normalize and Abstract
  • 17. Components: Ambassadors Kubernetes Pod Frontend Container MySQL Ambassador Container Container Container Read Slaves Container Write Master localhost Ambassadors Proxy and Represent
  • 19. Abstractions, ftw! : Reliability {Container, Health Check} Kubernetes Container Web: http://<container>/some/path/to/health Shell: exec /some/path/health.sh TCP: open <container> <port>
  • 20. Abstractions, ftw! : Replication {Template, Identifier, Num. Replicas} Replication Controller Container Container Container Container
  • 21. Abstractions, ftw! : Services {IP:Port, Identifier, Name} Discoverable Service Container Container Container Container DNS Service IP Container
  • 23. Patterns and Interfaces: Master Election Lock Service Cluster Manager http://<container>/healthz Container Container Container Container
  • 24. Patterns and Interfaces: Master Election Lock Service Cluster Manager http://.../master?master=container1 Container Container Container Container
  • 25. Patterns: Sharded HTTP Service http://foo.com/alpha http://foo.com/beta http://foo.com/gamma Kubernetes Service Container Container Container http://foo.com/alpha http://foo.com/beta http://foo.com/gamma
  • 26. Patterns: Hot Sharded HTTP Service http://foo.com/alpha @ 20 qps http://foo.com/beta @ 5 qps http://foo.com/gamma @ 5 qps Kubernetes Service Container Container Container http://foo.com/alpha http://foo.com/beta http://foo.com/gamma http://foo.com/alpha
  • 27. Patterns: Bigtable Kubernetes Service http://.../api/get?key=<key> http://.../api/set?key=<k>&val=<v> Container http://.../manage/shard/<shard>/split http://.../manage/shard/<shard>/merge http://.../manage/shard/<shard>/load http://.../manage/shard/<shard>/unload Data Interface Management Interface
  • 28. We’re building an os for the datacenter. Join us! #google-containers on FreeNode https://github.com/GoogleCloudPlatform/kubernetes https://cloud.google.com/container-engine/
  • 29. Stop