SlideShare a Scribd company logo
Docker & 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
• Technology and Architecture Leading Group
• Big data processing engine
• Advanced analytics algorithms
• Systematize service deployment and service operation on cluster
• Docker
• Kubernetes
Prepare for an era of cloud with Docker and Kubernetes
oracle
ubuntu
cloud
Major technologies
Docker
Kubernetes
Amazon Web Service
Microsoft azure
Cloud technologies
for service providers
icloud
Cloud services
for users
one drive
dropbox
google
drive
Trend
- Buy both SW & HW
- Buy HW and DIY
- Run your SW on cloud
Ubiquitous cloud services
around us
Enabling technologies
for custom cloud services
* technology trend in USA (2004-2017)
Overview & Conclusion
• Docker to build portable software
• Build your software upon Docker
• Then distribute it anywhere (even on MS Azure and Amazon Web Service)
• Kubernetes to orchestrate multiple Docker instances
• Start using Docker and Kubernetes before too late!
• Google has been using container technologies more than 10 years
Docker
Kubernetes
Hadoop
The Enterprise IT Adoption CyclePopularity of Docker and Kubernetes
Docker
Motivation
Enabling technologies for Docker
How to use Docker
Docker came to save us from the dependency hell
Docker Dependency hell
Portable software
Dependency hell
Development
environment
Production
environment
Your program
program1
v2
program2
v2
program3
v2
depends on
Your program
program1
v2
program2
v2
program3
v2
depends on depends on
Customer program
program1
v1
program2
v1
program3
v1
conflict!
Package manager Package manager
Few choices left to you
1. Convince your customer (a.k.a. 甲)
2. Install all the dependencies manually (without the package manager)
3. Modify your program to make it depend v1
Docker container
Package manager in host OS
Use Docker for isolating your application
Package manager in guest OS
Your program
program1
v2
program2
v2
program3
v2
depends ondepends on
Customer program
program1
v1
program2
v1
program3
v1
Host operating system
Linux kernel must be ≥3.10 (such as Ubuntu 14.04 and CentOS 7)
Docker engine (daemon)
Virtual machines and docker containers
Host Operating System
Kernel
Hypervisor Docker engine
Virtual machines Docker containers
Device drivers
Host Operating System
Kernel Device drivers
CentOS-like
container
yum
Libraries
App
Ubuntu-like
container
apt
App
Libraries
CentOS
virtual machine
Kernel Device
drivers
yum
Libraries
App
Ubuntu
virtual machine
Kernel
apt
App
Libraries
Device
drivers
Containers share the kernel in the host
Linux namespaces – what makes isolated environments in a host OS
Host Operating System
Docker engine
Container
pid
ipc
uts
net
mnt
user
Various ipc objects
- POSIX message queue
- SystemV IPC objects
(mq, sem, shm)
System identifiers
- hostname
- NIS domain name
Network devices
- Network devices
- IPv4, IPv6 stacks
- Routing tables, Firewall
Mount points
(directory hierarchy)
Security-related identifiers
- User IDs
- Group IDs
Process ID number space
(staring from 1)
Container
pid
ipc
uts
net
mnt
user
Container
pid
ipc
uts
net
mnt
user
Six namespaces are enough to give an illusion of running inside a virtual machine
Analogy between program and docker
Dockerfile Docker image
(read-only layers)
Docker container
(read-only layers + writable layer)
Source code Byte/machine code
(read only)
Process
(read only)
text
data
heap
stack
compile execute
build run
Program
Docker
How to define an image and run a container from it?
1) Write Dockerfile
- Specify to install python with pip on ubuntu
- Tell pip to install numpy
2) Build an image from Dockerfile
- Execute each line of Dockerfile to build an image
3) Execute a Docker container from the image
1 to N relationship between image and container
Execute five containers from an image
Q) Five containers take up 2,445MB (=489MB*5) in the host?
A) No due to image layering & sharing
Images consists of layers each of which is a set of files
• Instructions (FROM, RUN, CMD, etc) create layers
• Base images (imported by “FROM”) also consist of layers
• If a file exists in multiple layers, the one in the upper layer is seen
Dockerfile
Base ubuntu image
Layer (apt-get install python-dev python-pip)
Layer (pip install numpy)
Layer
Layer (files)
Layer (files)
Layer (files)
Image
Docker container
• A container is just a thin read/write layer
• base images are not copied to containers
• 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
ubuntu:15.04 image (~188MB) does not copied to all containers
Layer sharing between images
If multiple Dockerfiles
1. start from the same base image
2. share a sequence of instructions (one RUN instruction in a below example)
, then docker engine automatically reuses existing layers
numpy Dockerfile matplotlib Dockerfile
Example of stacking docker images
Kafka broker PdM engine
kafka
(with scala)
Zookeeper
container
Kafka
container
PdM engine
(librdkafka, avro, flask)
cuda
PdM engine
(librdkafka, avro, flask)
scipy
(numpy, scipy, matplotlib, ipython, jupyter, pandas, scikit-learn, h5py)
theano-gpu (theano, keras)
theano-cpu
(theano, keras)
openjdk:8
zookeeper
buildpack-deps:jessie
python:2.7
buildpack-deps:jessie-curl
official
official
official
official
Zookeeper cluster
zk
zk
zkzk
zk
broker
broker
broker
Kafka
consumer
Kafka
producer
Web server
scipy libraries has nothing to
do with GPU, so share it
theano compiles
its expression graphs into
CPU/GPU instructions
PdM container (cpu) PdM container (gpu)
buildpack-deps:jessie-scm
debian:jessie
official
official
jessie is the latest, stable
Debian release
buildpack-deps contains
essential tools to
download/compile softwares
Enabling technologies for docker (wrap-up)
• Linux namespaces (covered)
• To isolate system resources
• pid, net, ipc, mnt, uts, user
• It makes a secure & isolate environment (like a VM)
• Advanced multi-layer unification File System (covered)
• Image layering & sharing
• Linux control groups (not covered)
• To track, limit, and isolate resources
• CPU, memory, network, and IO
* 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
• The purpose of this section is
to briefly explain Kubernetes without details
• For a detailed explanation
with the exact Kubernetes terminology,
see the following slide
• https://www.slideshare.net/ssuser6bb12d/kubernetes-introduction-
71846110
What is Kubernetes for?
Container-based virtualization + Container orchestration
To satisfy common needs in production
replicating application instances
naming and discovery
load balancing
horizontal auto-scaling
co-locating helper processes
mounting storage systems
distributing secrets
application health checking
rolling updates
resource monitoring
log access and ingestion
...
from the official site : https://kubernetes.io/docs/whatisk8s/
Why Docker with Kubernetes?
• A mission of our group
• Systematize service deployment and service operation on cluster
• I believe that systematizing smth. is to minimize human efforts on smth.
• How to minimize human efforts on service deployment?
• Make software portable using a container technology
• Docker (chosen for its maturity and popularity)
• Rkt from CoreOS (alternative)
• Build images and run containers anywhere
• Your laptop, servers, on-premise clusters, even cloud
• How to minimize human efforts on service operation?
• Inform a container orchestration runtime of service specification
• Kubernetes from Google (chosen for its maturity and expressivity)
• Docker swarm from Docker
• Define your specification and then the runtime operates your services as you wish
Kubernetes architecture
Server
- REST API server with a K/V store
- Scheduler
- Find suitable machines for containers
- Controller manager
- Current state  Desired state
- Make changes if states go undesirable
Service specification
(written in yaml)
- Execute a web-server image
- Two replicas for LB & HA
- 3GB memory each
Docker engine
Node agent
container
(3GB)
Docker engine
Node agent
container
(3GB)
Docker engine
Node agent
container
(3GB)
Ensure a specified
# of replicas running
all the time
Web server example
node 2
webserver
node 1
webserver
node 3
webserver
Want to launch 3 replicas
for high availability and load balancing
How to achieve the followings?
• Users must be unaware of the replicas
• Traffic is evenly distributed to replicas
webserver
4bp80
webserver
6dk12
webserver
g1sdf
a well-known address
It’s a piece of cake with Kubernetes!
How to replicate your service instances
node 2
webserver
6dk12
node 1
webserver
4bp80
node 3
webserver
g1sdfapp=web1 app=web1 app=web1
Server
Node agent Node agent Node agent
Docker engine Docker engine Docker engine
Specify your Docker image and a replication factor
using Deployment
Specify a common label
to group containers with
different names
node 2node 1 node 3
Define a service to do round-robin forwarding
Server
<service>
webserver:80
webserver
6dk12
webserver
4bp80
webserver
g1sdfapp=web1 app=web1 app=web1
33% 33% 33%
<ingress>
metatron:80
External traffic
over internet
Internal traffic
Kubernetes runs its own DNS server for name resolution
Kubernetes manipulates iptables on each node to proxy traffic
Kubernetes
How to guarantee a certain # of running containers during maintenance
node1
zk-0
Containers
Volumes
node2
zk-2
Containers
Volumes
node3
zk-3
Containers
Volumes
Drain node1
Operation is permitted
because allowed-disruptions=1
Kubernetes
Drain node2
3 replicas have to be running
due to StatefulSet,
so try scheduling zk-0
on other nodes!
Oops!
cannot schedule zk-0
on node2 and node3
due to anti-affinity!
Operation not permitted
because allowed-disruptions=0
(Note that minAvailable=2)
Please wait until
node1 is up and zk-0 is rescheduled!
node1
zk-0
Containers
Volumes
node2
zk-2
Containers
Volumes
node3
zk-3
Containers
Volumes
Define disruption budget
to specify requirement for
the minimum available containers
Hold on for a while
PdM Kubernetes cluster
Zookeeper headless service Kafka headless service
PdM service
QuorumPeer
Main
QuorumPeer
Main
QuorumPeer
Main
Pod Pod Pod
Kafka
(broker)
Kafka
(broker)
Kafka
(broker)
Pod Pod Pod2181
2888
3888
2181
2888
3888
2181
2888
3888
9092
9092
9092
Statefulset Statefulset
PdM engine
Kafka
consumer
Kafka
producer
Web
server
Pod (Deployment)
Ingress
rule
8080
Persistent
storage
Attached
volume
Volume
80
Overview & Conclusion
• Docker to build portable software
• Build your software upon Docker
• Then distribute it anywhere (even on MS Azure and AWS)
• Kubernetes to orchestrate multiple Docker instances
• Start using Docker and Kubernetes before too late!
• Google has been using container technologies more than 10 years
Docker
Kubernetes
Hadoop
The Enterprise IT Adoption CyclePopularity of Docker and Kubernetes
the end
Ad

