Share
Embed
Transcript
19 slides
-
Why Containers*? 1. Packaging 2. Efficiency and Speed 3. Security
(?) (*) Container = Docker flavor container -
Static application environment No stress deployment and update Repeatable portable
artifact Develop here, run there Pick your cloud solely on its merits Loosely coupled = easier to build and manage Easier to build and manage Compose applications from micro-services Packaging -
Everything at Google runs in a container. • Resource isolation
• Predictability • Quality of service • Efficient overcommit • Resource accounting Google starts over 2 billion containers per week. Images by Connie Zhou Efficiency -
Docker " 15000+ GitHub stars " 600+ contributors " 100's
of projects built on top of Docker ◦ UIs, mini-PaaS, … ◦ github.com/google/cadvisor ◦ github.com/GoogleCloudPlatform/heapster " Very popular GitHub project ◦ Most popular Go project of all time ◦ $ docker run -‐i -‐t ubuntu /bin/bash -‐p 80:80 -
Kubernetes κυβερνήτης: Greek for “pilot” or “helmsman of a ship”
the open source cluster manager from Google -
Kubernetes • Employs and promotes Docker • Simple, portable, extensible
modular framework for container-based service app management • Patterned after internal systems in Google that manage internet-scale workloads • Written in Go github.com/GoogleCloudPlatform/kubernetes -
Node Container Manager Scheduled Containers Managed Base OS Managed Base
OS Node Container Manager Scheduled Containers Cluster Scheduler Simplified Cluster Management Stack Scheduled Containers -
Managed Base OS kubelet Scheduled Containers Managed Base OS kubelet
+ Docker Kubernetes Master etcd Kubernetes Container Stack Scheduled Containers Scheduled Containers -
Kubernetes glossary - Master: the managing machine, which oversees one
or more minions. - Minion: a slave that runs tasks as delegated by the user and Kubernetes master. - Pod: an application that runs on a minion. - Replication controller: Verifies everything that should be running is running. - Label: an arbitrary key/value pair that the Replication Controller uses for service discovery - kubecfg: the config tool - Service: an amalgamation of similar pods -
Kubernetes Master/Scheduler Kubernetes Machine Host Machine Host Machine Host Machine
Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent MINIONS -
Log Roller Web Server Machine Host Machine Host Machine Host
Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes Master/Scheduler Pods -
FE FE FE FE FE FE BE BE BE BE
BE BE BE BE BE Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler Too Many Pods -
labels: role: frontend FE FE FE FE FE FE BE
BE BE BE BE BE BE BE BE Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler Labels -
labels: role: frontend stage: production Machine Host Machine Host Machine
Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler FE FE FE FE FE FE BE BE BE BE BE BE BE BE BE Labels -
FE FE FE FE replicas: 4 template: ... labels: role:
frontend stage: production Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler Replication Controller -
FE replicas: 1 template: ... labels: role: frontend stage: production
Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler Replication Controller -
FE FE FE replicas: 3 template: ... labels: role: frontend
stage: production Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Kubernetes - Master/Scheduler Replication Controller -
Clone Kubernetes at: github.com/GoogleCloudPlatform/kubernetes IRC: #google-containers on Freenode Google
group: google-containers Kubernetes on GCE (new!): https://cloud.google.com/ compute/docs/containers