You are currently viewing Kubernetes Introduction and Tutorial for Beginner | AI Sangam
Kubernetes Introduction and Tutorial for Beginner | AI Sangam

Kubernetes Introduction and Tutorial for Beginner | AI Sangam


Kubernetes: Production-Grade Container Orchestration
Kubernetes: Production-Grade Container Orchestration

Kubernetes Vs Docker or Kubernetes vs Docker Swarm???

People often confuses comparison of Kubernetes with the docker image or docker containers but in reality it is with docker swarm. Docker Swarm as well as Kubernetes are both package management tools whereas docker image is a package which runs inside the container. Kubernetes as well as docker swarm can run docker images but this topic is all about kubernetes and why it is so powerful package management tool.

What is Kubernetes??

Kubernetes is a package management tools where containers are run inside the node and package are running inside the container. If any application is using multiple container these are clustered together and form a POD. These nodes are controlled by the master when master is configured to the nodes in the cluster. Please look at the below image to understand what is logical container and POD.

POD in Kubernetes
POD in Kubernetes
Cluster of Master and Nodes
Diagram 1: Cluster of Master and Nodes

If you look carefully to the Diagram 1, You can see these Nodes. Nodes contains the containers which run the docker image or the application package. First we need to configure master with the nodes and then master will take care of allocating the resources to the containers running in the nodes. Master and Nodes functions in form of clusters

Components of the Masters

  • Replication Controller: It ensures that requested no of podes are running on the POD.
  • Service: It is an object on Masters that provide Load Balancing across a replicated group of PODS.

Salient features of kubernetes with the docker container

  1. Automatic vertical and horizontal Scaling: Use case for this feature is Pokemon-GO game which was one of the most popular outdoor virtual game.
  2. ) Load Balancing: I will cover some subtopic for this feature such as what is load balancing, what are the salient features of load balancing, algorithms used for implementing load balancing

 2.1) What is Load Balancing: Load balancing means handling the requests to different servers of same company. To illustrate this please take the example of Amazon. They have deployed different servers to run their website. Two different person has made a request. How do Amazon now how to shift the request to different servers?? Answer is Load Balancing. Let us discuss some of the salient features of the load balancing.

2.2)  what are the salient features of Load Balancing: It performs the below function

  • Remove or add more servers
  • Check health of each server and remove unhealthy servers
  • Transfer the load to available and healthy servers only and supports sticky session

2.3)    Algorithms for implementing Load Balancing: Please see the below methods

  1. Round Robin Fashion: It works on the principle of sequential request distribution. Elaboration for such is suppose we have list of servers in the list, request are send sequentially one by one. If request is send to server 1 for the first time then the request will be send to server 2 for the next time.

  2. Least Connection: It works on the principle of allocating the requests to those servers which are least used. Computation is performed to find those servers.
  3. IP Hash: Requests are handled based on Client IP.

3.) Automatic bin packing, storage orchestration,self healing, automatic rollbacks and rollouts are some of the additional features of kubernetes.

Why kubernetes is so special: 

This is because when applications are updated and if any problem come kubernetes automatically roll back the application to previous state”

Why Kubernetes solves the problem of crash due to high traffic:

Kubernetes performs both vertical scaling as well as horizontal scaling which not only handles new request but if traffic in particular container increases,it scales it also

Summary of this blog

  • We covered that kubernetes and docker is not to be compared. Comparison is in between docker swarm and kubernetes whereas kubernetes comes first in market and is backed by google. This is also one of the reason why it is popular than docker swarm
  • We discussed what is kubernetes, PODS, nodes, containers, master node and cluster creation
  • Salient features of the kubernetes.

Leave a Reply