User Tools

Site Tools


k8s:core:cluster_model

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

k8s:core:cluster_model [2026/05/31 02:30] – created phong2018k8s:core:cluster_model [2026/05/31 02:48] (current) phong2018
Line 1: Line 1:
-====== Kubernetes Cluster Model ======+====== Cluster Model ======
  
 A Kubernetes cluster is a group of machines that work together to run applications. A Kubernetes cluster is a group of machines that work together to run applications.
  
-It has two main parts:+It is made of: 
 +  * Control Plane (brain) 
 +  * Worker Nodes (workers) 
 +  * Pods (applications) 
 + 
 +---
  
 ===== 1. Control Plane ===== ===== 1. Control Plane =====
-This is the "brain" of Kubernetes. 
  
-It manages: +The Control Plane is the **brain of Kubernetes**.
-  Scheduling +
-  Scaling +
-  Health checks +
-  Desired state+
  
-Key components+It decides
-  * API Server → entry point for all commands +  * Where applications run 
-  * Scheduler → decides where pods run +  * How many copies run 
-  * Controller Manager → ensures desired state +  * What happens when something fails 
-  * etcd → key-value database storing cluster state+ 
 +Example: 
 +  * You say: "Run 3 replicas of my app" 
 +  * Control Plane ensures it happens 
 + 
 +---
  
 ===== 2. Worker Nodes ===== ===== 2. Worker Nodes =====
-These are the machines that run your applications. 
  
-Each node contains: +Worker Nodes are machines that **run your applications**.
-  * kubelet → agent that communicates with control plane +
-  container runtime → runs containers (Docker/containerd) +
-  kube-proxy → handles networking+
  
-Nodes run+Example: 
-  * Pods (your application containers)+ 
 + 
 +Node A → runs Pod 1, Pod 2 
 +Node B → runs Pod 3 
 + 
 + 
 +If a node fails
 +  * Kubernetes moves Pods to another node 
 + 
 +---
  
 ===== 3. Pods ===== ===== 3. Pods =====
-The smallest unit in Kubernetes. 
  
-pod: +Pod is the **smallest unit in Kubernetes**.
-  Contains one or more containers +
-  Shares network and storage +
-  Represents a single running instance+
  
-===== Cluster flow =====+Example: 
 + 
 +A Pod contains: 
 +  * Your application container (e.g. nginx) 
 +  * Optional helper containers
  
 Example: Example:
  
-User → Service → Pod → Node 
  
-Control Plane decides+Pod = Web App Container 
-  * Where the pod should run + 
-  * How many replicas exist + 
-  * When to restart failed pods+--- 
 + 
 +===== Full flow example ===== 
 + 
 +User request flow: 
 + 
 + 
 +User 
 +↓ 
 +Service 
 +↓ 
 +Pod 
 +↓ 
 +Node 
 + 
 + 
 +Control Plane ensures
 +  * Pods are created 
 +  * Pods are healthy 
 +  * Pods are distributed across nodes 
 + 
 +--- 
 + 
 +===== Simple analogy =====
  
-===== Key idea ===== +Think of a factory:
-Kubernetes cluster =+
  
-  Control Plane (brain) +  Control Plane → factory manager 
-  + +  Worker Nodes → machines 
-  Worker Nodes (workers) +  Pods → products being produced
-  + +
-  Pods (applications)+
k8s/core/cluster_model.1780194628.txt.gz · Last modified: by phong2018