What is Kubernetes? and Architecture of Kubernetes

Dear friends, today we will see more details about Kubernetes. What is Kubernetes? And architecture of Kubernetes. So, let’s start and see step by step these details.

We will cover these points in this session: –

  1. What is Kubernetes?
  2. Features of Kubernetes
  3. Architecture of Kubernetes
  4. Role of Kubernetes Master node
  5. Component of Master Node
  6. Component of Worker Node
  7. What is POD in Kubernetes
  8. Higher level Kubernetes objects

What is Kubernetes?

Kubernetes is an opensource containers management tool which automate container deployment, container scaling and load balancing. It schedules, run, and manage isolated containers which are running on Virtual/Physical/Cloud Machine.

Google develop on internal system called ‘Borg’ (later named as omega) to deploy and manage thousand google application and services on their cluster. In 2014 google introduced Kubernetes an opensource platform ‘Golang’ and later donated to CNCE (Cloud Native Computing Foundation).

If you want to know more about Kubernetes then you Click-Here

Features of Kubernetes

  • Orchestration (Clustering of any number of containers running on different hardware).
  • Autoscaling (Vertical scaling and Horizontal scaling).
  • Load Balancing
  • Platform independent (Cloud/Physical/Virtual)
  • Fault tolerance (Node/POD failure)
  • Rollback (Going back to previous version)
  • Heath Monitoring of containers
  • Batch execution (Onetime, Sequential and Parallel)

Architecture of Kubernetes

What is Kubernetes?

Role of Kubernetes Master node

  • Kubernetes cluster contains containers running on bare metal, VM instance, Cloud instance and all Mix.
  • Kubernetes designates one or more of these as master and all others as workers.
  • The master node is now going to run set of K8s processes these processes will ensure smooth functioning of cluster. These processes are called Control Plane.
  • It can be multi-master for high availability
  • Master runs Control Plane to run cluster smoothly.

Component of Master Node

  1. Kube API Server
  2. ETCD Cluster
  3. Kube Scheduler
  4. Controller manager

Kube API Server

Kube API server intract directly with user. Ex: – we apply .yml or json manifest to kube API server. This kube API server is meant to scale automatically as per load. Kube API is a front-end of Control Plane.

ETCD Cluster

ETCD store metadata and state of cluster. It consistent and high availability store. ETCD also a source of touch of cluster state.

ETCD has following features: –

  1. Fully replicated: – The entire state is available on every node in the cluster.
  2. Secure: – Implements automatic TLS with optional Client Certificate Authentication.
  3. Fast: – Benchmarked at 10000 writes per second.

Kube Scheduler

Kube Scheduler (Action): – When user make request for the creation and management of POD, Kube scheduler is going to act on these requests. Handles POD creation and management. Kube scheduler match/assign any node to create and run PODs.

Kube Scheduler watches for newly created PODs that have node assigned for every POD that the scheduler discovers, the scheduler becomes responsible for finding best node for that POD to run on. Scheduler gets the information for hardware configuration from configuration file and schedules the PODs on nodes accordingly.

Controller Manager (Actual state=Desired state)

Controller Manager make sure that actual state of cluster matches to desired state.

Two passible choices for controller manager: –

  1. IF K8s on cloud, then it will be cloud controller-manager.
  2. If K8s on None Cloud, then it will be kuber-controller-manger

Components of Master node that run on controller.

  1. Node Controller: – For checking the cloud provider to determined if a node has been detected in the cloud after it stops responding.
  2. Route Controller: – Responsible for setting up network route on your cloud.
  3. Service Controller: – Responsible for load balancers on your cloud against services of types of load balancer.
  4.  Volume Controller: – Volume Controller is responsible for Creating, Attaching, mounting volume, and interacting with the cloud provider to orchestrate volume.

Component of Worker Node

Work Node is going to run on 3 important parts of software: –

  1. Kubelete
  2. Container Engine (Docker)
  3. Kube-Proxy

Kubelete

Kubelete: – Kubelete agent running on the Worker node. It listens to Kubernetes master. (Ex: – PODs creation request). Kubelete agent use port 10255 and it send success/fail report to master node.

Container Engine (Docker)

Container Engine: – Container Engine works with kubelete. It is pulling images. Container Engine also performs start stop containers. it will also expos containers on ports which specified in manifest.

Kube-Proxy

Kube-Proxy: – Kube-Proxy is responsible for assign IP to each POD. It is required to assign IP address to PODs (dynamic). Kube-proxy run each mode, and this make sure that each POD will gets own unique IP address.

What is POD in Kubernetes

POD: – POD is a smallest unit in Kubernetes. It is a group of one or more containers that are deployed together on the same host. A cluster is a group of nodes. Cluster has at least one worker node and master node. In Kubernetes, the controller unit is the POD, not containers. Consist of one or more tightly coupled containers. POD run on node, which is control by master.

Kubernetes only know about PODs does not know about individual containers. Cannot state containers without a POD. One POD usually contains one container.

If we are using Multi containers in same POD then: –

  • Share access to memory space
  • Connect to each other using localhost (container port)
  • Share access to the same volume.
  • Container within POD are deployed in all or nothing manner.
  • Entire POD is hosted on the same node (Scheduler will decide about which node).

POD Limitation: –

  • No auto healing or scaling
  • POD crashes

Higher level Kubernetes objects

  • Replication set: – Scaling and Healing
  • Deployment: – Versioning and Rollback
  • Service: – Static (None-ephemeral IP and Network)
  • Volume: – None-ephemeral storage.  

In this session we have seen all details about Kubernetes. If you want to install Kubernetes on CentOS7 Virtual Machine then you can follow this below link.

How to install Kubernetes cluster on CentOS 7 VM

This Post Has One Comment

  1. zoritoler imol

    Way cool, some valid points! I appreciate you making this article available, the rest of the site is also high quality. Have a fun.

Leave a Reply