Docker & Kubernetes: Dongwon Kim, PHD Big Data Tech. Lab SK Telecom
Docker & Kubernetes: Dongwon Kim, PHD Big Data Tech. Lab SK Telecom
• Discovery Group
• Predictive Maintenance Group
• Manufacturing Solution Group
• Groups making own solutions
cloud
dropbox
one drive
Kubernetes
Overview & Conclusion
Hadoop
Docker
Kubernetes
Portable software
Dependency hell
Development Production
environment environment
conflict!
Package manager Package manager
Few choices left to you
Kernel Device Kernel Device Containers share the kernel in the host
drivers drivers
Six namespaces are enough to give an illusion of running inside a virtual machine
Docker engine
Program heap
data
text
build run
Docker
How to define an image and run a container from it?
Image Dockerfile
Layer
• Copy-On-Write (COW)
• When a file in the base image is modified,
• copy the file to the R/W layer
• and then modify the copied file
Image sharing between containers
If multiple Dockerfiles
1. start from the same base image
2. share a sequence of instructions (one RUN instruction in a below example)
theano compiles
theano-gpu (theano, keras)
Kafka theano-cpu its expression graphs into
container (theano, keras) CPU/GPU instructions
cuda
Zookeeper
container kafka scipy
(with scala) (numpy, scipy, matplotlib, ipython, jupyter, pandas, scikit-learn, h5py) scipy libraries has nothing to
do with GPU, so share it
zookeeper python:2.7 official
debian:jessie official
jessie is the latest, stable
Debian release
Zookeeper cluster Kafka broker PdM engine
zk broker
zk zk
broker Web server
zk zk broker Kafka
Kafka
consumer producer
Enabling technologies for docker (wrap-up)
Server
Service specification - REST API server with a K/V store
(written in yaml) - Scheduler
- Execute a web-server image - Find suitable machines for containers
- Two replicas for LB & HA - Controller manager
- Current state Desired state
- 3GB memory each
- Make changes if states go undesirable
webserver
webserver webserver
a well-known address
How to achieve the followings?
• Users must be unaware of the replicas webserver webserver webserver
• Traffic is evenly distributed to replicas 4bp80 6dk12 g1sdf
Server
different names
node 1 node 2 node 3
Define a service to do round-robin forwarding External traffic
over internet
<ingress>
Server metatron:80
<service>
webserver:80
Internal traffic
Kubernetes Kubernetes
Oops!
cannot schedule zk-0
on node2 and node3 Please wait until
Hold on for a while due to anti-affinity! node1 is up and zk-0 is rescheduled!
PdM Kubernetes cluster
Statefulset Statefulset
Zookeeper headless service Kafka headless service
2181
2888
3888
2181
2888
3888
9092
9092
9092
Kafka Kafka
consumer producer
Web
Volume Attached server
volume Ingress
PdM engine 8080
rule
80
Persistent
storage Pod (Deployment)
PdM service
Overview & Conclusion
Hadoop
Docker
Kubernetes