k8s - An Intro
k8s - An Intro
to
Kubernetes
Agend
a
● Linux Containers
● Docker
● Kubernetes
● Kubernetes
Architecture
Linux
Containers
Linux
Containers
Linux
Containers
An operating system–level virtualization
method for running multiple isolated Linux
systems (containers) on a single control
host.
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)
LXC Engine: A Hypervisor for
Containers
Docke
r
● 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
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
Virtual Machines Vs
Docker
https://www.docker.com/whatisdocker/
Docker
Architecture
https://docs.docker.com/terms/image/
Docker - Hello
World
# Get one base Docker image
>docker p u l l ubuntu
# Get container’s ID
>docker ps
Docker
Containers
Docker Host
Replication
API Kubelet Proxy Docker A Docker B
Controllers
Kubernetes
Master
Kubernetes Minion (Worker
Node)
KKuubbeernnr
SKeurbveci re
eetS
eetSseservvr icci
Proxy nsetes
cAdvisor eess
Kubelet
CCContainers
oonntaat n
i ni CCContainers
oonntaat n
i ni CCContainers
oonntaat n
i ni
Kubernetes
Minion
Kubernetes Component
Architecture
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/DESIGN.md
Reference
s● http://en.wikipedia.org/wiki/Virtualization
● http://en.wikipedia.org/wiki/Hypervisor
● http://en.wikipedia.org/wiki/LXC
● http://www.cs.ucsb.edu/~rich/class/cs290-
cloud/papers/lxc-namespace.pdf
● http://en.wikipedia.org/wiki/Cgroups
● http://en.wikipedia.org/wiki/AppArmor
● http://en.wikipedia.org/wiki/Security-Enha
nced_Linux
● http://www.lorien.ch/server/chroot.html
Reference
s● SELinux for Everyday Users, PaulWay
● http://en.wikipedia.org/wiki/Seccomp
● http://en.wikipedia.org/wiki/Chroot
● Linux Container Brief for IEEE WG P2302,
Boden Russell
● http://kubernetes.io/
● https://www.youtube.com/watch?v=Fcb4aoSA
Z98
● http://www.slideshare.net/enakai/architecture-
overview-kubernetes-with-red-hat-enterprise-linux-71