Sec : 2 : Abs:Begginers : Kubernetes Overview : Kubernetes Architecture

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 Kubernetes Architecture

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Before we head to setup a Kubernetes Cluster it becomes important for us to understand some of the basic concepts. This is to make sense of the terms that we will come across while setting up the Kubernetes cluster, 

1. NODES

Node is a machine Physical or Virtual in which Kubernetes is Installed

A Node is a worker machine and that is where containers will be launched by Kubernetes . It was also known as Minions in the Past. So might here these term used interchangeably

But what if the Node on which you application is running fails?
Obviously our application goes down . You need to gave more than one nodes

2. Clusters

A cluster is a set of Nodes grouped together this way even if one node fails you have your application still accessible from the other nodes more over having multiple nodes helps in sharing load as well.

  1. Who is responsible for managing the cluster , 
  2. where is the information about the members of the cluster stored.  
  3. How are the Nodes monitored
  4. When a node fails. How do you move the workload of the failed node to another worker node.

That's where the master comes in.

The Master is another node with Kubernetes installed on it. And it is configured as a Master

The Master watches over the nodes in the cluster and is responsible for the actual orchestration of containers on the worker nodes

When you install Kubernetes on a Node you are actually installing the following components.

  1. An API Server
  2. An Etcd service
  3. A Kublet service 
  4. A Container Runtime
  5. Controllers 
  6. Schedulers

1.  API Server : Acts as the front end for Kubernetes service  , The Users, Management devices , Command line Interfaces all talk to the API server to interact with Kubernetes cluster .

2. Etcd Keystore : Etcd is a distributed reliable key value store used by Kubernetes to store all data used to manage the cluster 

Think of it as this way, When you have multiple node and multiple masters in your cluster . Etcd stores all those information on all the nodes in the cluster in a distributed manner .
ETcd is responsible for implement locks within the cluster to ensure that there are no conflicts between the Masters .

3. Schduler : The scheduler is responsible for distributing  work or containers across multiple nodes . It looks for newly created containers and assigns them to nodes

4. Controllers : The controllers are the brain behind the Orchestration . They are responsible for noticing and responding when (Nodes, Containers or End-Points ) goes down. The controllers makes the decision of bring up new containers in such cases .

The Container Runtime is the underlying software that is used to run containers in our case it happens to be Docker . But there are other options as well

5. Kublet : Finally , Kublet, Is the agent that runs in each node in the cluster , the agents responsibility is to make sure that the container is running on the nodes as expected


So far we saw two types of servers (Master and Worker) and a set of components that make up Kubernetes . 

But how are these components distributed across different type of servers. In other words how does one server become the Master and Other the slave.

The worker Node or Minions as it is also known is where the containers are hosted. For example Docker Containers and to run docker containers in the system we need Container Run Time installed.

This does not need to be Docker, there are other container run times available , such as , rkt (rocket) or crio. but throughtout this course we are going to run our Docker run time engine.

  • The Master server has the Kube-API Server and that is what makes it a Master. 
  • Similarly the worker node has the Kublet agent that makes it the worker /slave node that is responsible for interacting with the Master to provide health information of the worker node and carry out actions requested by the master on the worker nodes.
  • All the information gathered is store in the "Etcd : key value store on the Master" . The key value store is based on the popular key value store called the Etcd framework as we just discussed 
  • The Master also has the Controll Manager and the Scheduler
  • There are other components on the Master but we will stop there for now. 

 


Kublet :

One of the command line utilities called the Kubectl called the kube commandline tool  , Kubectl or Kubecontrol as it is also called

The kubectl tool is used to deploy and manage applications on a kubernetes cluster and to get the cluster information to get the status of other nodes

Kubectl run command is used to deploy an application on the cluster

Kubectl cluster-info command is used to get the status of the cluster 

To get the status of other nodes in the cluster . And to manage may other things.

Kubectl get nodes : command is get the nodes in a cluster.

 


kubctl run command is used to deploy an application on the cluster.

kubectl-cluster-info : Is used to view the information about the cluster.

kubectl get nodes : Is to get the list of all the nodes part of the cluster

 

 

Comments

Popular posts from this blog

Sec : 3 : Abs:Begginers : Setup Kubernetes : Setup Introduction

Kubernetes | Containers - Container D and Docker

Sec : 4 YAML Introduction