Day-2 Architecture of K8s

Day-2 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

Master nodes according to the requirement.


Article content


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.



To view or add a comment, sign in

More articles by Arjun Adhikari

  • Day18 Understanding RBAC in Kubernetes with Practical Example

    Understanding RBAC in Kubernetes with Practical Example Authentication and Authorization in Kubernetes Authentication…

    1 Comment
  • Day 17 Network Policy in Kubernetes

    What is Network Policy? By default, a pod can communicate with any other pods whether it’s present in any namespaces…

    2 Comments
  • Day 16 Autoscaling

    Kubernetes is a powerful container orchestration tool that simplifies the deployment, scaling, and management of…

  • Day 15 Resource Quotas & Limit Ranges

    In Kubernetes, efficient resource management is crucial for maintaining a healthy and optimized cluster environment…

  • Day14 Scheduling in Kubernetes

    Kubernetes is a powerful container orchestration platform that provides a way to automate the deployment, scaling, and…

  • Day13 Satefulsets

    A Statefulset is the Kubernetes controller used to run the stateful application as containers (Pods) in the Kubernetes…

  • Day12 Daemonset , Jobs & CronJobs

    A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to…

  • DAY 11 Kubernetes Volume

    Containers can be problematic for non-trivial applications due to their ephemeral nature. When a container crashes or…

  • Day 10 ConfigMap & Secret

    How different from each other in k8s? A ConfigMap is an API object used to store non-confidential data in key-value…

    2 Comments
  • Day- 9(b) Kubernetes Ingress

    In Kubernetes, ingress is just like traffic police for the web services , it provides routes from the outside cluster…

    4 Comments

Insights from the community

Others also viewed

Explore topics