More Related Content

What's hot (20)

DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Crevise Technologies
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introduction
Dongwon Kim
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
Ramit Surana
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
Amit Manwade
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Instruqt
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
Ravindu Fernando
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
DuckDuckGo
 
Dockerfile
Dockerfile Dockerfile
Dockerfile
Jeffrey Ellin
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Martin Danielsson
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
Araf Karsh Hamid
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
fazalraja
 
Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기
raccoony
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
Suraj Khetani
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Robert Reiz
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introduction
Dongwon Kim
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
Ramit Surana
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
Amit Manwade
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Instruqt
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
Ravindu Fernando
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
fazalraja
 
Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기Docker (Compose) 활용 - 개발 환경 구성하기
Docker (Compose) 활용 - 개발 환경 구성하기
raccoony
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
Suraj Khetani
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Robert Reiz
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 

Similar to Docker and kubernetes (20)

Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM France Lab
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
Simon Storm
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
balaji257
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
Wyn B. Van Devanter
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
Jason Hu
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
Patrick Chanezon
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
Containers and Cloud: From LXC to Docker to Kubernetes
Containers and Cloud: From LXC to Docker to KubernetesContainers and Cloud: From LXC to Docker to Kubernetes
Containers and Cloud: From LXC to Docker to Kubernetes
Shreyas MM
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
Araf Karsh Hamid
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
Michigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOFMichigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOF
Jeffrey Sica
 
