The API-server is the gate of the kubernetes cluster.
Each request that comes to the kubernetes cluster goes through the API-server.
We usually use the "kubectl" utility to interact with the kubernetes cluster. "Kubectl" uses Rest APIs in the background.
For example, to list all the nodes of the cluster, we use the below command:
Which translates in the background into the below command:
The request is directed to the nodes endpoint: "/api/vi/nodes"
The Etcd database:
It is the database that stores all the data of the cluster and its resources. Our requests to the API-server through the "kubectl" command are sent to the Etcd to fetch the information related to our requests.
This component takes care of scheduling the different pods on the different nodes of the cluster.
The controller manager is made up of multiple controllers, for example:
Replication controller: keeps an eye on the number of replicas of pods deployed in the cluster.
Deployment controller: manages the deployment of pods, including the updates, downgrades, ...
These controllers run all the time, watching the state of each resource.
Worker node components:
Below are the most important components of the worker node:
Kubelet:Its role is to run the podsand the containersinside the pods, using the CRI -container Runtime Interface- installed on the nodes - Docker, CRI-O,... -
Kube-proxy:Uses Linux IP tableson the hosts to route traffic between the pods living inside the hosts and the outside.
We could display the list of objects available to us in the kubernetes cluster using the below command: