Kubernetes Architecture & Components
Overview
Kubernetes (K8s) is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It follows a master-worker node architecture for control and execution.
Core Architecture
Kubernetes architecture consists of two main layers:
✓ Control Plane (Master Node) – Manages and controls the entire cluster.
✓ Worker Nodes – Execute workloads and run containerized applications (Pods).
Control Plane Components
1. API Server
✓ Central access point for all Kubernetes components.
✓ Exposes the Kubernetes API to handle REST requests.
✓ Validates and processes commands from kubectl and other components.
2. etcd
✓ A distributed key-value store maintaining cluster configuration and state.
✓ Ensures high availability and consistency of cluster data.
✓ Used as the single source of truth for all cluster information.
3. Controller Manager
✓ Runs background controllers to maintain cluster state.
✓ Includes Node Controller, Replication Controller, and Endpoint Controller.
✓ Ensures the desired state of objects matches the actual state.
4. Scheduler
✓ Assigns newly created Pods to suitable worker nodes.
✓ Uses resource metrics and policies for intelligent scheduling.
✓ Ensures balanced workload distribution.
5. Cloud Controller Manager
✓ Integrates Kubernetes with cloud provider APIs.
✓ Manages cloud-specific tasks like load balancing and node management.
✓ Separates cloud logic from the core Kubernetes system.
Worker Node Components
1. Kubelet
✓ Agent running on every node that communicates with the API Server.
✓ Ensures containers in Pods are running correctly.
✓ Reports node and Pod status to the control plane.
2. Kube Proxy
✓ Maintains networking rules across nodes.
✓ Handles Pod-to-Pod and external communication.
✓ Implements load balancing within the cluster.
3. Container Runtime
✓ Executes and manages containers in Pods.
✓ Common runtimes include Docker, containerd, and CRI-O.
✓ Pulls container images and handles low-level operations.
Additional Concepts
Pods
✓ Smallest deployable unit containing one or more containers.
✓ Shared storage and network resources.
ReplicaSets
✓ Maintains the desired number of Pod replicas.
✓ Ensures high availability and fault tolerance.
Deployments
✓ Provides declarative application updates.
✓ Simplifies scaling, rollback, and rollout processes.
Services
✓ Abstracts access to a set of Pods.
✓ Provides stable networking endpoints within or outside the cluster.
ConfigMaps & Secrets
✓ Store configuration and sensitive data securely.
✓ Separate configuration from application code.
Namespaces
✓ Logical segmentation for resource isolation and organization.
✓ Useful in managing large clusters and multi-tenant environments.
Tip
Kubernetes architecture harmonizes the Control Plane (for management) and Worker Nodes (for execution). Together, they automate the deployment, scaling, networking, and health of containerized workloads efficiently and reliably.
🔹 Step-by-Step Explanation of Ballooning, Compression & Swapping in VMware ⸻ 1️⃣ Memory Ballooning (vmmemctl) Ballooning is the first memory reclamation technique used when ESXi detects memory pressure. ➤ Step-by-Step: How Ballooning Works 1. VMware Tools installs the balloon driver (vmmemctl) inside the guest OS. 2. ESXi detects low free memory on the host. 3. ESXi inflates the balloon in selected VMs. 4. Balloon driver occupies guest memory, making the OS think RAM is full. 5. Guest OS frees idle / unused pages (because it believes memory is needed). 6. ESXi reclaims those freed pages and makes them available to other VMs. Why Ballooning Happens? • Host free memory is very low. • ESXi wants the VM to release unused pages before resorting to swapping. Example • Host memory: 64 GB • VMs used: 62 GB • Free: 2 GB → ESXi triggers ballooning • VM1 (8 GB RAM): Balloon inflates to 2 GB → OS frees 2 GB → ESXi re...
Comments
Post a Comment