Kubernetes Architecture
Kubernetes Architecture
Kubernetes Architecture consist of physical or virtual machine which we called them as nodes. Nodes are cluster services that actually do work. Each nodes have multiple pods or resources running on it.
It consist of two types of nodes :
Worker Nodes
Master Node
Worker node components
Each worker node should have three processes installed on it.
Container runtime
Kubelet
Kube-proxy
Container Runtime
Used to run container services in node for E.g.: Docker,containerd.
Kubelet
An agent that runs on each node in the cluster.
Its a process that actually schedules those pod and containers inside it.
Kubelet interact with both container and node.
It Assigns resources after taking it from node like (CPU memory etc.)
it takes configuration and running the pods.
Also It makes sure that containers are running in a Pod.
Kube-proxy
Makes sure your pods and services can communicate with other pods and services in nodes and control plane.
Master Node components
Each master node should have atleast four processes installed on it.
Etcd
Kube-Scheduler
Kube-API Server
Kube Controller Manager
Etcd
It is a distributed reliable key-value store used by Kubernetes to store all data used to manage the cluster
Kube-Scheduler
It is responsible for distributing work (newly created pods) across multiple nodes.
Kube-API server
Exposes the k8s API to create and manage k8s objects like pods, services, ingress. These objects have theirendpoints .
K8s API has REST interface.
Kubectl and kubeadm are CLI tools to communicate with k8s API via http request. To see all the k8 object and their api version type below.
kubectl api-resources
Kube-controller manager
Loops that run continually and check the status of cluster to make sure things are running properly.
For e.g.
Node controller manager continuously monitoring nodes and if any goes down it replaces it.
Replication controller manager helps run multiple instances of pod in cluster to provide high availability/load balancing/scaling. It can also help if only pod is running and it fails then replication controller help by instantly running another replica of pod. So in short it helps run specified number of pods all the time.