๐Ÿ“ Kubernetes

What Is Kubernetes and Why You Need It

P
Author
PyLand Team
๐Ÿ“…
Published
30.06.2026
โฑ๏ธ
Reading time
3 min
๐Ÿ‘๏ธ
Views
301
๐ŸŒฑ
Level
Beginner

Docker packages an application into a container. But what do you do when you have hundreds of containers, they keep crashing, load spikes unpredictably, and a single server can no longer cope?

The Problem: Docker Compose on a Single Server

Docker Compose is great for local development and small projects. But it has hard limits:

  • Runs on a single host only
  • When the server goes down, the entire application is unavailable
  • No automatic scaling under load
  • Zero-downtime updates require custom scripting
  • No built-in monitoring or self-healing

As an application grows, these limitations become critical.

What Is Kubernetes

Kubernetes (K8s) is an open-source container orchestrator originally created at Google. It automatically manages the deployment, scaling, and health of containerized applications across a cluster of servers.

Analogy: if Docker is a shipping container, Kubernetes is the port terminal with cranes, a schedule, and a dispatcher. It decides where to place each container, monitors its state, and replaces damaged ones.

Key Capabilities

Self-healing โ€” if a container crashes, K8s restarts it automatically. If a cluster node fails, pods migrate to healthy nodes.

Auto-scaling โ€” HorizontalPodAutoscaler increases the replica count when load rises and shrinks it when load drops.

Rolling updates โ€” updates with zero downtime: new pods come up while old ones shut down gradually. On error, automatic rollback kicks in.

Multi-node โ€” a cluster of multiple servers. Load is distributed across all nodes; no single point of failure.

Declarative configuration โ€” you describe the desired state in YAML; K8s converges the system to that state and keeps it there.

When to Use K8s vs Docker Compose

Criterion Docker Compose Kubernetes
Team size 1โ€“5 people 5+ people
Servers 1 3+
Load Stable Variable
Availability requirement None 99.9%+
Complexity Low High

Use Docker Compose for startups, pet projects, or staging environments. Use Kubernetes when fault tolerance, scaling, and production-grade CI/CD matter.

Cluster Architecture

A K8s cluster has two types of nodes: Control Plane (the management layer) and Worker Nodes (where your workloads run).

Control Plane

The brain of the cluster. Makes scheduling decisions and is responsible for system state.

  • API Server โ€” the single entry point. Every kubectl command goes here. A REST API that accepts and validates requests.
  • etcd โ€” a distributed key-value store. All cluster state lives here. The most critical component โ€” lose etcd, lose the cluster.
  • Scheduler โ€” decides which Worker Node to run a new Pod on, considering available resources, affinity rules, and constraints.
  • Controller Manager โ€” a collection of controllers that watch current state and drive it toward the desired state (ReplicaSet, Deployment, Node controllers).

Worker Nodes

The workhorses. This is where your application containers actually run.

  • kubelet โ€” an agent on every node. Receives assignments from the API Server and manages pods through the container runtime.
  • kube-proxy โ€” a network proxy. Maintains network rules and load balancing inside the cluster.
  • Container Runtime โ€” the engine that actually runs containers (containerd, CRI-O).
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         Control Plane           โ”‚
โ”‚  API Server โ† kubectl           โ”‚
โ”‚  etcd (state storage)           โ”‚
โ”‚  Scheduler                      โ”‚
โ”‚  Controller Manager             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ–ผ          โ–ผ          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚Node 1 โ”‚  โ”‚Node 2 โ”‚  โ”‚Node 3 โ”‚
โ”‚kubeletโ”‚  โ”‚kubeletโ”‚  โ”‚kubeletโ”‚
โ”‚  Pod  โ”‚  โ”‚  Pod  โ”‚  โ”‚  Pod  โ”‚
โ”‚  Pod  โ”‚  โ”‚  Pod  โ”‚  โ”‚       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

First Step: Installing kubectl

# macOS
brew install kubectl

# Verify connection to the cluster
kubectl cluster-info
kubectl get nodes

For a local cluster use minikube or kind:

# Install and start minikube
brew install minikube
minikube start

# Verify
kubectl get nodes
# NAME       STATUS   ROLES           AGE   VERSION
# minikube   Ready    control-plane   1m    v1.29.0

Kubernetes is not just a tool โ€” it is a platform. The complexity is justified only when your workload genuinely requires orchestration.

Your reaction to the article

๐Ÿ’ฌ Comments (0)

๐Ÿ” Sign in to leave a comment
๐Ÿšช Login
๐Ÿ’ญ

No comments yet

Be the first to share your opinion about this article!

๐Ÿ”— Similar

Similar articles

Continue learning with these materials

๐Ÿ“

Helm: The Kubernetes Package Manager

Deploying an application on K8s means writing 5โ€“10 YAML files: Deployment, Service, Ingress, ConfigMap, Secret,...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 321
๐Ÿ“

Health Checks: Liveness and Readiness in Kubernetโ€ฆ

A container is running โ€” that does not mean the application is working. There might...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 327
๐Ÿ“

Resource Limits and Requests in Kubernetes

Without resource constraints a single "greedy" container can consume all the memory on a node...

๐Ÿ“… 30.06.2026 ๐Ÿ‘๏ธ 308
๐ŸŽ“ Continue learning

Courses that cover this material

Visit the course to apply this material in practice.

Kubernetes: From Containers to Orchestration Open course curriculum