Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An Introduction to Kubernetes


Published on

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.

Published in: Software
  • Login to see the comments

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.
  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)
  7. 7. LXC Engine: A Hypervisor for Containers Linux Container Brief for IEEE WG P2302, Boden Russell
  8. 8. More about Linux Containers
  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
  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)
  11. 11. Virtual Machines Vs Docker
  12. 12. Docker Architecture Enterprise Docker, Adrien BLIND, Aurelien GABET, Arnaud MAZIN
  13. 13. Docker Image Structure
  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: (Flannel, Open vSwitch, etc) Kubernetes Master Kubernetes Minion 1 Kubernetes Minion 2 Kubernetes Minion n Service Network: 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
  24. 24. Kubernetes Demo
  25. 25. References ● ● ● ● cloud/papers/lxc-namespace.pdf ● ● ● ●
  26. 26. References ● SELinux for Everyday Users, PaulWay ● ● ● Linux Container Brief for IEEE WG P2302, Boden Russell ● ● ● overview-kubernetes-with-red-hat-enterprise-linux-71