Let's start from zero. By the end of this chapter, you should understand why Kubernetes exists, what problem it solves, and the basic vocabulary you'll use throughout the course.
Imagine you have built a Node.js API.
User
↓
Node.js API
↓
DatabaseInitially, you have only a few users.
You can simply run:
node server.jsEverything works.
But your application becomes popular.
Now you have:
100 users
↓
1,000 users
↓
10,000 users
↓
100,000 usersSuddenly, several problems appear.
Your Node.js application may crash because of:
Who restarts it?
Suppose one server can handle:
10,000 requests/minuteBut suddenly you receive:
50,000 requests/minuteYou need multiple application instances:
Users
↓
Load Balancer
↙ ↓ ↘
API API API
#1 #2 #3Who creates those additional instances?
Who removes them when traffic decreases?
Suppose:
Server 1
↓
Node.js applicationServer 1 dies.
Your application is now unavailable.
You want something like:
Server 1 ❌
↓
Kubernetes detects failure
↓
Start application somewhere else
↓
Application available againYou have:
Version 1You want to deploy:
Version 2You don't want to:
Stop application
↓
Update
↓
Start applicationbecause users could experience downtime.
You want:
Version 1
Version 1
Version 1
↓
Gradually replace
↓
Version 2
Version 2
Version 2Kubernetes can manage this.
Kubernetes is a container orchestration platform.
That's the definition you should remember.
Let's break it down.
A container packages your application and its dependencies.
For example:
Node.js Application
+
Dependencies
+
Runtime
↓
ContainerDocker is commonly used to create and run containers.
Orchestration means:
Automatically managing many containers and the infrastructure they run on.
So:
Docker
↓
Runs containers
Kubernetes
↓
Manages containers at scaleImagine an army.
You have:
100 soldiersYou don't want the commander manually telling every soldier:
"Go here."
"Come back."
"You are sick, replace yourself."
"We need 20 more soldiers."
Instead, you have systems that manage them.
Kubernetes is somewhat like the manager/coordinator of your containerized applications.
You tell Kubernetes:
"I want 5 instances of my application running."
Kubernetes continuously tries to maintain that desired state.
Suppose you tell Kubernetes:
I want 3 Pods running.Kubernetes sees:
Current:
3 Pods
Desired:
3 PodsEverything is fine.
Now one crashes:
Current:
2 Pods
Desired:
3 PodsKubernetes effectively says:
"I'm missing one."
It creates another.
Before:
Pod 1 ✅
Pod 2 ❌
Pod 3 ✅
↓
Kubernetes
↓
Pod 1 ✅
Pod 3 ✅
Pod 4 ✅This idea of continuously working toward the desired state is fundamental to Kubernetes.
This confuses almost every beginner.
Docker is primarily a container platform.
You can run:
docker run nginxYou can have:
Container 1
Container 2
Container 3But managing hundreds or thousands of containers becomes complicated.
Kubernetes manages containerized applications across machines.
Kubernetes
↓
┌─────────────┼─────────────┐
↓ ↓ ↓
Machine 1 Machine 2 Machine 3
↓ ↓ ↓
Pods Pods PodsSo remember:
Docker helps create/run containers. Kubernetes orchestrates containerized applications.
A cluster is a group of machines managed by Kubernetes.
Conceptually:
Kubernetes Cluster
│
┌────────────┴────────────┐
│ │
Control Plane Worker Nodes
│
┌────────┼────────┐
↓ ↓ ↓
Pod Pod PodThere are two major parts:
The brain of the cluster.
Machines that actually run your workloads.
We'll study these deeply in Chapter 3.
A Node is a machine that can run Kubernetes workloads.
It could be:
For example:
Kubernetes Cluster
Node 1
Node 2
Node 3Each node has resources such as:
CPU
RAM
Storage
NetworkKubernetes schedules your workloads onto these nodes.
This is extremely important.
Kubernetes doesn't normally say:
"Run this container."
Instead, Kubernetes manages Pods.
A Pod is the smallest deployable unit in Kubernetes.
The simplest Pod contains one container:
Pod
└── Node.js ContainerBut a Pod can contain multiple tightly coupled containers:
Pod
├── Application Container
└── Sidecar ContainerFor beginners, think:
Pod = wrapper around one or more containers that should run together.
This distinction is important.
Kubernetes
↓
Pod
↓
ContainerFor a simple application:
Pod
└── Node.js ContainerYou don't normally create 100 individual Pods manually.
Instead, you tell Kubernetes:
I want 3 copies of my application.Kubernetes manages them.
Deployment
↓
ReplicaSet
↓
┌─────────┬─────────┬─────────┐
Pod 1 Pod 2 Pod 3We'll learn this hierarchy in Chapter 6.
This connects directly to your previous question.
Suppose:
Traffic = 1,000 requests/min
Pods = 3Traffic increases:
Traffic = 1,800 requests/minKubernetes can use Horizontal Pod Autoscaler (HPA).
Traffic / Metrics
↓
HPA
↓
Increase replicas
↓
3 Pods → 5 PodsAnd when traffic decreases:
5 Pods
↓
Lower demand
↓
HPA
↓
3 PodsWe'll study HPA in detail later.
Suppose:
Pod 1 ✅
Pod 2 ❌
Pod 3 ✅If Kubernetes is managing those Pods through a Deployment and the desired number is 3:
Desired = 3
Current = 2Kubernetes creates another Pod.
Pod 1 ✅
Pod 3 ✅
Pod 4 ✅This is called self-healing.
It can manage many things around your application:
Kubernetes
│
┌─────────────────┼─────────────────┐
↓ ↓ ↓
Deployment Service ConfigMap
↓ ↓
Pods Networking
↓
Secrets
↓
Storage
↓
Autoscaling
↓
MonitoringYou'll eventually learn each of these.
Imagine you're building an e-commerce application.
You might have:
Internet
↓
Load Balancer
↓
Ingress
↓
┌──────────┴──────────┐
↓ ↓
Frontend Service API Service
↓ ↓
Next.js Pods Node.js Pods
↓
Database Service
↓
PostgreSQLKubernetes can manage much of this infrastructure.
You might ask:
"Why don't we simply create 10 VMs?"
You can.
But manually managing them becomes difficult.
Imagine:
50 VMs
200 containers
20 applications
10 environmentsYou need to manage:
Kubernetes automates much of this.
Another important distinction.
Kubernetes is not:
AWS
Azure
GCPInstead, Kubernetes can run on cloud infrastructure.
For example:
AWS
↓
EKS
↓
KubernetesGoogle Cloud
↓
GKE
↓
KubernetesAzure
↓
AKS
↓
KubernetesYou can also run Kubernetes locally.
You'll eventually encounter these names:
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Kubernetes | Container orchestration |
| Helm | Kubernetes package management |
| Prometheus | Metrics |
| Grafana | Visualization |
| Argo CD | GitOps |
| Istio | Service mesh |
| NGINX | Ingress/reverse proxy |
| EKS | AWS Kubernetes |
| GKE | Google Kubernetes |
| AKS | Azure Kubernetes |
Don't try to memorize all of these yet.
We'll learn them when they're needed.
This is probably the most useful diagram to remember after Chapter 1:
USER
│
↓
Load Balancer
│
↓
Service
│
↓
Deployment
│
↓
ReplicaSet
│
┌────────┼────────┐
↓ ↓ ↓
Pod Pod Pod
│ │ │
↓ ↓ ↓
Container Container ContainerAnd underneath:
Kubernetes Cluster
│
┌───────────┴───────────┐
│ │
Control Plane Worker Nodes
│
Pods run hereThis architecture will become much clearer as we progress.
Start remembering these terms:
A complete Kubernetes environment.
A machine inside the cluster.
Smallest deployable unit.
Where your application actually runs.
Manages replicated application Pods.
Provides stable networking/access to Pods.
Manages external HTTP/HTTPS access.
Stores non-sensitive configuration.
Stores sensitive configuration.
Automatically scales Pods based on metrics.
Imagine this requirement:
"I have a Node.js API. I want 3 copies running. If one crashes, another should replace it. If traffic becomes high, increase to 10 copies. If traffic decreases, reduce back to 3."
Kubernetes components could eventually look like:
Node.js API
│
Deployment
│
┌─────┼─────┐
↓ ↓ ↓
Pod Pod Pod
│ │ │
└─────┬─────┘
│
HPA
│
Scale 3 → 10That's the core idea of Kubernetes.
You should now be able to answer:
What is Kubernetes?
Kubernetes is a container orchestration platform that automates deployment, scaling, networking, and management of containerized applications.
What is Docker?
Docker is a platform commonly used to build and run containers.
What is a Pod?
A Pod is Kubernetes' smallest deployable unit and contains one or more containers.
What is a Node?
A Node is a machine that runs Kubernetes workloads.
What is a Cluster?
A cluster is a collection of machines managed by Kubernetes.
What happens if a Pod dies?
Kubernetes can create/restart workloads to bring the system back toward its desired state.
Can Kubernetes automatically scale Pods?
Yes. For example, the Horizontal Pod Autoscaler can adjust the number of Pod replicas based on configured metrics.
Docker
↓
Containers
Kubernetes
↓
Manages containers
Cluster
↓
Collection of nodes
Node
↓
Machine
Pod
↓
Smallest Kubernetes workload unit
Deployment
↓
Manages Pods
Service
↓
Stable networking
Ingress
↓
External HTTP/HTTPS access
HPA
↓
Automatic Pod scalingQ: Why do we need Kubernetes if Docker already runs containers?
A good answer:
Docker can run containers, but managing many containers across multiple machines—such as scaling, service discovery, rolling deployments, failure recovery, and scheduling—becomes difficult manually. Kubernetes provides orchestration and automates these tasks.
Next: Chapter 2 — Docker & Containers Fundamentals.
We'll actually build a small Node.js application → Docker image → Docker container, because understanding this makes Kubernetes much easier.
Mark it as complete to track your mastery.