Day 5 of #40DaysOfKubernetes: Introduction to Kubernetes Architecture
Welcome to Day 5 of #40DaysOfKubernetes! Today, we explored the architecture of Kubernetes, focusing on its various components and how they interact to create a powerful container orchestration platform. Let’s dive into the core elements of Kubernetes architecture and understand their roles.
Kubernetes Architecture Overview
Kubernetes architecture is designed to manage containerized applications in a distributed environment. It provides mechanisms for deployment, scaling, and management. The architecture comprises several key components, including the master node, worker nodes, and the communication layer that connects them.
Key Components
Master Node:
- API Server: The API server is the central management entity that exposes the Kubernetes API. It handles requests from users, tools, and external systems, and updates the state of the cluster.
- Scheduler: The scheduler assigns newly created pods to nodes based on resource requirements and availability. It ensures efficient resource utilization and workload distribution.
- Controller Manager: This component runs various controllers that regulate the state of the cluster, ensuring the desired state matches the current state. Examples include the node controller, replication controller, and endpoint controller.
- ETCD: ETCD is a key-value store that stores all cluster data, including configuration details, state information, and metadata. It is the single source of truth for the cluster’s state.
Worker Node:
- Kubelet: The kubelet is an agent that runs on each worker node. It receives pod specifications from the API server and ensures the containers are running as expected.
- Kube-proxy: Kube-proxy manages network rules and load balancing on the worker nodes. It ensures network communication between pods and services inside and outside the cluster.
- Container Runtime: This is the software responsible for running containers. Kubernetes supports various container runtimes, with Docker being one of the most commonly used.
kubectl:
kubectl
is the command-line tool used to interact with the Kubernetes API server. It allows users to deploy applications, inspect resources, and manage the cluster.
Pods:
- A pod is the smallest and simplest Kubernetes object. It represents a single instance of a running process in the cluster and can contain one or more tightly coupled containers. Pods share the same network namespace and storage volumes.
Kubernetes operates by using a master node to manage a cluster of worker nodes where applications run. The master node components, including the API server, scheduler, controller manager, and ETCD, orchestrate the deployment and scaling of containerized applications. The API server handles requests, the scheduler assigns pods to nodes, the controller manager ensures the cluster’s desired state, and ETCD stores all cluster data. Worker nodes, running the kubelet and kube-proxy, execute and manage the containers using a container runtime like Docker. The kubectl
command-line tool enables users to interact with the Kubernetes API to manage and monitor the cluster.
YouTube reference video : https://youtu.be/SGGkUCctL4I?si=C4ozquuSy1OYmHFY
Reference : https://kubernetes.io/docs/concepts/overview/components/