SlideShare a Scribd company logo
1 of 34
Download to read offline
Kubernetes: 
Managing Containers the Google way 
CodeMotion Milan, 28 Nov 2014 
Riccardo Carlesso 
Technical Solution Engineer 
ricc@google.com 
http://goo.gl/3LpbZW
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 
Inspired by Google's systems and experience: 
Manage Containers, not Machines 
Efficient & Robust: 
• optimized packing 
• active monitoring => self healing 
Organizationally Scalable: 
• Hassle-free maintanance => 
Enables micro-services 
Modern Open Source: 
• Written in Go 
• Hosted on github 
• Apache 2.0 licensed
Simplified Cluster Management Stack 
Cluster Scheduler 
Scheduled 
Containers 
Scheduled 
Containers 
Scheduled Containers 
Node Container Manager 
Node Container Manager 
Managed Base OS 
Managed Base OS
Kubernetes Container Stack 
Kubernetes Master 
etcd 
Scheduled 
Containers 
Scheduled 
Containers 
Scheduled Containers 
kubelet + Docker 
kubelet 
Managed Base OS 
Managed Base OS
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
Web Server 
Log Roller 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Kubernetes 
Master/Scheduler 
Machine 
Host 
Machine 
Host 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Pods
FE 
FE 
FE 
FE 
BE 
FE 
FE 
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 
BE 
FE 
FE 
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 
BE 
Machine 
Host 
Machine 
Host 
BE 
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 
Labels
Replication Controller 
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
Declarative Over Imperative 
Imperative: 
"for pod in pod{001..100} ; start $pod 
Declarative: 
"Run 100 copies of this pod with a target of 
<= 2 tasks down at any time" 
Pros: 
• Repeatable 
• "Set it and forget it" 
• Eventually consistent 
• Easily updatable 
Con: 
• Tracing action/reaction can be difficult. 
"I made a change, is it done?" 
Image: "Space Needle under construction, 1961" seattlemunicipalarchives CC-BY-2.0 http://www.flickr. 
com/photos/seattlemunicipalarchives/6847114249
id: backend-service 
port: 9000 
labels: 
role: backend 
stage: production 
Pods are auto-placed: COOL! 
but: How to direct FE->BE traffic ? 
Backend Service 
BE BE BE BE 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Container 
Agent 
Service 
FE 
port: 9000 
Load-Balancing 
Service proxy Service proxy Service proxy Service proxy Service proxy Service proxy
Demo (Guestbook) 
Redis 
Master 
Finish 
Master Service 
Redis 
Slave 
Redis 
Slave 
Slave Service 
PHP 
Frontend 
PHP 
Frontend PHP 
Frontend
myDB Service 
[app=myDB] 
Managing LifeCycle 
myDB 
ver=1 
myDB 
ver=1 
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 
[app=myDB; ver=1] 
replicas=5 
myDB 
ver=1 
myDB 
ver=1 
myDB 
ver=1
myDB Service 
[app=myDB] 
Managing LifeCycle 
myDB 
ver=1 
myDB 
ver=1 
Machine 
Host 
Machine 
Host 
Machine 
Host 
Machine 
Host 
myDB 
ver=2 
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 
[app=myDB; ver=1] 
replicas=3 
Replication Controller 
[app=myDB; ver=2] 
replicas=2 
myDB 
ver=2 
myDB 
ver=1
We’re taking lessons we’ve learned and open sourcing them 
Kubernetes is evolving 
We’re eager to hear from you! 
1 
2 
3 
Summing Up
We are just getting started... 
Clone Kubernetes at: 
github.com/GoogleCloudPlatform/kubernetes 
IRC: #google-containers on Freenode 
Google group: google-containers 
Reach out: 
ricc@google.com 
Kubernetes on GCE (new!): https://cloud.google. 
com/compute/docs/containers 
Presentation: http://goo.gl/3LpbZW
Backup slides 
Full screen QR code for feedback ⇒
Step 1: Create a redis master 
jdk$ ls 
README.md index.php redis-slave 
frontend-controller-jdk.json php-redis redis-slave-controller.json 
frontend-controller.json redis-master-service.json redis-slave-service.json 
jdk$ ../../cluster/kubecfg.sh -c redis-master.json create pods 
ID Image(s) Host Labels Status 
---------- ---------- ---------- ---------- ---------- 
redis-master-2 dockerfile/redis / name=redis-master Waiting 
jdk-macbookpro2:guestbook jdk$ ../../cluster/kubecfg.sh list pods 
ID Image(s) Host Labels Status 
---------- ---------- ---------- ---------- ---------- 
redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Waiting 
jdk-macbookpro2:guestbook jdk$ ../../cluster/kubecfg.sh list pods 
ID Image(s) Host Labels Status 
---------- ---------- ---------- ---------- ---------- 
redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Running
Step 1: master.json 
{ 
"id": "redis-master-2", 
"kind": "Pod", 
"apiVersion": "v1beta1", 
"desiredState": { 
"manifest": { 
"version": "v1beta1", 
"id": "redis-master-2", 
"containers": [{ 
"name": "master", 
"image": "dockerfile/redis", 
"ports": [{ 
"containerPort": 6379, 
"hostPort": 6379 
}] 
}] 
} 
}, 
"labels": { 
"name": "redis-master" 
} 
}
Step 2: Create a redis master service 
jdk$ ls 
README.md index.php redis-slave 
frontend-controller-jdk.json php-redis redis-slave-controller.json 
frontend-controller.json redis-master-service.json redis-slave-service.json 
jdk$ ../../cluster/kubecfg.sh -c redis-master-service.json create services 
ID Labels Selector Port 
---------- ---------- ---------- ---------- 
redismaster name=redis-master 10000 
jdk$ … test redis somehow
Step 2: master.service 
{ 
"id": "redismaster", 
"kind": "Service", 
"apiVersion": "v1beta1", 
"port": 10000, 
"containerPort": 6379, 
"selector": { 
"name": "redis-master" 
} 
}
Step 3: Create redis slaves & service 
jdk$ ../../cluster/kubecfg.sh -c redis-slave-controller.json create replicationControllers 
ID Image(s) Selector Replicas 
---------- ---------- ---------- ---------- 
redisSlaveController brendanburns/redis-slave name=redisslave 2 
jdk$ ../../cluster/kubecfg.sh -c redis-slave-controller.json list pods 
ID Image(s) Host Labels Status 
---------- ---------- ---------- ---------- ---------- 
redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Running 
4df5661d-4e0b-11e4-957e-42010af01e53 brendanburns/redis-slave kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redisslave,replicationController=redisSlaveController Running 
4df6be88-4e0b-11e4-957e-42010af01e53 brendanburns/redis-slave kubernetes-minion-4.c.pivotal-gearing-505.internal/ name=redisslave,replicationController=redisSlaveController Running 
jdk$ ../../cluster/kubecfg.sh -c redis-slave-service.json create services 
ID Labels Selector Port 
---------- ---------- ---------- ---------- 
redisslave name=redisslave name=redisslave 10001 
jdk$ … test redis ...
Step 3: redis-slave-controller.service 
"id": "redisSlaveController", 
"kind": "ReplicationController", 
"apiVersion": "v1beta1", 
"desiredState": { 
"replicas": 2, 
"replicaSelector": {"name": "redisslave"}, 
"podTemplate": { 
"desiredState": { 
"manifest": { 
"version": "v1beta1", 
"id": "redisSlaveController", 
"containers": [{ 
"name": "slave", 
"image": "brendanburns/redis-slave", 
"ports": [{"containerPort": 6379, "hostPort": 6380}] 
}] 
} 
}, 
"labels": {"name": "redisslave"} 
}}, 
"labels": {"name": "redisslave"} 
}
Step 4: Create frontend servers 
jdk$ ../../cluster/kubecfg.sh -c frontend-controller.json create replicationControllers 
ID Image(s) Selector Replicas 
---------- ---------- ---------- ---------- 
frontendController brendanburns/php-redis name=frontend 3
Step 5: Enjoy :-)
Docker demo 
$ docker pull dockerfile/nginx 
...a7767ce9ec2c: Download complete…. 
$ docker run -t -i dockerfile/nginx /bin/bash 
[ root@055dbcc687d8]$ cd /usr/share/nginx/html 
[ root@055dbcc687d8]$ cp index.html jdk.html 
$ docker ps 
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 
055dbcc687d8 dockerfile/nginx:latest "/bin/bash" 21 minutes ago Up 21 minutes 443/tcp, 80/tcp kickass_wright 
…. 
$ docker commit … jdk1/nginx-modified 
$ docker push jdk1/nginx-modified 
$ docker pull jdk1/nginx-modified 
docker run -p 80:80 jdk1/nginx-modified /usr/sbin/nginx

