Only registred users can make comments

Kubernetes - Components

Introduction

This article will introduce you to the Kubernetes Architecture and its components. 

K8s Architecture

The following diagram shows the simplified Kubernetes architectures and the core components:

Kubernetes - Components

Control Plane - components

The following components are part of the core Kubernetes Control Plane:

  • controller manager
  • scheduler
  • API server
  • etcd

 

The components running on Master Node(s) are referred to as Control Plane. Those components are responsible for receiving the requests, making decisions about scheduling, storing the configuration in etcd store, etc.

Controller Manager

Controller manager is a daemon that is basically controlling the state of Kubernetes controllers, like:

  • Node controller: Responsible for noticing and responding when nodes go down.
  • Job controller: Watches for Job objects that represent one-off tasks, then creates Pods to run those tasks to completion.
  • Endpoints controller: Populates the Endpoints object (that is, joins Services & Pods).
  • Service Account & Token controllers: Create default accounts and API access tokens for new namespaces

 


❗Cloud Controller Manager is used for Kubernetes clusters running in public cloud. It allows the cluster to talk to the cloud provider's API. It runs the controllers that are specific to a cloud provider. The following are examples of the controllers :

  • Node controller: checks for the nodes if they stop responding which may be due to a node deletion. 
  • Route controller: For setting up routes in the underlying cloud infrastructure
  • Service controller: For creating, updating, and deleting cloud provider load balancers

Scheduler

  • Checks for newly created Pods that haven't been assigned to a node yet and then selects a node for them to run on.
  • The algorithm to select a node is pretty tough, which includes resource requirements, policy constraints, taints, affinity and anti-affinity, etc.  

API Server

  • Front-end of the Kubernetes control plane
  • Interaction with kubectl, and also serves all REST-requests
  • Talks to etcd store 
  • Responsible for authentification and authorization
  • Can be horizontally scaled

etcd store

  • Consistent and highly available key-value store for Kubernetes service discovery and configuration management
  • Keeps desired and the current state of Kubernetes 
  • Highly important that etcd is properly backed up, the whole cluster is depending on it.

 

Worker node - components

A Worker node is a  virtual or bare-metal server with Kubernetes components used to create and manage Pods.

The following are the components part of the worker node:

  • kubelet
  • kube-proxy

Kubelet

  • The primary agent that runs on each worker node
  • Talks to the control plane's API server to check if there are new Pods that have to be created on the worker node.
  • Works in terms of PodSpec that describes a Pod. It is specified in JSON or YAML format.
  • Performs container monitoring
  • Communicates with container daemon via its API.
  • Doesn't manage containers that were not created by Kubernetes.

Kube-proxy

  • A network proxy that runs on each node in the cluster.
  • Maintains the network rules on the nodes
  • Allows communication to the pods from the network sessions inside and outside of the cluster

Summary

This article has introduced you to the core components of Kubernetes. 

  • Control Plane running on Master nodes
    • API server
    • etcd key-value store
    • scheduler
    • controller manager (+ cloud controller manager)
  • Worker Nodes:
    • kubelet agent
    • kube-proxy

The article will be updated over time, there are some more things to be covered like Add-ons, network and storage plugins etc.

About the Author

Aleksandro Matejic, Cloud Architect, began working in IT Industry over 20y ago as a technical consultant at Lindahl Rothoff in southern Sweden. Since then, he has worked in various companies and industries like Atea, Baxter, and IKEA having various architect roles. In his spare time, Aleksandro is developing and running devoriales.com, a blog and learning platform launched in 2022. In addition, he likes to read and write technical articles about software development and DevOps methods and tools. You can contact Aleksandro by paying a visit to his LinkedIn Profile.

Comments