Architecture
Kubernetes operates on a cluster model, which essentially means it distributes its workload across multiple servers or nodes, each handling specific tasks. This model was inspired by Google's need to efficiently manage billions of containers every week, showcasing Kubernetes' ability to scale horizontally across thousands of nodes, even in different datacenters and regions.

Two Main Types of Server Nodes in a Kubernetes Cluster:
Control Plane Nodes:
Think of these as the command center of your Kubernetes cluster. The control plane nodes hold the components responsible for managing the cluster's operations, such as deploying applications, scheduling tasks, and ensuring the cluster self-heals by replacing failed containers.
Worker Nodes:
These nodes are the workforce of the cluster, where your applications actually run. Worker nodes execute tasks assigned by the control plane without making any autonomous decisions.
Key Components of Kubernetes:
Inside the Control Plane:
kube-apiserver: The core interface of Kubernetes. All interactions within the cluster go through the apiserver, making it the main communication hub.
etcd: A highly reliable database that stores the cluster's state and configuration. It’s essential for the cluster’s operation but operates as a standalone project outside of Kubernetes' core components.
kube-scheduler: Responsible for assigning your application to the right worker node based on resource availability and requirements.
kube-controller-manager: Houses various controllers that oversee the cluster's state, ensuring that the actual state matches the desired state set by users.
cloud-controller-manager (optional): Connects your cluster with your cloud provider's API to manage resources like load balancers and storage automatically.
On the Worker Nodes:
Container runtime: The software that runs the containers. Docker was a popular choice, but Kubernetes now supports other runtimes like containerd.
kubelet: A vital agent on each worker node, ensuring containers start up as instructed by the control plane.
kube-proxy: Manages network traffic to and from containers, leveraging the operating system's networking capabilities whenever possible.
Namespaces:
Even if the control plane experiences downtime, applications running on worker nodes will continue to operate. However, critical functions like scaling and scheduling new applications can't proceed without the control plane.
Kubernetes uses namespaces to segment the cluster into virtual clusters. This is especially useful for multi-tenancy, allowing different teams to share a cluster without stepping on each other's toes. However, namespaces aren't designed for strict isolation but rather for organizing and managing access to resources within the cluster.
Understanding these components and how they interact provides a solid foundation for mastering Kubernetes, enabling efficient management and scaling of containerized applications.
Last updated