e-Why, What & How · 2019-05-23

Kubernetes – the complete definition – e-Why, What & How

Currently, technology is an ever shifting landscape of shiny new tools & concepts. Application development & deployment in particular, has undergone some radical changes in the past few years, & although we’ve all heard of virtual machines, Containers, Docker & Kubernetes, many of us grapple to understand the fundamentals & the benefits that these high-tech elements might provide for our ordinary requirements.

definition of kubernetesMany businesses are moving away from VM in favor of Containers, the reason being that whereas VMs rely on an entire OS(Operating System) to perform, Containers share an OS.

This means that Containers are more versatile, portable, easier to set up & easier to scale than their heavier-weight predecessors VMs. However, as with most things, Containers come with their own set of problems, one of them being, that because they can scale & replicate so quickly, the sheer volume of applications or microservices running in Containers can become unwieldy & difficult to manage.

In order to solve the issues of managing & running thousands of Containers, businesses who’ve been using them to run large scale operations, such as Google, needed to develop ‘tools to manage the tool’, & this is where Kubernetes comes in.

So here’s the definition of Kubernetes:

Kubernetes was born from 2 earlier systems developed by Google, namely Borg & Omega, both of which laid the foundations for the robust manager Kubernetes is today. Originally designed by Google, it is now maintained by the Cloud Native Computing Foundation.

To define the value of Kubernetes & how it can assist businesses in managing their applications & systems, we’re going to take a closer look at the platform.

The most salient advantage of Kubernetes is that it’s open source, which means that it’s backed by a huge community who discuss, develop & improve the system on an ongoing basis.

Originally housed by Google it is now under the independent umbrella of the Cloud Native Computing Foundation. Kubernetes is designed to automate, self-heal & intelligently manage Container clusters.

Kubernetes creates ‘primitives’, which offer tools to deploy, maintain & scale applications depending on the system’s CPU (Central Processing Unit), memory or other custom directives. The platform performs by controlling both computing power & storage resources as Objects.

 Kubernetes Objects

  1. Pods

A pod is a separate unit of a Service & may be made up of one or more Containers that share the resources of one machine. Kubernetes uses Pods for scheduling. Pods may be managed manually or via controllers through the Kubernetes API. Each Pod is assigned an IP address for easy reference.

  1. Services

Groups of pods working together constitute a Service & are given a Selector Label as an identifier. Kubernetes uses environmental variables or Kubernetes DNS to load balance traffic via network connections to the requisite service group. This means that it defines & uses only those resources necessary to complete the required front & backend transactions in tandem, without ever over or under loading the system.

  1. Volumes

Kubernetes provides persistent storage for Pods, without this essential mechanism the data of each Container would cease to exist each time the unit is re-started.

  1. Namespaces

Namespaces allow Kubernetes to define & separate environmental specifics, thereby sectioning off each area according to its aim, giving teams of developers greater control over the whole.

 Kubernetes Control Plane 

  1. etcd

Developed by CoreOS,  etcd is a lightweight key-value data store which stores the configuration of the cluster & offers a reliable indication of the health of the system at any point in time. Kubernetes uses etcd to monitor the configuration data against the deployment, in order to locate inconsistencies. If it discovers divergence it automatically repairs the system back to its original configuration specification.

 API Server

The API processes REST requests in JSON, which provides updates to etcd, so that containers & workloads are continuously configured correctly across nodes. 

  1. Scheduler

The Scheduler is basically, a tool which monitors supply & demand. It monitors & distributes requests to the workload ensuring that resources are used effectively—by allocating Pods to Nodes depending on availability it ensures a smooth running system.

 Controller manager

Using the ‘DaemonSet Controller’, ‘Replication Controller’ or ‘Job Controller’, the Controller manager drives the Container system to its ultimate ‘best’ state. Various Controllers are responsible for replicating Pods on demand, replacing them if they fail or running a set of Pods which need to complete a set task. Controllers communicate with the API Server to update, create or delete necessary resources, such as Pods & Services.

The Node

A node is the container’s machine of deployment & must run a runtime, such as Docker, in order to perform. Additionally, several other elements are required for communication & configuration.

  1. Kubelet

Responsible for initiating, ceasing & maintaining Containers, which are organized into Pods.

  1. Kube-proxy

Directs incoming traffic to the appropriate Container, usually via IP, Port or by the nature of the request

A Container is the most basic unit of an application. An example of Containers, Pods & Services be in:

In a dining area: A container would be a table or a chair, each providing a Microservice (seating, surface to dine on), the tables & chairs together make up the Pod. A separate Pod would be in the kitchen say, the  oven & hot plates. A Service is the Pods, which act together to provide food for eating in the dining Pod. Kubernetes, could replicate this set up multiply if thousands of diners needed serving, also it would automatically ‘fix’ broken chairs, ovens & so on, while always offering a report to the house owner on the status of its managed service.

A Microservice houses all the dependencies necessary to run a task. Containers need an IP address to run as a service. Kubernetes neatens, automates, repairs & scales Containers, effectively turning them into a reliable tool for deploying & running applications. Kubernetes supports both the Docker & rkt Container engines.


 

Click here to opt-out of Google Analytics