1. Kubernetes Architecture

VishnuVishnu
3 min read

Includes components and architecture of Kubernetes

Node:

A node is a physical or virtual machine in which the kubernetes and the containers in the kubernetes are deployed

What happens if the node fails and the node machine crashes. Thats why we need multiple nodes in which the kubernetes is installed and in all these nodes the containers are deployed.

Note: Nodes are also called Minions

Cluster:

A cluster is called as collection of nodes in which the kubernetes installed to run the containers. so when we have a collection of noded called cluster, we require some entity to maintain these nodes to control these nodes so we will have a node which will be called as master

Master:

As master is also a node which is configured as master and master components are installed in to , which will do the monitoring and mainitaining of other nodes. The master is also called as control Plane

When we install kubernetes on a node we will have the following components

  • API Server

  • etcd

  • Kubelet

  • Container Runtime

  • Controller

  • Scheduler

In Production the master/Control Plane will run on multiple nodes

The control plane can be run on many machines on the cluster

For simplicity reasons the control plane components will run on specific nodes and no user containers will be running on control plane nodes

API Server/ Kube-api-server

  1. The api server component of the kubernetes control plane exposes the kubernetes API. This is the communication medium through which all the communications happens with the kubernetes cluster

  2. This is the front of the k8s control plane

  3. This can be scaled horizontally and can be deployed in multiple nodes and load balance between them

etcd

  1. Consistent and highly available key value store which stores all the master /node/cluster information of k8s

  2. This is a distributed key value store

  3. Backup the information of the k8s even its stored in etcd

kube-scheduler

  1. This looks for new created pods and assigns the nodes to them to run

kube-controller-manager

  1. The kube-controller-manager is a part of control plane

  2. Its main job is to run various controller which has some task to do it

  3. This is like a watch dog which monitors and fix the cluster issues

Controllers in controller

  • Node Controller: when a node stops in a group of worker nodes. The node controller will detect that and fix it

  • Job Controller: Sometimes, we need to run a one time task (like clean up) . The job controller will create a pod and make it complete successfully.

  • EndPointSlice Controller: This controller helps services (like webserver) to connect with the pods which gives that service.

  • ServiceAccountController: When a new namespace is created , this controller will automatically setup a default service account(an identifier) for it.

Cloud Control Manager:

  1. This lets our k8s components to talk to cloud provider

  2. This also has multiple control process

  3. If the kuberntes is running on premise , the this will not be installed/activated

  4. This can be installed in multiple nodes and can be scaled up horizontally and load balanced

Controllers: Node Controller, Route Controller, Service Controller

Node Controller

Kubelet:

An agent that runs on each. node in the cluster, It makes sure containers are running in the pod

kube-proxy:

This is a network proxy that runs on each node in the cluster Implementing part of kubernetes service concept

Container runtime interface:

This is the component which makes containers run on the k8s cluster

0
Subscribe to my newsletter

Read articles from Vishnu directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vishnu
Vishnu