Understanding Kubernetes Concepts RHEL/CentOs k8s:Part-2

In the previous article we get a picture of Kubernetes cluster now in this article we will get a working concept.

Component of Kubernetes?

Before knowing how Kubernetes work, first we should know the terminology of Kubernetes and its main component. These a can be divided into, node component and worker node component

Master Node Component:

  • etcd: Used for storing configuration data that can be accessed by each of the nodes in the cluster and helps in leader election.
  • Master: It is the Kubernetes master node or machine, which oversees one or more minions.
  • kube-apiserver: It is the main management point for the entire cluster. It allows us to configure Kubernetes’ workloads and organizational units. Also, it is responsible that etcd stored configuration and the service details of deployed containers are in agreement.
  • kube-controller-manager: It tells the state of the cluster, manage workload life cycles, and perform routine tasks with the help of operations that are written to etcd.
  • kube-scheduler: Actually assigns workloads to specific nodes in the cluster is the scheduler.
  • cloud-controller-manager: same as kube-controller manager but for cloud service.
  • kubectl: It is a default method of interacting with the Kubernetes cluster from a local computer.

Worker Node Component:

  • Container Runtime: It is responsible for starting or managing containers, application encapsulated in a relatively isolated but lightweight operating environment like Docker, rkt, runc etc.
  • Kubelet: It helps in communicating each node with the cluster group. It also shares information ‘to and fro’ to the control plane services, as well as interacting with the etcd store to read configuration details.
  • kube-proxy : It is a service which manages host subnetting and makes services available to other components.
  • Minion: These are the slave nodes which serve/run app as requested/deployed by the user and Kubernetes master.
  • Pod: An application (or part of an application) that runs on a minion. It’s the basically an instance of your application having containers.
  • Replication Controller: Ensures that the requested number of pods is running on minions at all times and to scaling as configured.
  • Label: an arbitrary key/value pair that the Replication Controller uses for service discovery.
  • Service: an endpoint that provides load balancing across a replicated group of pods.

How Does Kubernetes Work?

Kubernetes cluster consists of master nodes and worker nodes. Worker nodes are those nodes on which your containerized application are deployed. Here are the working steps of Kubernetes cluster

Kubernetes Cluster
  1. Kubectl is used to interact with kubernetes-api (master) to get any sort of information of our Kubernetes cluster
  2. Now, each worker node is running with an agent called Kubelet which manages each node and communicates with the master. Also, each node consists of an application like Docker.
  3. Now with the help of the yaml file, we create a deployment plan. This yaml file tells Kubernetes cluster about the services, ports, the number of containers, pods and other configuration need to run our application.
  4. Now when the pods (may contain multiple containers) are up and running according to your need, we need the kube-controller to come in action
  5. A kube-controller monitors the application instances. Like if a node hosting an instance stops running then it is the duty of kube-controller to run that lost/killed/deleted instance on the available worker node
  6. Well, kube-proxy is responsible for communication between pods and services and routing request when needed.
  7. And when we talk about deletion and recreation of pods, every time pods private IP address gets changed. Due to change in these addresses, kube proxy may face connection error, so to overcome this issue service comes in picture. this service get a cluster IP address and kube proxy use this cluster IP address to route request accordingly

What does Kubernetes mean? K8s?

Kubernetes word was taken from geek language as every other word is taken (LOL). In Greek, Kubernetes means helmsman or pilot and is the root of the governor and cybernetic. K8s is derived by replacing the 8 letters “ubernete” with “8”.

Thanks for Reading this article, in the next article we will learn how to set up Kubernets cluster.

Kubernetes Series Links:

Understanding Kubernetes Concepts RHEL/CentOs K8s Part-1
Understanding Kubernetes Concepts RHEL/CentOs k8s: Part-2
How to Install Kubernetes on CentOS/RHEL k8s?: Part-3
How to Install Kubernetes on CentOS/RHEL k8s?: Part-4
How To Bring Up The Kubernetes Dashboard? K8s-Part: 5
How to Run Kubernetes Cluster locally (minikube)? K8s – Part: 6
How To Handle Minikube(Cheatsheet)-3? K8s – Part: 7
How To Handle Minikube(Cheatsheet)-3? K8s – Part: 8
How To Handle Minikube(Cheatsheet)-3? K8s – Part: 9