image1 image2 image3

NISHI'S TECH BLOG|HELLO I'M NISHADI KIRIELLE|WELCOME TO MY TECH BLOG

Kubernetes, at a first glance

What is Kubernetes?




Yet another revolutionary discovery of google has come in to play in the name of Kubernetes as a result of Google's 10+  years of experience in containerized apps. In a nutshell, Kubernetes is an open source platform solution provided by Google to manage a cluster of containers.


Kubernetes has the ability of scheduling and running application containers on a cluster of physical or virtual machines. In managing the applications, the concepts of 'labels' and 'pods' are used to group the containers which make up an application. Currently, it supports Docker for containers.


The best part of Kubernetes is its self healing mechanisms such as auto restarting, rescheduling and container replicating used to manage the 'desired state' requested by the user. When the user defines the required state, Kubernetes ensures that the state is maintained at all times on the cluster. For an example if a server goes down, it brings it back again to maintain the state.


Typically, the deployment of a containerized application is a lot of hard work. For an example, think of an application that has a cluster of containers across multiple hosts. Say it has a web tier, application tier and a database tier running on different set of containers. In order the application to function properly, it has to communicate between web tier, application tier and the database tier. That is communication between separate containers. This needs a lot of hard work including scripting, monitoring and management of containers. But, with Kubernetes the problem is solved as it does all the hard work for the user.



Kubernetes Terminology

Pod


            
A pod is a single schedulable unit in Kubernetes which represents a co-located group of containers. It can not span machines, thus all the containers within a pod should be scheduled on the same host and can be deployed and scaled as a single application. Each pod has a unique IP address and the containers in the pod use a shared network namespace. 

Replication Controller

A pod, itself is not able to handle a failure situation. In a situation like a crash in the node, where the pod is running, the pod is removed from the cluster. But in order to provide the desired state to the user, we need to ensure that the state is maintained. The replication controller monitors the cluster and ensures that a given number of pods are running at all the time. If there are more than specified, it will kill some, If there are too few, it will create some. In order to a pod to be monitored by a replication controller, we need to define the pod as a template inside the replication controller. 

Service    -  the basic unit that acts as a load balancer for other containers.

Label       -  a key/value pair that is assigned to a resource to identify a set of related resources


Selector   -  an expression that supports to match user defined labels



Kubernetes Architecture

The basic Kubernetes architecture contains nodes and master.


Kubernetes Master

The three important parts of the master are as follows;
  1. API Server    -   manages the tasks of all components in master and nodes via API calls
  2. Etcd               -  stores and replicates the current configuration and run state of the cluster
  3. Scheduler and Controller Manager - responsible in scheduling containers

Kubernetes Nodes

A node in Kubernetes has the following important processes:
  1. Kubelet       -   responds to the commands from the master to manage pods and their containers
  2. Proxy          -   a simple network proxy, which separates the IP address of a target container from the name of the service
In conclusion, it seems pertinent to remember that Kubernetes is a milestone in container cluster management systems. 


Share this: