Quick Guide to Kubernetes

Kubernetes is a container orchestration system. It helps you deploy, scale, manage, and heal your containerized applications (like Docker containers) automatically.


⚙️ High-Level Architecture:

+------------------+ | User (You) | +--------+---------+ | v +--------+----------+ +----------------+ | Kubernetes API | <----> | kubectl | | (Control Plane)| +----------------+ +--------+----------+ | v +--------+----------+---------------------------+ | Scheduler | Controller Manager | etcd (DB) | +-----------+--------------------+--------------+ | v +--------+----------+ | Kubelet | <--- On each worker node | (runs on nodes) | +--------+----------+ | v +------------------+ | Container Runtime (Docker/containerd) | | Runs Pods with app containers inside | +------------------+

🔁 How It Works (Step by Step Flow):

1. You define YAML

You write a YAML file describing a:

  • Deployment

  • Service

  • Ingress

  • ConfigMap, etc.

2. You apply with kubectl apply -f

This talks to the Kubernetes API Server.

3. Control Plane stores the config

The API Server saves it in etcd (a key-value store).

4. Scheduler picks a Node

The Scheduler finds the best Node to run the Pod.

5. Kubelet starts the Pod

The selected Node's kubelet:

  • Pulls the container image

  • Starts the container

  • Monitors its health

6. Kube-proxy manages network

Handles service discovery, routing, load balancing between Pods.

7. Ingress (optional)

Ingress Controller handles HTTP/HTTPS and routes traffic to Services.


📦 Key Components You Use

ComponentRole
PodSmallest unit — runs 1 or more containers
DeploymentManages Pod replicas (scaling, self-healing)
ServiceExposes Pods (ClusterIP, NodePort, LoadBalancer)
IngressRoutes external HTTP(S) to Services
ConfigMap/SecretInjects configs or secrets into Pods
NamespaceIsolates groups of resources

No comments:

Post a Comment