Architecture of K8s

Architecture of K8s

Kubernetes follows client-server architecture where the Master Node and Worker node

exist which constitutes a ‘Kubernetes Cluster’. We can have multiple worker nodes and masternodes







1. Master Node

The master node is responsible for managing the complete cluster, it manages and communicates with worker nodes to run the applications on the container

It has four components: ETCD, API Server, Scheduler, and Controller Manager.


  • Users can access the master using the CLI through the API server.
  • The master node continuously monitors all nodes in the cluster and takes action accordingly.
  • Kubernetes can have more than one master node for high availability.


Following are the four components of the Master Node

a) API Server

The master can communicate with all the clusters through the API server. It is the main access point to the control plane.


  • The API server directly interacts with the user. For example - users are able to apply YML or JSON files directly to the API server through the CLI.
  • API Server can auto-scale as per load.
  • The API Server is the front end of the control plane.


b) ETCD


  • ETCD is used to store data as key-value pairs like Pods IP , Nodes, nerwork configs etc, come from API server which are used by Kubernetes to manage the clusters.
  • It also stores the metadata and the status of the cluster.
  • ETCD is a consistent and high-availability data store.
  • It is also responsible for maintaining the lock mechanism to reduce conflicts between the masters.
  • When there are multiple masters and nodes, ETCD stores all the data in a distributed manner.


ETCD has the following features,

1. Fully replicated

The entire state of the data is available on every node that is present in the cluster.

2. Secure

It also implements automatic client TLS certificate authentication.

3. Fast

ETCD is very fast and can easily perform multiple operations in seconds.

c) Scheduler

It gathers information from the controller manager, and API server notifies the scheduler to perform the respective task such as autoscaling.


  • The scheduler is responsible for distributing the work across multiple different available nodes.
  • It always looks at newly created containers and assigns the node.
  • handles pod creation and management.
  • When the user requests the creation and management of pods, the scheduler will take action on that request smoothly.


d) Control Manager

Controller manager collects information from the API server and decides what to do.


  • Controllers are the main thing behind orchestration.
  • Controllers continuously look at and watch the health of the node, whether it is responding or not, and take action according to it.
  • It also manages the state of the controller related to deployment, replicas, and the number of nodes running in the cluster.


Following different components that are present in the master

1. Route Controller: Responsible for managing the networking

2. Node Controller: Responsible for detecting the node if it is not responding.

3. Service Controller: Responsible for load balancing to manage the load

4. Volume Controller: Responsible for mounting and creating volume storage.


2. Worker Node

Worker nodes are the mediator who manages and takes care of the container and communicate with master nodes which instructs to assign the resources to the containers scheduled. K8s can have multiple of worker nodes to scale resources as needed.

a) Kubelet


  • Kubernetes Worker Node has Kubelet to communicate with Master Node and provide all information continuously to the Master Node related to the Health of Nodes
  • It is also responsible for carrying out the actions taken by the master node.
  • listens to the Kubernetes master.
  • It also sends access reports for the node to the master.


b) Kube-proxy


  • Kube-Proxy is responsible for managing the network traffic properly as per the rule defined in the controller manager,
  • It also assigns IP addresses to each pod.
  • Kube-Proxy runs on each node, and it has the responsibility to check that a unique IP address is assigned to each pod.


c) Pods


  • It is the smallest unit in k8s where application is deployed.
  • It may have many resources, like IP addresses, containers, and storage.
  • Pods have one or more containers that are deployed on the same host.
  • In Kubernetes, the control unit is a pod, not a container.
  • It also has one more tightly coupled container in one pod, sharing resources with each other.
  • Pods run on the worker node, which is controlled by the master.
  • Usually, one pod contains one container, and without a port, Kubernetes is not able to run the container because Kubernetes only knows pods, not containers.


d) Container Engine


  • The container engine is responsible for running containerized applications Kubernetes supports different container runtimes, but Docker is famous.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了