An Introduction to
Kubernetes
Imesh Gunaratne
Product Lead, WSO2 Private PaaS
Committer & PMC Member, Apache Stratos
Agenda
● Linux Containers
● Docker
● Kubernetes
● Kubernetes Architecture
● Kubernetes Demo
Linux Containers
Linux Containers
Linux Container Brief for IEEE WG P2302, Boden Russell
Linux Containers
An operating system–level virtualization
method for running multiple isolated Linux
systems (containers) ...
Linux Kernel Features used by Linux
Containers
● Namespaces
(mnt, pid, net, ipc, uts/hostname, user ids)
● cgroups
(cpu, m...
LXC Engine: A Hypervisor for
Containers
Linux Container Brief for IEEE WG P2302, Boden Russell
More about Linux Containers
https://linuxcontainers.org
Docker
● A platform for managing Linux Containers
● Began as an open-source implementation of
the deployment engine which ...
Docker is built on
● cgroup and namespacing capabilities of
the Linux kernel
● Go programming language
(written in Go)
● D...
Virtual Machines Vs Docker
https://www.docker.com/whatisdocker/
Docker Architecture
Enterprise Docker, Adrien BLIND, Aurelien GABET, Arnaud MAZIN
Docker Image Structure
https://docs.docker.com/terms/image/
Docker - Hello World
# Get one base Docker image
>docker pull ubuntu
# List Docker images available
>docker images
# Run h...
Detached mode
# Run hello world in detached mode (-d)
>docker run -d ubuntu sh -c "while true; do echo
hello world; sleep ...
Problems with standalone Docker
Load Balancer
Docker Containers
Docker Host
● Running a server cluster on a set of Docker ...
Kubernetes
Kubernetes
● Kubernetes is a platform for hosting Docker
containers in a clustered environment with
multiple Docker hosts
...
Key Concepts of Kubernetes
● Pod - A group of Containers
● Labels - Labels for identifying pods
● Kubelet - Container Agen...
Kubernetes Architecture
Overlay Network: 10.1.0.0/16
(Flannel, Open vSwitch, etc)
Kubernetes
Master
Kubernetes
Minion 1
Ku...
Kubernetes Master
Kubernetes Master
Kubelet Info Service
API Scheduler Replication Controllers
Kubernetes Minion (Worker Node)
Kubernetes Minion
Kubelet
Proxy
Pod 1 Pod 2 Pod n
cAdvisor
ContainersContainersContainers
...
Kubernetes Component Architecture
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/DESIGN.md
Kubernetes Demo
References
● http://en.wikipedia.org/wiki/Virtualization
● http://en.wikipedia.org/wiki/Hypervisor
● http://en.wikipedia.o...
References
● SELinux for Everyday Users, PaulWay
● http://en.wikipedia.org/wiki/Seccomp
● http://en.wikipedia.org/wiki/Chr...
An Introduction to Kubernetes
Nächste SlideShare
Wird geladen in …5
×

An Introduction to Kubernetes

28.980 Aufrufe

Veröffentlicht am

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.

Veröffentlicht in: Software
  • Kubernetes Minion are now Kubernetes Nodes
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

An Introduction to Kubernetes

  1. 1. An Introduction to Kubernetes Imesh Gunaratne Product Lead, WSO2 Private PaaS Committer & PMC Member, Apache Stratos
  2. 2. Agenda ● Linux Containers ● Docker ● Kubernetes ● Kubernetes Architecture ● Kubernetes Demo
  3. 3. Linux Containers
  4. 4. Linux Containers Linux Container Brief for IEEE WG P2302, Boden Russell
  5. 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. 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. 7. LXC Engine: A Hypervisor for Containers Linux Container Brief for IEEE WG P2302, Boden Russell
  8. 8. More about Linux Containers https://linuxcontainers.org
  9. 9. 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
  10. 10. 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
  11. 11. Virtual Machines Vs Docker https://www.docker.com/whatisdocker/
  12. 12. Docker Architecture Enterprise Docker, Adrien BLIND, Aurelien GABET, Arnaud MAZIN
  13. 13. Docker Image Structure https://docs.docker.com/terms/image/
  14. 14. 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
  15. 15. 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
  16. 16. 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!
  17. 17. Kubernetes
  18. 18. 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
  19. 19. 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
  20. 20. 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
  21. 21. Kubernetes Master Kubernetes Master Kubelet Info Service API Scheduler Replication Controllers
  22. 22. Kubernetes Minion (Worker Node) Kubernetes Minion Kubelet Proxy Pod 1 Pod 2 Pod n cAdvisor ContainersContainersContainers ContainersContainersContainers ContainersContainersContainers Kubernetes Services Kubernetes Services Kubernetes Services
  23. 23. Kubernetes Component Architecture https://github.com/GoogleCloudPlatform/kubernetes/blob/master/DESIGN.md
  24. 24. Kubernetes Demo
  25. 25. References ● 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-Enhanced_Linux ● http://www.lorien.ch/server/chroot.html
  26. 26. References ● 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=Fcb4aoSAZ98 ● http://www.slideshare.net/enakai/architecture- overview-kubernetes-with-red-hat-enterprise-linux-71

×