K8s architecture

Kubernetes architecture

There are two ways in which we can interact with the K8s API: 1- UI (Kubernetes dashboard) 2- CLI (Kubectl). These two interfaces interacts with the API using a declarative model in which you specify the desired state. In the other hand we have our minions or nodes and also the images registry in which all the images are stored, so the nodes can retrieve the images to update/create new pods.

Image #1. General overview of the k8s architecture

What happens if my nodes die?

One question that arrives in while using clusters is what happens if my node dies or if my master dies? Well, if a node dies it is replaced with a new one, if the master node dies you may want to know that your cluster will not be down it will be like a chicken without a head, everything will be working as expected but your wont be able to use any interface of the API to interact and orchestrate your cluster. But if you faced this problem we have two options: 1- Having other master nodes in the cluster, if our leader dies another one takes its place, it uses the raft algorithm to select the next leader. 2- Having a full backup of our cluster to recover from there. More of this later in other articles

Details of the k8s architecture

Looking a little bit in details we have some important components that we need to know:

Master components (Control plain)

API Server: Here is were both interfaces are connected (UI/CLI) and it uses the raft algorithm to select the next master if the master node dies. It is the brain of the cluster and what get lost when we lost the master

Node infrastructure

Container Runtime: In the latest versions of kubernetes it uses dockerd which is the core of docker

Image #2. K8s Architecture

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Josué Carvajal

Josué Carvajal

Sr. Security software engineer working in the DevSecOps area. CompTIA Sec+, C|EH