What is Kubernetes and Components of Kubernetes-DecodingDevOps

What is Kubernetes and Components of Kubernetes

What is Kubernetes

Kubernetes is container orchestration system developed by Google. It provides management to control numbers of containers running on Cluster,a group of servers. Kubernetes has been built by around 15 years of experience of Google production environment. Now Kubernetes is managed by CNCF (Cloud Native Computing Foundation) and having a huge community to contribute.

Traditional Methods in Production

In early era, organizations had ran applications or software on actual server or computer. So there were too many limitations which are affecting production to stay running. They build code and deploy it on server and it took too many resources from the server to stay up and running. So sometimes, other application never gets enough resources and it becomes a headache in production. So to prevent this issue to happen, Virtualization comes into the picture. In virtualization, organization run guest OS on top of the host os. It will help organization to isolate different application and make them running on different OS.

However, Virtualization shares actual resources with guest os. So it divides resources amount to make applications running whether an application require that much of resources or not. And most of the times, resources get wasted in virtualizations.

To avoid this problem, containerization becomes more important for organization. In containerization, application run on container, a bundle of application’s packages, libraries or dependencies. Container bundle application and it's libraries into one package and make it run on shared OS. Containers share the same host OS and make it's isolated environment suitable for application without affecting any other containers or host OS. The containerization becomes trend in productions for organization.

Why Kubernetes?

Running an application on container is always best option in production. Now, there are situations where production system has thousands of containers in organizations. It becomes a burden to manage that many containers. So production system needs very reliable and very efficient management system to manage this much amount of containers.

To overcome this issue, Kubernetes becomes a handy container orchestration, a container management system. It handles thousands of running containers on single or multiple servers. It uses API for communication inside the kubernetes system and it makes it efficient and reliable service in the market.

Components that makes kubernetes available for production

Kuberenetes runs single or multiple containers as Pod. So pod is actual running artifact in kubernetes system. Pods can have single or multiple containers running and it will isolate them from each other.

Kuberenetes deploy this pods on the group nodes (servers), cluster. This cluster can contain 1 or 100 of servers and kubernetes manage them all. These nodes are called Worker Nodes. It will deploy whatever kubernetes tells them.

To manage workers nodes, system always needs a master. Kubernetes can have single or multiple master running in cluster to manage all other workers node.

Kubernetes have different controlling services which makes this system too efficient.

What is Kubernetes and Components of Kubernetes

Components running on master nodes:

  • Kube-APIServer: APIs make system fast, easy and reliable. Everything in kubernetes is handled by API server running in system.Every request in system is served by API.kube-apiserver is horizontally scalable. So it can grow and load balance everything as cluster's size increase.
  • etcd: The kubernetes always need fast and highly available storage mechanism to store data for the clusters. It stores meta information for any kind of deployments inside the kubernetes server.
  • kube-scheduler: There are hundreds of thousands of pods are running in kubernetes and scheduling them on different nodes is an important task for the system. kube-scheduler helps system to identified pods which are not assigned to any nodes and then it will find suitable node and run it on the selected node.
  • kube-controller-manager: A reliable system always needs good controllers to control it's running components. kube-controller-manager consists different controllers.
    • Node Controller: It control the numbers of nodes in the cluster. If one or more nodes goes down it will create new node.
    • Replication Controller: It maintains the total number of running pods for the deployment. If any pod gets destroyed it will make a new one.
    • Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods).
    • Service Account & Token Controllers: It will manage different service account and access tokens required for other components.

Components running on worker nodes:

  • kubelet: Kubelet runs on every worker nodes available on cluster. kube-scheduler instruct kublet to deploy containers and it will deploy pods as described in PodSpecs provided by etcd. So kubelet is responsible to runs pods  on the nodes in the kubernetes.
  • kube-proxy: kube-proxy provide network proxy on every single node present in the cluster. Using kube-proxy, pods and services in the cluster can communicate with each other. kube-proxy manages network rules in nodes.
  • Container Runtime: To run containers as a pod nodes need runtime to make them running. Kuberenetes uses different container runtimes like Docker, containerd, cri-o or any other. Docker is default runtime in kubernetes.

Leave a Reply

Your email address will not be published. Required fields are marked *