Docker Kubernetes: Dongwon Kim, PHD Big Data Tech. Lab SK Telecom
Docker Kubernetes: Dongwon Kim, PHD Big Data Tech. Lab SK Telecom
Kubernetes
Dongwon Kim, PhD
Big Data Tech. Lab
SK Telecom
Big Data Tech. Lab in SK telecom
• Discovery Group
• Predictive Maintenance Group
• Manufacturing Solution Group
• Groups making own solutions
cloud
dropbox
one
drive
Cloud technologies Enabling technologies
for service providers for custom cloud services Amazon Web Service
Hadoop
Docker
Kubernetes
Portable software
Dependency hell
Development Production
environment environment
conflict!
Package manager Package manager
Few choices left to you
Six namespaces are enough to give an illusion of running inside a virtual machine
Container Container
Network devices Container
Process ID number space - Network devices
pid (staring from 1)
net - IPv4, IPv6 stacks pid net pid net
- Routing tables, Firewall
Docker engine
compile execute
Program heap
data
text
buil run
Docker d
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
openjdk:8 official
buildpack-deps:jessie official
buildpack-deps contains
essential tools to
buildpack-deps:jessie-curl
official download/compile softwares
buildpack-deps:jessie-scm officia l
zk zk broker Kafka
Kafka
consumer producer
Enabling technologies for docker (wrap-up)
* https://mairin.wordpress.com/2011/05/13/ideas-for-a-cgroups-ui/
Docker topics not covered here
• How to install Docker engine
• What are the docker instructions other than FROM, RUN, and CMD
• ENV / ADD / ENTRYPOINT / LABEL / EXPOSE / COPY / VOLUME / WORKDIR /
ONBUILD
• How to push local Docker images to docker hub
• How to pull remote images from docker hub
• ...
Consult with
https://docs.docker.com/engine/getstarted/
Kubernetes
Motivation
A motivating example
Disclaimer
Serve
Service specification - REST API server with a K/V store
(written in yaml) - Scheduler
r
- 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
Server
Docker engine
Docker engine Docker engine
<ingress>
Server metatron:80
<service>
webserver:80
Internal traffic
node 1
node 2
node 3
Kubernetes Kubernetes
Oops!
Volumes 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
Po Po Po Po Po Po
d d d d d d
QuorumPee QuorumPee QuorumPee Kafka Kafka Kafka
r Main r Main r Main (broker (broker (broker
) ) )
218
218
288
388
909
218
288
388
288
388
909
909
1
2
Kafka Kafka
consumer producer
Web
Volume Attache serve
d
r Ingres
volume PdM engine 8080
s
80
Persisten
t Pod (Deployment) rule
storage
PdM service
Overview & Conclusion
Hadoop
Docker
Kubernetes