What are Kubernetes Components?
There are two main components to Kubernetes: Cluster and Control Plane.
When deploying Kubernetes, at least one cluster will be created. A cluster contains the following components:
● Nodes.
○ Worker machines that runs containerized applications.
○ Every cluster will have at least one node.
○ Managed by the Control Plane.
● Pods.
○ Components of an application workload.
○ Managed by the Control Plane.
A cluster can be configured to run multiple nodes. To provide fault-tolerance and high availability, the Control Plane can be set up to run on multiple computers.
Control Plane Components
The Control Plane is responsible for the following:
● control the entire cluster.
● ensure that the cluster is running within the expected configuration.
● handle cluster events.
Each Control Plane component can run on the same or separate machines.
The following are Control Plane components:
● kube-apiserver
● etcd
● kube-scheduler
● kube-controller-manager
● cloud-controller-manager (optional)
kube-apiserver
- This is an API server that exposes Kubernetes API to the end user and workloads.
- This component can be scaled horizontally by deploying more instances (load balancing).
etcd
- This is a storage component that uses a Key-Value database built for Kubernetes. It stores the cluster’s data and can be backed up.
kube-scheduler
- This component watches for newly created Pods and selects which node to run them based on configurable criteria. These criteria includes:
● individual and collective resource requirements
● hardware/software/policy constraints
● affinity and anti-affinity specifications
● data locality
● inter-workload interference
● deadlines
kube-controller-manager
- This component handles the running controller processes. Examples of controllers managed by this component:
● Node controller. Monitors and responds to nodes going offline.
● Job controller. Watches for Jobs tasks. Also creates the Pods to run those tasks.
● EndpointSlice controller. Provide connectivity between Services and Pods.
● ServiceAccount controller. Create default Service Accounts for new namespaces.
cloud-controller-manager
- This optional component is used to embed cloud-specific control logic and to allow a cloud provider to control the cluster. To improve performance and help tolerate failures, this component can be scaled horizontally by running more than one copy.
- This component is only required if running Kubernetes on a compatible cloud service.
- These are the controllers that can have cloud dependencies:
● Node controller
● Route controller
● Service controller
Node Components
The Node components are responsible for providing Kubernetes runtime environment and maintaining the running pods in the cluster. Node components run on every node.
All nodes in a cluster will be running these components:
● kubelet
● kube-proxy
kubelet
- This component is responsible for ensuring that containers are running in a Pod. It uses PodSpecs for its configuration.
kube-proxy
- This component is part of Kubernetes Service and acts as a network proxy. It maintains network rules and allows for network communications between Pods inside and outside of the cluster.
- This component uses the host OS’ packet filtering layer if available. Otherwise, this component forwards the traffic.
Container runtime
This is the software responsible for running the containers.
containerd and CRI-O are examples of supported container runtime software. Other runtime software can be used if it supports Kubernetes CRI (Container Runtime Interface).
Kubernetes Add-Ons
Kubernetes is extensible with add-ons. Here are examples of available add-ons:
● Service Discovery.
● Visualization and Control
○ Dashboard (Web UI)
○ Weave Scope
● Container Resource Monitoring
● Cluster-level Logging
● Infrastructure
○ KubeVirt
○ Node problem detector
● Networking and Network Policy
○ ACI
○ Antrea
○ Calico
○ Canal
○ Cilium
○ CNI-Genie
○ Contiv
○ Contrail
○ Flannel
○ Knitter
○ Multus
○ OVN-Kubernetes
○ Nodus
○ NSX-T
○ Nuage
○ Romana
○ Weave Net