Cluster
What is a Cluster?
When you deploy Kubernetes, you get a Cluster
A Kubernetes Cluster is a set of worker machines called
nodesthat run containerized applicationsEvery cluster has at least one
worker node
Cluster Architecture
At the hardware level, a Kubernetes Cluster consists of multiple nodes, which can be divided into two types
Master NodeRuns the Kubernetes
Control Planewhich controls and manages the entire Kubernetes systemWorker NodeRuns the actual deployed container applications
Control Plane
The Control Plane
controls and operates the cluster
It consists of the following components that can run on a single master node or be split and replicated across multiple nodes to ensure high availability
Kubernetes API Server
The API Server is the component that exposes the Kubernetes API
Communicates with users and Control Plane components
kube-apiserver
kube-apiserver is designed to
scale horizontallyThat is, it can be scaled by deploying more instances
You can run multiple kube-apiserver instances and balance the traffic between them
Scheduler
A component that detects newly created Pods with no assigned node and
selects a node to run them on
Responsible for the
deploymentof applicationsAssignseach deployable component of an application to aworker node
Factors considered for scheduling include
Individual/aggregate resource requirements
Hardware/Software policy constraints
Affinity & anti-affinity specifications
Data locality
Inter-workload interference
Deadlines
Controller Manager
A component that
runscontrollerprocesses
Performs cluster-level functions such as replicating components, tracking worker nodes, and handling node failures
Logically, each controller is a separate process, but to reduce complexity, they are compiled into a single binary and
run within a single process
Controller Types
Node controllerResponsible for notifying and responding when a node goes down
Job controllerWatches for one-time Job objects and creates Pods to execute those jobs
Endpoints controllerConnects Services and Pods
Service Account & Token controllersCreates default accounts and API access tokens for new Namespaces
etcd
A reliable, key-value structured
distributed data storethat continuously stores the cluster configuration
The components of the Control Plane maintain and control the cluster state, but they do not run applications. That is done on the Nodes.
Node
Worker Nodes are systems that
run containerized applicationsRunning and monitoring applications, and providing services to applications, is performed by the following components
Container Runtime
Responsible for running containers
Supports Docker, containerd, CRI-O, or any software that implements the Kubernetes CRI (Container Runtime Interface)
Kubelet
Communicates with the API Server and manages containers on the node
An agent that runs on each node in the cluster, managing containers to ensure they run within Pods
Receives a set of
PodSpecsthrough various mechanisms and manages containers to ensure they are running properly according to those Pod specsDoes not manage containers that were not created through Kubernetes
Kube-proxy
Kube-Proxyload-balances network traffic between application components
A
network proxythat runs on each node in the cluster, implementing the Kubernetes service conceptMaintains and manages network rules on the node
These network rules allow network communication to pods from internal network sessions or from outside the cluster
Last updated