update kuber doc

This commit is contained in:
2025-06-22 21:59:29 +03:30
parent 1976655ed3
commit a028612669
2 changed files with 194 additions and 83 deletions

View File

@@ -1,65 +1,82 @@
# Kubernetes (K8s) Documentation
# 🚢 Kubernetes (K8s) Documentation
## Overview
## 🌐 Overview
**Kubernetes (K8s)** is an open-source container orchestration platform designed to automate the deployment, scaling, and operation of containerized applications.
---
## Control Plane (CP)
The **Control Plane** is the core management component of a Kubernetes cluster. It makes global decisions about the cluster (e.g., scheduling), and it maintains the desired state of the cluster by managing workloads and directing communication within the system.
> **Note:** By default, the Control Plane does not directly manage or run application containers.
## 🧠 Control Plane (CP)
The **Control Plane** is the core management component of a Kubernetes cluster. It makes global decisions about the cluster (e.g., scheduling) and maintains the desired state of the cluster by managing workloads and directing communication within the system.
### Key Components of the Control Plane:
- **API Server (`kube-apiserver`)**:
Exposes the Kubernetes API and serves as the entry point to the cluster. It handles communication between internal components and external clients.
- **Scheduler (`kube-scheduler`)**:
Assigns work (e.g., pods) to nodes based on resource availability and policies.
> 💡 **Note:** By default, the Control Plane does not directly manage or run application containers.
- **Controller Manager (`kube-controller-manager`)**:
Runs controllers that regulate the state of the cluster (e.g., Node Controller, Replication Controller, etc.).
### 🔑 Key Components of the Control Plane
- **etcd**:
A consistent, highly-available key-value store that stores all cluster data, configurations, and states. This is the "database" of Kubernetes.
- **API Server (`kube-apiserver`)**
Exposes the Kubernetes API and serves as the cluster's entry point. It handles communication between internal components and external clients.
- **Scheduler (`kube-scheduler`)**
Assigns workloads (e.g., Pods) to nodes based on resource availability and defined policies.
- **Controller Manager (`kube-controller-manager`)**
Runs controllers that monitor and regulate the cluster's state, such as the Node Controller and Replication Controller.
- **etcd**
A consistent and highly available key-value store that stores all cluster data, configurations, and state. This is the "database" of Kubernetes.
---
## Worker Nodes
Worker nodes are the machines where containerized applications run. Each worker node contains essential components for managing containers.
## 🧱 Worker Nodes
**Worker nodes** are the machines where containerized applications run. Each node contains essential components for managing containers.
### Key Components of a Worker Node:
- **Kubelet**:
An agent that ensures containers are running as specified in their Pod definitions. It communicates with the Control Plane to receive and execute tasks.
### 🔧 Key Components of a Worker Node
- **Kube Proxy**:
Maintains network rules and handles routing for communication between services within the cluster and with external traffic.
- **Kubelet**
An agent that ensures containers run as specified in their Pod definitions. It communicates with the Control Plane to execute assigned tasks.
- **Kube Proxy**
Maintains network rules and manages routing for communication within the cluster and with external systems.
---
## Data Flow
- **Kubelet** and **Kube Proxy** on each worker node communicate with the **API Server** in the Control Plane for task execution and resource updates.
- The **Scheduler** assigns pods to nodes based on resource requirements, while the **Controller Manager** ensures that the cluster state remains consistent.
## 🔄 Data Flow
- **Kubelet** and **Kube Proxy** on each worker node interact with the **API Server** to perform operations and update resource states.
- The **Scheduler** selects suitable nodes for pod placement based on available resources.
- The **Controller Manager** ensures the actual state of the cluster matches the desired state.
---
## Administration Tools
- **`kubeadm`**:
A tool for bootstrapping Kubernetes clusters. It simplifies the setup and configuration of the Control Plane and worker nodes.
## 🛠️ Administration Tools
- **`kubectl`**:
The command-line interface (CLI) for interacting with the Kubernetes API. It is used to manage resources, deploy applications, and inspect cluster components.
- **`kubeadm`**
A command-line tool to bootstrap and configure Kubernetes clusters. It streamlines the setup of both the Control Plane and worker nodes.
- **`kubectl`**
The CLI for interacting with the Kubernetes API. It's used to deploy apps, inspect cluster resources, and manage configurations.
---
## Kubernetes Version Compatibility
### Kubernetes and Container Runtimes:
- **Kubernetes ≤ 1.23**:
Compatible with Docker as the default container runtime.
- **Kubernetes 1.24 to 1.25**:
Docker is not supported as a runtime. These versions require `containerd` or another Container Runtime Interface (CRI) implementation.
- **Kubernetes ≥ 1.25**:
Docker can be installed on the server but must be used indirectly through `containerd` or another CRI-compliant runtime. Docker itself is not a supported runtime.
## 🧩 Kubernetes Version Compatibility
### Kubernetes and Container Runtimes
- **Kubernetes ≤ 1.23**
✅ Compatible with **Docker** as the default container runtime.
- **Kubernetes 1.24 1.25**
❌ Docker is **not supported** directly. Use `containerd` or another CRI-compliant runtime.
- **Kubernetes ≥ 1.25**
⚠️ Docker may be installed on the system but must be used **indirectly** through `containerd` or another supported CRI.
---
## 👥 Kubernetes Roles
- **Control Plane (Manager)**
Requires an **odd number** of nodes for high availability (e.g., 1, 3, 5, ...). This ensures quorum in distributed consensus.
- **Worker (none)**
These nodes run application workloads and do not participate in control decisions.
---