Docker Devops document for short summary
Docker Devops document for short  summaryDocker Devops document for short  summary
Docker Devops document for short summary
AdiB912552
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
Ajeet Singh Raina
 
Containers 101
Containers 101Containers 101
Containers 101
Black Duck by Synopsys
 
Cont0519
Cont0519Cont0519
Cont0519
Samuel Dratwa
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM France Lab
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
Simon Storm
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
Jason Hu
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
Containers and Cloud: From LXC to Docker to Kubernetes
Containers and Cloud: From LXC to Docker to KubernetesContainers and Cloud: From LXC to Docker to Kubernetes
Containers and Cloud: From LXC to Docker to Kubernetes
Shreyas MM
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
Michigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOFMichigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOF
Jeffrey Sica
 
Docker Devops document for short summary
Docker Devops document for short  summaryDocker Devops document for short  summary
Docker Devops document for short summary
AdiB912552
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
Ajeet Singh Raina
 
Ad

Recently uploaded (20)

AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Ad

Docker and kubernetes

  • 1. Docker & Kubernetes Dongwon Kim, PhD Big Data Tech. Lab SK Telecom
  • 2. Big Data Tech. Lab in SK telecom • Discovery Group • Predictive Maintenance Group • Manufacturing Solution Group • Groups making own solutions • Technology and Architecture Leading Group • Big data processing engine • Advanced analytics algorithms • Systematize service deployment and service operation on cluster • Docker • Kubernetes
  • 3. Prepare for an era of cloud with Docker and Kubernetes oracle ubuntu cloud Major technologies Docker Kubernetes Amazon Web Service Microsoft azure Cloud technologies for service providers icloud Cloud services for users one drive dropbox google drive Trend - Buy both SW & HW - Buy HW and DIY - Run your SW on cloud Ubiquitous cloud services around us Enabling technologies for custom cloud services * technology trend in USA (2004-2017)
  • 4. Overview & Conclusion • Docker to build portable software • Build your software upon Docker • Then distribute it anywhere (even on MS Azure and Amazon Web Service) • Kubernetes to orchestrate multiple Docker instances • Start using Docker and Kubernetes before too late! • Google has been using container technologies more than 10 years Docker Kubernetes Hadoop The Enterprise IT Adoption CyclePopularity of Docker and Kubernetes
  • 6. Docker came to save us from the dependency hell Docker Dependency hell Portable software
  • 7. Dependency hell Development environment Production environment Your program program1 v2 program2 v2 program3 v2 depends on Your program program1 v2 program2 v2 program3 v2 depends on depends on Customer program program1 v1 program2 v1 program3 v1 conflict! Package manager Package manager
  • 8. Few choices left to you 1. Convince your customer (a.k.a. 甲) 2. Install all the dependencies manually (without the package manager) 3. Modify your program to make it depend v1
  • 9. Docker container Package manager in host OS Use Docker for isolating your application Package manager in guest OS Your program program1 v2 program2 v2 program3 v2 depends ondepends on Customer program program1 v1 program2 v1 program3 v1 Host operating system Linux kernel must be ≥3.10 (such as Ubuntu 14.04 and CentOS 7) Docker engine (daemon)
  • 10. Virtual machines and docker containers Host Operating System Kernel Hypervisor Docker engine Virtual machines Docker containers Device drivers Host Operating System Kernel Device drivers CentOS-like container yum Libraries App Ubuntu-like container apt App Libraries CentOS virtual machine Kernel Device drivers yum Libraries App Ubuntu virtual machine Kernel apt App Libraries Device drivers Containers share the kernel in the host
  • 11. Linux namespaces – what makes isolated environments in a host OS Host Operating System Docker engine Container pid ipc uts net mnt user Various ipc objects - POSIX message queue - SystemV IPC objects (mq, sem, shm) System identifiers - hostname - NIS domain name Network devices - Network devices - IPv4, IPv6 stacks - Routing tables, Firewall Mount points (directory hierarchy) Security-related identifiers - User IDs - Group IDs Process ID number space (staring from 1) Container pid ipc uts net mnt user Container pid ipc uts net mnt user Six namespaces are enough to give an illusion of running inside a virtual machine
  • 12. Analogy between program and docker Dockerfile Docker image (read-only layers) Docker container (read-only layers + writable layer) Source code Byte/machine code (read only) Process (read only) text data heap stack compile execute build run Program Docker
  • 13. How to define an image and run a container from it? 1) Write Dockerfile - Specify to install python with pip on ubuntu - Tell pip to install numpy 2) Build an image from Dockerfile - Execute each line of Dockerfile to build an image 3) Execute a Docker container from the image
  • 14. 1 to N relationship between image and container Execute five containers from an image Q) Five containers take up 2,445MB (=489MB*5) in the host? A) No due to image layering & sharing
  • 15. Images consists of layers each of which is a set of files • Instructions (FROM, RUN, CMD, etc) create layers • Base images (imported by “FROM”) also consist of layers • If a file exists in multiple layers, the one in the upper layer is seen Dockerfile Base ubuntu image Layer (apt-get install python-dev python-pip) Layer (pip install numpy) Layer Layer (files) Layer (files) Layer (files) Image
  • 16. Docker container • A container is just a thin read/write layer • base images are not copied to containers • 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
  • 17. Image sharing between containers ubuntu:15.04 image (~188MB) does not copied to all containers
  • 18. Layer sharing between images If multiple Dockerfiles 1. start from the same base image 2. share a sequence of instructions (one RUN instruction in a below example) , then docker engine automatically reuses existing layers numpy Dockerfile matplotlib Dockerfile
  • 19. Example of stacking docker images Kafka broker PdM engine kafka (with scala) Zookeeper container Kafka container PdM engine (librdkafka, avro, flask) cuda PdM engine (librdkafka, avro, flask) scipy (numpy, scipy, matplotlib, ipython, jupyter, pandas, scikit-learn, h5py) theano-gpu (theano, keras) theano-cpu (theano, keras) openjdk:8 zookeeper buildpack-deps:jessie python:2.7 buildpack-deps:jessie-curl official official official official Zookeeper cluster zk zk zkzk zk broker broker broker Kafka consumer Kafka producer Web server scipy libraries has nothing to do with GPU, so share it theano compiles its expression graphs into CPU/GPU instructions PdM container (cpu) PdM container (gpu) buildpack-deps:jessie-scm debian:jessie official official jessie is the latest, stable Debian release buildpack-deps contains essential tools to download/compile softwares
  • 20. Enabling technologies for docker (wrap-up) • Linux namespaces (covered) • To isolate system resources • pid, net, ipc, mnt, uts, user • It makes a secure & isolate environment (like a VM) • Advanced multi-layer unification File System (covered) • Image layering & sharing • Linux control groups (not covered) • To track, limit, and isolate resources • CPU, memory, network, and IO * https://mairin.wordpress.com/2011/05/13/ideas-for-a-cgroups-ui/
  • 21. 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/
  • 23. Disclaimer • The purpose of this section is to briefly explain Kubernetes without details • For a detailed explanation with the exact Kubernetes terminology, see the following slide • https://www.slideshare.net/ssuser6bb12d/kubernetes-introduction- 71846110
  • 24. What is Kubernetes for? Container-based virtualization + Container orchestration To satisfy common needs in production replicating application instances naming and discovery load balancing horizontal auto-scaling co-locating helper processes mounting storage systems distributing secrets application health checking rolling updates resource monitoring log access and ingestion ... from the official site : https://kubernetes.io/docs/whatisk8s/
  • 25. Why Docker with Kubernetes? • A mission of our group • Systematize service deployment and service operation on cluster • I believe that systematizing smth. is to minimize human efforts on smth. • How to minimize human efforts on service deployment? • Make software portable using a container technology • Docker (chosen for its maturity and popularity) • Rkt from CoreOS (alternative) • Build images and run containers anywhere • Your laptop, servers, on-premise clusters, even cloud • How to minimize human efforts on service operation? • Inform a container orchestration runtime of service specification • Kubernetes from Google (chosen for its maturity and expressivity) • Docker swarm from Docker • Define your specification and then the runtime operates your services as you wish
  • 26. Kubernetes architecture Server - REST API server with a K/V store - Scheduler - Find suitable machines for containers - Controller manager - Current state  Desired state - Make changes if states go undesirable Service specification (written in yaml) - Execute a web-server image - Two replicas for LB & HA - 3GB memory each Docker engine Node agent container (3GB) Docker engine Node agent container (3GB) Docker engine Node agent container (3GB) Ensure a specified # of replicas running all the time
  • 27. Web server example node 2 webserver node 1 webserver node 3 webserver Want to launch 3 replicas for high availability and load balancing How to achieve the followings? • Users must be unaware of the replicas • Traffic is evenly distributed to replicas webserver 4bp80 webserver 6dk12 webserver g1sdf a well-known address It’s a piece of cake with Kubernetes!
  • 28. How to replicate your service instances node 2 webserver 6dk12 node 1 webserver 4bp80 node 3 webserver g1sdfapp=web1 app=web1 app=web1 Server Node agent Node agent Node agent Docker engine Docker engine Docker engine Specify your Docker image and a replication factor using Deployment Specify a common label to group containers with different names
  • 29. node 2node 1 node 3 Define a service to do round-robin forwarding Server <service> webserver:80 webserver 6dk12 webserver 4bp80 webserver g1sdfapp=web1 app=web1 app=web1 33% 33% 33% <ingress> metatron:80 External traffic over internet Internal traffic Kubernetes runs its own DNS server for name resolution Kubernetes manipulates iptables on each node to proxy traffic
  • 30. Kubernetes How to guarantee a certain # of running containers during maintenance node1 zk-0 Containers Volumes node2 zk-2 Containers Volumes node3 zk-3 Containers Volumes Drain node1 Operation is permitted because allowed-disruptions=1 Kubernetes Drain node2 3 replicas have to be running due to StatefulSet, so try scheduling zk-0 on other nodes! Oops! cannot schedule zk-0 on node2 and node3 due to anti-affinity! Operation not permitted because allowed-disruptions=0 (Note that minAvailable=2) Please wait until node1 is up and zk-0 is rescheduled! node1 zk-0 Containers Volumes node2 zk-2 Containers Volumes node3 zk-3 Containers Volumes Define disruption budget to specify requirement for the minimum available containers Hold on for a while
  • 31. PdM Kubernetes cluster Zookeeper headless service Kafka headless service PdM service QuorumPeer Main QuorumPeer Main QuorumPeer Main Pod Pod Pod Kafka (broker) Kafka (broker) Kafka (broker) Pod Pod Pod2181 2888 3888 2181 2888 3888 2181 2888 3888 9092 9092 9092 Statefulset Statefulset PdM engine Kafka consumer Kafka producer Web server Pod (Deployment) Ingress rule 8080 Persistent storage Attached volume Volume 80
  • 32. Overview & Conclusion • Docker to build portable software • Build your software upon Docker • Then distribute it anywhere (even on MS Azure and AWS) • Kubernetes to orchestrate multiple Docker instances • Start using Docker and Kubernetes before too late! • Google has been using container technologies more than 10 years Docker Kubernetes Hadoop The Enterprise IT Adoption CyclePopularity of Docker and Kubernetes