Kubernetes Components

Topics Covered

Overview

Kubernetes is a robust container orchestration platform made up of key components. A Kubernetes cluster is made up of worker nodes that run containerized apps and are governed by a control plane that makes global decisions and reacts to events. Kube-apiserver,etcd, kube-scheduler and kube-controller-manager are essential components. Pod operations and networking are ensured by node components like kubelet and kube-proxy. In Kubernetes Components, kubernetes also supports many container runtimes, and addons include cluster capabilities such as DNS, Web UI (Dashboard), Container Resource Monitoring, Cluster-level Logging, and Network Plugins.

Kubernetes Components

A cluster is what you get when you install Kubernetes. Worker machines known as nodes that run containerized apps make up a Kubernetes cluster. At least one worker node is present in each cluster. The Pods, which are a part of the application workload, are hosted by the worker node(s). Worker nodes and Pods in the cluster are controlled by the control plane which is a part of Kubernetes components. In production scenarios, the control plane is frequently distributed across a number of computers, and a cluster is distributed across a number of nodes, providing fault tolerance and high availability.

Kubernetes Cluster

Control Panel Components

In Kubernetes Components, the control panel's parts decide on the cluster as a whole (such as scheduling), as well as recognise and react to cluster events (such as launching a new pod when the replicas' field of deployment is not met).

Any cluster nodes designated as control plane nodes that run these components. On the other hand, setup scripts frequently start all control plane components on the same computer without running user containers there.

Kubernetes Cluster1

As illustrated in the graph, there are four components operating on the Kubernetes control plane in Kubernetes components, each of which is necessary for maintaining a healthy Kubernetes cluster, and they play various roles inside the cluster:

  • kube-apiserver: a part of the Kubernetes control plane that makes the API available. The API server serves as the front end of the Kubernetes control plane.

  • etcd: A trustworthy and highly accessible key-value store that acts as the central repository for all cluster data in Kubernetes.

  • kube-scheduler: It searches for recently created Pods without an associated node and selects one for them to run on.

  • kube-controller-manager: Using the API server watch feature, it keeps track of the cluster's state and makes adjustments to get it into the required condition. There are several sorts of controllers . Here are a few examples:

    • Node controllers: The task of identifying and responding to node failures falls on node controllers.
    • Job controller: It searches for Job objects that represent one-time tasks before building Pods to do them.
    • EndpointSlice controller: The creation of EndpointSlice objects (used to link Services and Pods).
    • ServiceAccount controller: Apply the ServiceAccount controller to new namespaces to create default ServiceAccounts.
  • cloud-controller-manager:

    • In Kubernetes components,a Kubernetes control plane component with built-in cloud-specific control logic. The cloud controller manager separates components that interface with the cloud platform from those that solely interact with your cluster, enabling you to link your cluster to your cloud provider's API.
    • Only controllers relevant to your cloud provider are managed by the cloud-controller-manager. When you deploy Kubernetes on your own premises or in a learning environment on your own PC, the cluster lacks a cloud controller manager.
    • The cloud-controller-manager, similar to the kube-controller-manager,combines a number of conceptually independent control loops into a single binary that executes as a single process. You can scale horizontally (run several copies) to increase performance or put up with errors.
    • The following controllers may be dependent on a cloud provider:
      • Node controller: Checks the cloud provider to see whether a node in the cloud has been removed when it stops responding.
      • Route controller: A device used to configure routes in the underlying cloud architecture.
      • Service controllers are used to create, update, and delete cloud provider load balancers.

Node Components

In Components of kubernetes, Every node has node components that are part of components of kubernetes that keep pods operating and provide the Kubernetes runtime environment.

  • kubelet:
    • An agent that operates on each cluster node. It ensures that containers in a Pod are operating.
    • The kubelet accepts a variety of PodSpecs given in a variety of methods and ensures that the containers specified in those PodSpecs are operational. The kubelet does not handle containers that were not created by Kubernetes.
  • kube-proxy:
    • kube-proxy is a network proxy that operates or runs on all cluster nodes and implements a component of the Kubernetes Service model.
    • kube-proxy maintains network rules on nodes up to date. These network limitations allow network access to the Pods via network sessions both within and outside of the cluster.
  • Container Runtime
    • The container runtime is the software that is in charge of container execution.
    • Kubernetes supports container runtimes such as containerd, CRI-O, and any other Kubernetes CRI (Container Runtime Interface) implementation.

Add on Components

In Components of kubernetes, Addons implement cluster functionalities by using Kubernetes resources (DaemonSet, Deployment, and so on) are components of kubernetes. Namespaced resources for addons belong in the kube-system namespace since they provide cluster-level features.

DNS:

  • While the other addons are optional, cluster DNS should be included in all Kubernetes clusters because many examples rely on it.
  • Cluster DNS is a DNS server that, in addition to the existing DNS server(s) in your environment, delivers DNS records for Kubernetes services. By default, Kubernetes containers include this DNS server in their DNS requests.

Web UI (Dashboard): Dashboard is a user interface for Kubernetes clusters that is accessible over the web. It allows users to manage and troubleshoot both clustered apps and the cluster itself.

Container Resource Monitoring: Container Resource Monitoring maintains a centralized collection of generic time-series metrics about containers and provides a user interface for studying that data.

Cluster-level Logging: Container logs are saved to a central log store with a search/browsing interface through a cluster-level logging mechanism.

Network Plugins: Network plugins are software components that implement the container network interface (CNI) standard. They are in charge of assigning IP addresses to pods and allowing them to communicate with one another inside the cluster.

FAQs

Q. What does the Kubernetes Control Plane do?

A. The Control Plane components perform cluster-wide decisions, such as scheduling pods and detecting/responding to cluster events. They manage the cluster's worker nodes and Pods.

Q. What exactly is kube-proxy, and how does it play a part in Kubernetes networking?

A. The Kubernetes Service idea is implemented via kube-proxy, a network proxy that operates on each node. It maintains network rules, providing network connectivity to Pods both within and outside the cluster. Conclusion

Q. What are Kubernetes Addon Components?

Addons are cluster features that are built with Kubernetes resources such as DaemonSet and Deployment. They offer cluster-level functionality and are often located in the kube-system namespace.

Q. Why is Cluster DNS so important in Kubernetes?

A. Cluster DNS is critical in Kubernetes since it is used by many examples and capabilities. It functions as a DNS server, delivering DNS records for Kubernetes services as well as other DNS servers in the environment.

Conclusion

  • In Kubernetes components, the control plane manages the nodes and Pods in a Kubernetes cluster, which is made up of worker nodes that execute containerized applications. This distribution provides fault tolerance as well as high availability.
  • In Kubernetes components ,the Kubernetes control plane components are crucial in global decision-making and cluster event handling, such as scheduling and responding to cluster events.
  • The cloud-controller-manager is in charge of cloud-specific control logic, allowing for simple connection with the APIs of cloud providers.
  • Node components are part of Kubernetes components like as kubelet and kube-proxy are required to keep Pods running and networking on each node in the cluster.