DEV Community

Yusuf Isah
Yusuf Isah

Posted on • Originally published at yuscode.hashnode.dev

Chapter 2 - Kubernetes Architecture

Table of Contents

Introduction

Understanding the architecture of Kubernetes is crucial for effectively managing and deploying applications in a Kubernetes cluster. This chapter will explore the core components of Kubernetes, focusing on the Master and Node components that make up the control plane and the worker nodes.

Master and Node Components

Kubernetes architecture is divided into two main components: the Master components, which make up the control plane, and the Node components, which run the containerized applications. In other words, Kubernetes is made up of two types of machines: Masters and Nodes.

Control Plane

The control plane is responsible for managing the state of the Kubernetes cluster. It makes global decisions about the cluster (e.g., scheduling) and detects and responds to cluster events (e.g., starting up a new pod when a deployment’s replicas field is unsatisfied).

The Control Plane consists of the following primary components; namely:

API Server

The API Server is the front end of the Kubernetes control plane. It exposes the Kubernetes API, which is used by all components to communicate with each other. The API server processes data to and from Kubernetes API objects, such as pods, services, and deployments.

Scheduler

The Scheduler watches for newly created pods with no assigned node and selects a node for them to run on. It takes into account resource availability and constraints.

Controller Manager

The Controller Manager runs/manages Kubernetes controllers. Controllers are responsible for making sure that the desired state of the cluster matches the actual state. For example, the replication controller ensures that the specified number of pod replicas are running at any one time.

Cloud Controller Manager

The Cloud Controller Manager is a component that allows Kubernetes to interact with cloud providers, such as AWS, GCP, or Azure. It enables Kubernetes to manage cloud resources, such as nodes, routes, services, and provides cloud-specific functionality, like load balancing and storage.

etcd

etcd is a consistent and highly-available key-value store used as Kubernetes backing store for all cluster data. All Kubernetes objects are stored in etcd, and it serves as the single source of truth for the cluster state.

Node Components

Node components, also known as workers or nodes, are responsible for running applications. Each node has three primary components:

Kubelet

The Kubelet is an agent that runs on each node in the cluster. It communicates with the API Server and manages container lifecycle.

Kube-Proxy

Kube-Proxy is a network proxy that runs on each node in the cluster. It maintains network rules on nodes, allowing network communication to your pods from network sessions inside or outside of your cluster. It also provides load balancing.

Container Runtime

The container runtime is the software that is responsible for running containers. Kubernetes supports several container runtimes, including containerd, and CRI-O. The container runtime pulls images from a container registry, creates and starts containers, and handles container termination.

Conclusion

In this chapter, we explored the Master and Node Components that make up the Kubernetes architecture. The Control Plane components work together to manage the cluster, while Node Components ensure applications run smoothly. Together, they ensure that Kubernetes clusters are highly available, scalable, and maintainable.

Feel free to leave comments and share this article. Follow my blog for more insights on Kubernetes!

Top comments (0)