Traditional virtualization technologies have been used by cloud infrastructure providers for many years in providing isolated environments for hosting applications. These technologies make use of full-blown operating system images for creating virtual machines (VMs). According to this architecture, each VM needs its own guest operating system to run application processes. More recently, with the introduction of the Docker project, the Linux Container (LXC) virtualization technology became popular and attracted the attention. Unlike VMs, containers do not need a dedicated guest operating system for providing OS-level isolation, rather they can provide the same level of isolation on top of a single operating system instance.
An enterprise application may need to run a server cluster to handle high request volumes. Running an entire server cluster on Docker containers, on a single Docker host could introduce the risk of single point of failure. Google started a project called Kubernetes to solve this problem. Kubernetes provides a cluster of Docker hosts for managing Docker containers in a clustered environment. It provides an API on top of Docker API for managing docker containers on multiple Docker hosts with many more features.
5. Linux Containers
An operating system–level virtualization
method for running multiple isolated Linux
systems (containers) on a single control host.
http://en.wikipedia.org/wiki/LXC
6. Linux Kernel Features used by Linux
Containers
● Namespaces
(mnt, pid, net, ipc, uts/hostname, user ids)
● cgroups
(cpu, memory, disk, i/o - resource management)
● AppArmor, SELinux
(security/access control)
● seccomp
(computation isolation)
● chroot
(file system isolation)
http://www.slideshare.net/imesh/evoluation-of-linux-container-virtualization
7. LXC Engine: A Hypervisor for
Containers
Linux Container Brief for IEEE WG P2302, Boden Russell
10. Docker
● A platform for managing Linux Containers
● Began as an open-source implementation of
the deployment engine which powers
dotCloud
● Started in March, 2013
● Provided an easy to use API and powerful
container image management features
● Attracted the community very fast
https://github.com/docker/docker/blob/master/README.md
11. Docker is built on
● cgroup and namespacing capabilities of
the Linux kernel
● Go programming language
(written in Go)
● Docker Image Specification
(for container image management)
● Libcontainer Specification
(namespaces, filesystem, resources, security, etc)
https://github.com/docker/docker/blob/master/README.md
15. Docker - Hello World
# Get one base Docker image
>docker pull ubuntu
# List Docker images available
>docker images
# Run hello world
>docker run ubuntu:14.04 echo "hello world"
Docker Paris Meetup, Victor Vieux, dotCloud Inc
16. Detached mode
# Run hello world in detached mode (-d)
>docker run -d ubuntu sh -c "while true; do echo
hello world; sleep 1; done"
# Get container’s ID
>docker ps
# Attach to the container
>docker attach <container-id>
# Stop/start/restart the container
>docker stop <container-id>
Docker Paris Meetup, Victor Vieux, dotCloud Inc
17. Problems with standalone Docker
Load Balancer
Docker Containers
Docker Host
● Running a server cluster on a set of Docker containers,
on a single Docker host is vulnerable to single point of
failure!
19. Kubernetes
● Kubernetes is a platform for hosting Docker
containers in a clustered environment with
multiple Docker hosts
● Provides container grouping, load
balancing, auto-healing, scaling features
● Project was started by Google
● Contributors == Google, CodeOS, Redhat,
Mesosphere, Microsoft, HP, IBM, VMWare,
Pivotal, SaltStack, etc
20. Key Concepts of Kubernetes
● Pod - A group of Containers
● Labels - Labels for identifying pods
● Kubelet - Container Agent
● Proxy - A load balancer for Pods
● etcd - A metadata service
● cAdvisor - Container Advisor provides resource
usage/performance statistics
● Replication Controller - Manages replication
of pods
● Scheduler - Schedules pods in worker nodes
● API Server - Kubernetes API server
21. Kubernetes Architecture
Overlay Network: 10.1.0.0/16
(Flannel, Open vSwitch, etc)
Kubernetes
Master
Kubernetes
Minion 1
Kubernetes
Minion 2
Kubernetes
Minion n
Service Network:
172.17.8.0/24
etcd
Docker
Registry
API
Replication
Controllers
Scheduler
Kubelet Proxy
cAdvisor Pods
Docker A Docker B