More Related Content

More from Codemotion

Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Codemotion
 
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019Codemotion
 
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019Codemotion
 
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019Codemotion
 
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019Codemotion
 
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019Codemotion
 
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
 
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
Mete Atamel - Serverless with Knative - Codemotion Amsterdam 2019
 
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019
Rahul Shetty - Corporate relocation prediction - Codemotion Amsterdam 2019
 
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019
Mario Viviani - Designing apps for fire TV - Codemotion Amsterdam 2019
 
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019
Ilona Demidenko - Conversational Sign Up - Codemotion Amsterdam 2019
 
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
 
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019
Matteo Antony Mistretta - React, the Inglorious way - Codemotion Amsterdam 2019
 

Recently uploaded

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

Managed Containers, Open Source, and Google - Riccardo Carlesso - Codemotion Milan 2014

  • 1. Kubernetes: Managing Containers the Google way CodeMotion Milan, 28 Nov 2014 Riccardo Carlesso Technical Solution Engineer ricc@google.com http://goo.gl/3LpbZW
  • 2. Why Containers*? 1. Packaging 2. Efficiency and Speed 3. Security (?) (*) Container = Docker flavor container
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. Kubernetes κυβερνήτης: Greek for “pilot” or “helmsman of a ship” the open source cluster manager from Google
  • 7. Kubernetes Inspired by Google's systems and experience: Manage Containers, not Machines Efficient & Robust: • optimized packing • active monitoring => self healing Organizationally Scalable: • Hassle-free maintanance => Enables micro-services Modern Open Source: • Written in Go • Hosted on github • Apache 2.0 licensed
  • 8. Simplified Cluster Management Stack Cluster Scheduler Scheduled Containers Scheduled Containers Scheduled Containers Node Container Manager Node Container Manager Managed Base OS Managed Base OS
  • 9. Kubernetes Container Stack Kubernetes Master etcd Scheduled Containers Scheduled Containers Scheduled Containers kubelet + Docker kubelet Managed Base OS Managed Base OS
  • 10. 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
  • 11. Web Server Log Roller Machine Host Machine Host Machine Host Machine Host Machine Host Kubernetes Master/Scheduler Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Pods
  • 12. FE FE FE FE BE FE FE 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
  • 13. labels: role: frontend FE FE FE FE BE FE FE 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
  • 14. labels: role: frontend stage: production Machine Host Machine Host Machine Host BE Machine Host Machine Host BE 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 Labels
  • 15. Replication Controller 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
  • 16. 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
  • 17. 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
  • 18. Declarative Over Imperative Imperative: "for pod in pod{001..100} ; start $pod Declarative: "Run 100 copies of this pod with a target of <= 2 tasks down at any time" Pros: • Repeatable • "Set it and forget it" • Eventually consistent • Easily updatable Con: • Tracing action/reaction can be difficult. "I made a change, is it done?" Image: "Space Needle under construction, 1961" seattlemunicipalarchives CC-BY-2.0 http://www.flickr. com/photos/seattlemunicipalarchives/6847114249
  • 19. id: backend-service port: 9000 labels: role: backend stage: production Pods are auto-placed: COOL! but: How to direct FE->BE traffic ? Backend Service BE BE BE BE Machine Host Machine Host Machine Host Machine Host Machine Host Machine Host Container Agent Container Agent Container Agent Container Agent Container Agent Container Agent Service FE port: 9000 Load-Balancing Service proxy Service proxy Service proxy Service proxy Service proxy Service proxy
  • 20. Demo (Guestbook) Redis Master Finish Master Service Redis Slave Redis Slave Slave Service PHP Frontend PHP Frontend PHP Frontend
  • 21. myDB Service [app=myDB] Managing LifeCycle myDB ver=1 myDB ver=1 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 [app=myDB; ver=1] replicas=5 myDB ver=1 myDB ver=1 myDB ver=1
  • 22. myDB Service [app=myDB] Managing LifeCycle myDB ver=1 myDB ver=1 Machine Host Machine Host Machine Host Machine Host myDB ver=2 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 [app=myDB; ver=1] replicas=3 Replication Controller [app=myDB; ver=2] replicas=2 myDB ver=2 myDB ver=1
  • 23. We’re taking lessons we’ve learned and open sourcing them Kubernetes is evolving We’re eager to hear from you! 1 2 3 Summing Up
  • 24. We are just getting started... Clone Kubernetes at: github.com/GoogleCloudPlatform/kubernetes IRC: #google-containers on Freenode Google group: google-containers Reach out: ricc@google.com Kubernetes on GCE (new!): https://cloud.google. com/compute/docs/containers Presentation: http://goo.gl/3LpbZW
  • 25. Backup slides Full screen QR code for feedback ⇒
  • 26. Step 1: Create a redis master jdk$ ls README.md index.php redis-slave frontend-controller-jdk.json php-redis redis-slave-controller.json frontend-controller.json redis-master-service.json redis-slave-service.json jdk$ ../../cluster/kubecfg.sh -c redis-master.json create pods ID Image(s) Host Labels Status ---------- ---------- ---------- ---------- ---------- redis-master-2 dockerfile/redis / name=redis-master Waiting jdk-macbookpro2:guestbook jdk$ ../../cluster/kubecfg.sh list pods ID Image(s) Host Labels Status ---------- ---------- ---------- ---------- ---------- redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Waiting jdk-macbookpro2:guestbook jdk$ ../../cluster/kubecfg.sh list pods ID Image(s) Host Labels Status ---------- ---------- ---------- ---------- ---------- redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Running
  • 27. Step 1: master.json { "id": "redis-master-2", "kind": "Pod", "apiVersion": "v1beta1", "desiredState": { "manifest": { "version": "v1beta1", "id": "redis-master-2", "containers": [{ "name": "master", "image": "dockerfile/redis", "ports": [{ "containerPort": 6379, "hostPort": 6379 }] }] } }, "labels": { "name": "redis-master" } }
  • 28. Step 2: Create a redis master service jdk$ ls README.md index.php redis-slave frontend-controller-jdk.json php-redis redis-slave-controller.json frontend-controller.json redis-master-service.json redis-slave-service.json jdk$ ../../cluster/kubecfg.sh -c redis-master-service.json create services ID Labels Selector Port ---------- ---------- ---------- ---------- redismaster name=redis-master 10000 jdk$ … test redis somehow
  • 29. Step 2: master.service { "id": "redismaster", "kind": "Service", "apiVersion": "v1beta1", "port": 10000, "containerPort": 6379, "selector": { "name": "redis-master" } }
  • 30. Step 3: Create redis slaves & service jdk$ ../../cluster/kubecfg.sh -c redis-slave-controller.json create replicationControllers ID Image(s) Selector Replicas ---------- ---------- ---------- ---------- redisSlaveController brendanburns/redis-slave name=redisslave 2 jdk$ ../../cluster/kubecfg.sh -c redis-slave-controller.json list pods ID Image(s) Host Labels Status ---------- ---------- ---------- ---------- ---------- redis-master-2 dockerfile/redis kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redis-master Running 4df5661d-4e0b-11e4-957e-42010af01e53 brendanburns/redis-slave kubernetes-minion-2.c.pivotal-gearing-505.internal/ name=redisslave,replicationController=redisSlaveController Running 4df6be88-4e0b-11e4-957e-42010af01e53 brendanburns/redis-slave kubernetes-minion-4.c.pivotal-gearing-505.internal/ name=redisslave,replicationController=redisSlaveController Running jdk$ ../../cluster/kubecfg.sh -c redis-slave-service.json create services ID Labels Selector Port ---------- ---------- ---------- ---------- redisslave name=redisslave name=redisslave 10001 jdk$ … test redis ...
  • 31. Step 3: redis-slave-controller.service "id": "redisSlaveController", "kind": "ReplicationController", "apiVersion": "v1beta1", "desiredState": { "replicas": 2, "replicaSelector": {"name": "redisslave"}, "podTemplate": { "desiredState": { "manifest": { "version": "v1beta1", "id": "redisSlaveController", "containers": [{ "name": "slave", "image": "brendanburns/redis-slave", "ports": [{"containerPort": 6379, "hostPort": 6380}] }] } }, "labels": {"name": "redisslave"} }}, "labels": {"name": "redisslave"} }
  • 32. Step 4: Create frontend servers jdk$ ../../cluster/kubecfg.sh -c frontend-controller.json create replicationControllers ID Image(s) Selector Replicas ---------- ---------- ---------- ---------- frontendController brendanburns/php-redis name=frontend 3
  • 34. Docker demo $ docker pull dockerfile/nginx ...a7767ce9ec2c: Download complete…. $ docker run -t -i dockerfile/nginx /bin/bash [ root@055dbcc687d8]$ cd /usr/share/nginx/html [ root@055dbcc687d8]$ cp index.html jdk.html $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 055dbcc687d8 dockerfile/nginx:latest "/bin/bash" 21 minutes ago Up 21 minutes 443/tcp, 80/tcp kickass_wright …. $ docker commit … jdk1/nginx-modified $ docker push jdk1/nginx-modified $ docker pull jdk1/nginx-modified docker run -p 80:80 jdk1/nginx-modified /usr/sbin/nginx