Introduction To Kubernetes

Kubernetes Series: Part 1 – Introduction to Kubernetes | Background of Kubernetes

Last Updated on February 18, 2023 by cscontents

Introduction to Kubernetes

In simple words, Kubernetes is an open-source container orchestrator tool or system, which manages the containers. In other words, we can say Kubernetes is a tool or orchestration engine for automating the deployment, scaling and management of containerized application.

Kubernetes was designed by Google, but currently it is maintained by Cloud Native Computing Foundation (CNCF). Before going through this post, we have to make sure we understand container technology. To understand Kubernetes very clearly, let’s discuss a little about background of container (e.g. Docker).

In this post, we will discuss Kubernetes and get familiar with fundamental concept of Kubernetes. If you want to get a high-level understanding of Kubernetes, then you are in the right place.

Background of Container

There are a couple of reason due to which containers came into picture.

1. When developer develops any application they install many dependency in their local development environment, but when they are done with developing and ready to deploy the code in higher environment then developers need to install all those dependencies once again in that environment which is a big issue since there can be

    • Dependency version mismatch,
    • Silly human error,
    • Time-consuming manual effort of installing dependency software/packages in the higher environment etc.

To solve this container came into picture and using container technology developers can package the application with all its dependency and make it portable. So, when developers want to deploy the application in higher env they will deploy that package and no need of installing all the dependency software/packages

2. Using container, we can efficiently use the hardware resource since on single host/VM/node we can run multiple containers (it is due to that fact that container provides enough isolation due to which multiple container can be run). Container are very lightweight compared to VM. For example, multiple container (replica) of same application is deployed to distribute the traffic.

3. Containers are easily scalable etc.

(Note: for more detailed discussion on VM vs Container technology, please have a look at this article VM vs Container Technology )

Now issue is, when we deploy multiple containers, there is a requirement of managing those containers. For example, we need to deploy more container to distribute & handle the traffic when there is an increase in traffic. And it is very difficult to manage this kind of situation manually. To solve this container managing issue, “container orchestrator tool” comes into the picture and Kubernetes is one of such tool.

So we understood the whole concept that Kubernetes comes into the picture because of the need of managing multiple container.

Benefits of Using Kubernetes

As we discussed in the previous section, Kubernetes is used to manage the containers. The main benefits of using Kubernetes are listed below.

  • We can deploy various resources (e.g. container) using Kubernetes.
  • Scaling can be done easily using Kubernetes, depending on the requirements.
  • We can monitor various resources using Kubernetes.

Kubernetes Cluster

In the previous section, we saw that we need to deploy multiple containers to handle huge traffic. Now, there is a limit of number of how many containers we can deploy in any VM. So to accommodate multiple containers we need multiple VM.

So Kubernetes has to manage all the containers in multiple VM and that’s where the concept ‘Kubernetes Cluster’ comes into picture. Together those VMs are called ‘Kubernetes Cluster’ where containers run and managed by Kubernetes. And each of these VMs are called node.

In Kubernetes, there are two types of node –

  • Master Node – It manages all the worker node.
  • Worker Node – Worker node runs the containers.

There is another important term in Kubernetes, which is “pod”. A pod is a group of containers (those containers must be within the same node). A pod can consist of one container or multiple container, and a node can have multiple pod.

Pod is the smallest Kubernetes object, and also it is the smallest deployable Kubernetes object.

Kubernetes Cluster

The above diagram shows an example of Kubernetes cluster. It is a 3 node Kubernetes cluster where we have 2 worker nodes and other one is master node. This master node machine controls all other Kubernetes node machine.

 

Thank You.

Reference:

https://kubernetes.io/

 

If you are interested in DevOps, please check out the below articles.