This document provides an introduction and overview of Kubernetes. It discusses that Kubernetes is an open-source system for managing containerized applications across multiple hosts. It supports various cloud providers and container platforms. Kubernetes provides self-healing capabilities to automatically place, restart, and replicate applications. The document outlines key Kubernetes concepts like masters, minions, pods, services and labels. It provides examples of simple pod and replication controller configurations. It also gives a high-level overview of the Kubernetes architecture and components.
2. Agenda
• Talk 1: Commentary on google ‘Omega’ paper
• Talk 2: Introduction to Kubernetes with example
• Talk 3: Kubernetes Architecture
• Talk 4: Kubernetes golang code structure
• Talk 5: Areas to contribute in Kubernetes
• Talk 6: VMware`s contribution to Kubernetes
10
3. What is Kubernetes?
• System for Container Cluster Management
• Open Sourced by Google, launched in June 2014, Google I/O
• Supports Rackspace,GCE, CoreOS, Azure, vSphere
• Manages Docker containers as a default implementation but it will be
supporting other linux containers soon.
• Kubernetes is:
• lean: lightweight, simple, accessible
• portable: public, private, hybrid, multi cloud
• extensible: modular, pluggable, hookable, composable
• self-healing: auto-placement, auto-restart, auto-replication
11
5. Key Concepts
Master
Minion
Pod : Grouping for Containers
Service and Labels
Container
Kubernetes Node
Kubelet
Kubernetes Proxy
API Server
etcd
cAdvisor
13
6. Master
• Master maintains the State of the Kubernetes Server runtime
• It is the point of entry for all the client calls to configure and manage
Kubernetes components like Minions, Pods, Containers
• kubelet provides commands to display pod, service and replication controller
status.
• All the persistent master state is stored in instance of etcd which is high
availability key-store.
• Master is also made up of following components
API Server
Scheduler
Registries (Minon Registry, Pod Registry,Service Registry, Binding Registry)
14
7. Minion
• Represents the Host / VM where containers are created as per the supporterd
cloud providers.
• Minion is identified with a name and a HOST IP
• Key Components of a Minion;
PODs
Kubelet
cAdvisor
Proxy
• cAdvisor (Container Advisor) provides container users an understanding of
the resource usage and performance characteristics of their running containers.
It is a separate open-source project currently integrated with Kubernetes.
15
9. Important Terminologies
• Pod: It is the smallest scheduling unit in Kubernetes. It is a collection of
Docker containers that share volumes, and don’t have port conflicts.It can be
created easily by defining simple json file.
• kubectl: It is a command which provides master access to Kubernetes APIs.
Through it, the user can deploy, delete, list pods, among other things.
• kubelet: It is a service which runs on minions. It processes the container
manifests to ensure they are deployed as described by the user.
17
10. Pod Labels
• Labels are key/value pairs that are attached to objects, such as pods. Labels
can be used to organize and to select subsets of objects.
• Via a label selector, the client/user can identify a set of objects. The label
selector is the core grouping primitive in Kubernetes.
• Example of pod label;
environment=dev, environment=qa, environment=production
tier=frontend, tier=backend
user=vkohli,user=shrutis
18
13. Replication Controller
• Responsible for replicating a POD in case of failure.
• Replication Controllers should be defined during the creation of pods. Each
replicated pod will run on different minions in order to provide HA.
• Replication Manager is responsible for polling PODs and maintaining the pod
lifecycle.
• Replication controller can be defined in the similar way as pod using the json
file.
14. Replication Controller (contd.)
• Replication controller create new pods from templates, which is currently
inline to current replicationController object.
• Pods created by replication controller are subsequently updated.
• Lables play very important role in replication controller a loosely coupled
relation is created between pods and the controller.
• The replication controllers will generally carry same label as there pod to keep
the mapping.
22
16. Services
• Abstraction of a Software Service (e.g a relational data base), consists of a
proxy’s port and selector to determine the pod the service request should go to.
• Elements of a Service
Name
Port of the proxy
Labels of a Service
Selector
Uses LoadBalancer
Container Port
24
17. • Kubernetes pods can come up and go down anytime, while each pod gets its
own IP address those IP addresses can not be relied upon to be stable over
time.
• Suppose if some set of pods (let's call them backends) provides functionality
to other pods (let's call it front end) it cannot be achieved if we heavily tight
them each other as pods can come up and go.
• So to encounter this problem we define services which provides abstraction
and it offers clients an IP and port pair which, when accessed, redirects to the
appropriate backends. The set of pods targeted for is determined by a label
selector.
25
Services (contd.)
19. Guest book example
• This is a simple mulit-tier web application using kubernetes and Docker.
• One redis-master for storage.
• 2 redis-slave replicated pods.
• And also 3 front-end replicated pods running a php web application .
• We will be also running some services in order to make the pods independent
of each other.
27