#KubernetesSummarySeries - Module 2 [k8s Architecture]
Kubernetes Architecture
Kubernetes follows a master-worker model with the control plane acting as the brain and the worker nodes doing the heavy lifting.
Control Plane (Master)
The Control Plane is responsible for the global decision-making and management of the entire Kubernetes cluster. It controls and manages the cluster's state and ensures that everything is running as expected.
🔅 API Server (kube-apiserver) - Acts as the entry point to the Kubernetes cluster. It handles RESTful requests, serves the cluster state and provides the API interface for users and other components to interact with Kubernetes.
🔅 Scheduler (kube-scheduler) - The brains behind placing workloads (containers) on available nodes. It considers factors like resource availability, node constraints and policies to ensure workloads are distributed efficiently.
🔅 Controller Manager (kube-controller-manager) - Responsible for managing the lifecycle of various components. It ensures that the desired state of the system is always achieved. It includes controllers for replication, node management and resource scaling.
🔅 Etcd - A distributed key-value store that holds all the configuration data and cluster state. It’s the heartbeat of Kubernetes, ensuring that cluster configuration is consistent and available.
Nodes (Worker Nodes)
Nodes are the machines (physical or virtual) that run containers. Each node is managed by the control plane and contains all the necessary components to run and manage containers.
🔅 Kubelet - The agent that runs on each node, ensuring that containers are running as expected. The kubelet communicates with the control plane and ensures that containers are deployed and running correctly on the node.
🔅 Kube Proxy - Acts as the network proxy that manages networking for the pods. It ensures that network traffic is properly routed between pods and external services, handling load balancing and service discovery.
🔅 Container Runtime - The engine responsible for running containers. It can be Docker, containerd or any container runtime that supports the Kubernetes standard. The container runtime pulls container images, runs containers and manages container lifecycles.
Pods (The Heart of Kubernetes)
At the core of Kubernetes are Pods, the smallest deployable units.
A Pod is a logical host for one or more containers and ensures that containers are always scheduled together on the same node. Pods also abstract the underlying infrastructure, providing portability across different environments.
Multi-Container Pods - While a pod typically contains a single container, it can also host multiple containers that share the same network namespace, storage and lifecycle. This allows tightly coupled applications to run together.
Recommended by LinkedIn
Services (Exposing Applications)
A Service in Kubernetes is a logical abstraction that enables communication between different components and external clients.
Other Key Components :
🔅 Volumes 🔅 Namespaces 🔅 ConfigMaps & Secrets
What happens when a request arrives in a Kubernetes cluster ?
📌 The API Server is the entry point. It receives the request and acts as the 𝐠𝐚𝐭𝐞𝐤𝐞𝐞𝐩𝐞𝐫.
📌 The API Server validates the request and checks if it's authorized to access the cluster.
📌 The request is stored in etcd, which is a key-value store where Kubernetes saves the cluster's state.
📌 The Scheduler checks the available resources and selects an appropriate Node (worker machine) to run the request.
📌 The Kubelet on the selected node receives instructions to run the required Pod (containerized application).
📌 The Pod starts running on the node and the Kube Proxy configures network access.
📌 If the request is for a service, the Kube Proxy ensures the right traffic is routed to the correct container.
📌 If the app needs to scale, the Controller Manager ensures new Pods are launched or old ones are removed.
📌 If a container fails, the Kubelet automatically restarts it to keep the app running.
📌 Throughout this process, Kubernetes constantly monitors the system to ensure everything is running smoothly.
The Kubernetes architecture is what allows Kubernetes to automate deployment, scaling and operations for containerized applications and leverage its full potential to build scalable, resilient and secure systems.
🔔 Stay tuned for the next part of the series
Don't forget to follow Gaurav Sharma to catch the upcoming articles and stay ahead in your Kubernetes journey !
#Kubernetes #CloudNative #DevOps #Microservices #Containerization #TechInnovation #Scalability #KubernetesArchitecture #SoftwareDevelopment #KubernetesSummarySeries