Kubernetes 101: Kubernetes Architecture
By: Dimitris Poulopoulos
Tags: Containers, Kubernetes, Technology, DevOps, Towards Data Science

Kubernetes Architecture

Let’s start from the bottom up; what are nodes? A node is a physical or virtual machine that we run our workloads on. In Kubernetes, we operate on clusters, which are groups of one or more worker nodes. However, these nodes are not just plain devices.

Each node contains the services necessary to run Pods and Containers:

A container runtime , such as containerd or CRI-O , for managing the complete container lifecycle of its host system, from image transfer to container execution and monitoring, from low-level storage to network attachments and beyond.

, such as or , for managing the complete container lifecycle of its host system, from image transfer to container execution and monitoring, from low-level storage to network attachments and beyond. A kubelet , the primary node agent that runs on each node ensures that the containers scheduled by Kubernetes are running on the node and remain healthy.

, the primary node agent that runs on each node ensures that the containers scheduled by Kubernetes are running on the node and remain healthy. A kube-proxy , a network proxy that runs on each node maintains the network rules. These rules allow incoming requests to reach the Pods from network sessions inside or outside the cluster.

Conceptual Architecture of Kubernetes — Image by Author

However, it wouldn’t be possible to manage all these pods manually; that is where the Kubernetes Control Plane has a role to play. Kubernetes Control Plane is responsible for managing the life-cycle of the pods and handle all of the details. So, let’s see its components:

The API server is the point of contact for Kubernetes. It handles data validation and configuration for every object. It is the heart and soul of Kubernetes, where everything is talking through it.

is the point of contact for Kubernetes. It handles data validation and configuration for every object. It is the heart and soul of Kubernetes, where everything is talking through it. The `etcd` is a key-value store that records all the vital information for the cluster: the environment configuration, how your application is supposed to run, etc.

is a key-value store that records all the vital information for the cluster: the environment configuration, how your application is supposed to run, etc. The Scheduler monitors the nodes and keeps track of all the available resources to ensure that a pod goes to a node that can handle it.

monitors the nodes and keeps track of all the available resources to ensure that a pod goes to a node that can handle it. The Controller Manager that encapsulates the core Kubernetes logic. CM makes sure that all the pieces work correctly. If not, it takes action to bring the system to the desired state.

that encapsulates the core Kubernetes logic. CM makes sure that all the pieces work correctly. If not, it takes action to bring the system to the desired state. The Cloud Control Manager speaks to cloud providers (e.g., GCP, AWS, Azure, etc.) and communicates the cluster’s needs.

Foreword

The design of a Kubernetes cluster is based on three principles. A Kubernetes cluster should be secure, easy to use, and extendable. This story demonstrates how we could visualize a Kubernetes cluster as two parts: the control plane and the nodes.

Then we dug deeper into what goes where, how the control plane orchestrates everything, and how the worker nodes are responsible for executing the workloads.

We are now ready to get our hands dirty and run our first workloads in the next articles.

Learning Rate is my weekly newsletter for those who are curious about the world of AI and MLOps. You’ll hear from me every Friday with updates and thoughts on the latest AI news, research, repos and books. Subscribe here!

About the Author

My name is Dimitris Poulopoulos, and I’m a machine learning engineer working for Arrikto. I have designed and implemented AI and software solutions for major clients such as the European Commission, Eurostat, IMF, the European Central Bank, OECD, and IKEA.

If you are interested in reading more posts about Machine Learning, Deep Learning, Data Science, and DataOps, follow me on Medium, LinkedIn, or @james2pl on Twitter.

Opinions expressed are solely my own and do not express the views or opinions of my employer.