Nextgen Blog
HomeLearnAIQuantumRoboticsSecuritySpaceAbout
Nextgen Blog

By Anubhav — full stack engineer, IIT Mandi CSE. Deep dives into AI, software engineering, and the technologies shaping the next generation of tech.

Navigate

  • Home
  • Learn
  • Blog
  • Archive
  • About

Topics

  • Artificial Intelligence
  • Quantum Computing
  • Robotics
  • Cybersecurity
  • Space Tech

Connect

Built with ❤️ & By - Anubhav

© 2026 Nextgen Blog by Anubhav. All rights reserved.

Privacy PolicyTerms of Service
Phase 01 · FoundationsChapter 2 of 33
01.
Phase 01Read time ~10 minDifficulty intermediate

What is Kubernetes?

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.

In this chapter
  • 01First: What problem are we solving?
  • 02Problem 1 — Application crashes
  • 03Problem 2 — Traffic increases
  • 04Problem 3 — Server failure
  • 05Problem 4 — Updating your application
  • 06What is Kubernetes?
  • 07Container
  • 08Orchestration
  • 09A real-world analogy
  • 10Desired State — One of the most important concepts
  • 11Kubernetes vs Docker
  • 12Docker
  • 13Kubernetes
  • 14What is a Kubernetes Cluster?
  • 15Control Plane
  • 16Worker Nodes
  • 17What is a Node?
  • 18What is a Pod?
  • 19Pod vs Container
  • 20What happens when traffic increases?
  • 21What happens when a Pod crashes?
  • 22Kubernetes doesn't just run applications
  • 23A typical application architecture
  • 24Why not just use VMs?
  • 25Kubernetes is NOT a cloud provider
  • 26Kubernetes ecosystem
  • 27The Kubernetes mental model
  • 28Important Kubernetes vocabulary
  • 29Cluster
  • 30Node
  • 31Pod
  • 32Container
  • 33Deployment
  • 34Service
  • 35Ingress
  • 36ConfigMap
  • 37Secret
  • 38HPA
  • 39Your first mental exercise
  • 40What you should know after Chapter 1
  • 41Mini interview question
In this chapter (41 sections)
01First: What problem are we solving?02Problem 1 — Application crashes03Problem 2 — Traffic increases04Problem 3 — Server failure05Problem 4 — Updating your application06What is Kubernetes?07Container08Orchestration09A real-world analogy10Desired State — One of the most important concepts11Kubernetes vs Docker12Docker13Kubernetes14What is a Kubernetes Cluster?15Control Plane16Worker Nodes17What is a Node?18What is a Pod?19Pod vs Container20What happens when traffic increases?21What happens when a Pod crashes?22Kubernetes doesn't just run applications23A typical application architecture24Why not just use VMs?25Kubernetes is NOT a cloud provider26Kubernetes ecosystem27The Kubernetes mental model28Important Kubernetes vocabulary29Cluster30Node31Pod32Container33Deployment34Service35Ingress36ConfigMap37Secret38HPA39Your first mental exercise40What you should know after Chapter 141Mini interview question

1. First: What problem are we solving?#

Imagine you have built a Node.js API.

User
  ↓
Node.js API
  ↓
Database

Initially, you have only a few users.

You can simply run:

node server.js

Everything works.

But your application becomes popular.

Now you have:

100 users
   ↓
1,000 users
   ↓
10,000 users
   ↓
100,000 users

Suddenly, several problems appear.

Problem 1 — Application crashes#

Your Node.js application may crash because of:

  • High CPU
  • High memory
  • Application bugs
  • Server failure

Who restarts it?


Problem 2 — Traffic increases#

Suppose one server can handle:

10,000 requests/minute

But suddenly you receive:

50,000 requests/minute

You need multiple application instances:

             Users
               ↓
         Load Balancer
          ↙    ↓    ↘
       API    API    API
       #1     #2     #3

Who creates those additional instances?

Who removes them when traffic decreases?


Problem 3 — Server failure#

Suppose:

Server 1
   ↓
Node.js application

Server 1 dies.

Your application is now unavailable.

You want something like:

Server 1 ❌
     ↓
Kubernetes detects failure
     ↓
Start application somewhere else
     ↓
Application available again

Problem 4 — Updating your application#

You have:

Version 1

You want to deploy:

Version 2

You don't want to:

Stop application
↓
Update
↓
Start application

because users could experience downtime.

You want:

Version 1
Version 1
Version 1
       ↓
Gradually replace
       ↓
Version 2
Version 2
Version 2

Kubernetes can manage this.


2. What is Kubernetes?#

Kubernetes is a container orchestration platform.

That's the definition you should remember.

Let's break it down.

Container#

A container packages your application and its dependencies.

For example:

Node.js Application
      +
Dependencies
      +
Runtime
      ↓
   Container

Docker is commonly used to create and run containers.

Orchestration#

Orchestration means:

Automatically managing many containers and the infrastructure they run on.

So:

Docker
   ↓
Runs containers
 
Kubernetes
   ↓
Manages containers at scale

3. A real-world analogy#

Imagine an army.

You have:

100 soldiers

You 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.


4. Desired State — One of the most important concepts#

Suppose you tell Kubernetes:

I want 3 Pods running.

Kubernetes sees:

Current:
3 Pods
Desired:
3 Pods

Everything is fine.

Now one crashes:

Current:
2 Pods
 
Desired:
3 Pods

Kubernetes 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.


5. Kubernetes vs Docker#

This confuses almost every beginner.

Docker#

Docker is primarily a container platform.

You can run:

docker run nginx

You can have:

Container 1
Container 2
Container 3

But managing hundreds or thousands of containers becomes complicated.

Kubernetes#

Kubernetes manages containerized applications across machines.

                 Kubernetes
                     ↓
       ┌─────────────┼─────────────┐
       ↓             ↓             ↓
    Machine 1     Machine 2     Machine 3
       ↓             ↓             ↓
     Pods           Pods          Pods

So remember:

Docker helps create/run containers. Kubernetes orchestrates containerized applications.


6. What is a Kubernetes Cluster?#

A cluster is a group of machines managed by Kubernetes.

Conceptually:

             Kubernetes Cluster
                     │
        ┌────────────┴────────────┐
        │                         │
   Control Plane              Worker Nodes
                                  │
                         ┌────────┼────────┐
                         ↓        ↓        ↓
                       Pod      Pod      Pod

There are two major parts:

Control Plane#

The brain of the cluster.

Worker Nodes#

Machines that actually run your workloads.

We'll study these deeply in Chapter 3.


7. What is a Node?#

A Node is a machine that can run Kubernetes workloads.

It could be:

  • A physical server
  • A virtual machine
  • A cloud VM

For example:

Kubernetes Cluster
 
Node 1
Node 2
Node 3

Each node has resources such as:

CPU
RAM
Storage
Network

Kubernetes schedules your workloads onto these nodes.


8. What is a Pod?#

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 Container

But a Pod can contain multiple tightly coupled containers:

Pod
├── Application Container
└── Sidecar Container

For beginners, think:

Pod = wrapper around one or more containers that should run together.


9. Pod vs Container#

This distinction is important.

Kubernetes
   ↓
Pod
   ↓
Container

For a simple application:

Pod
└── Node.js Container

You 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 3

We'll learn this hierarchy in Chapter 6.


10. What happens when traffic increases?#

This connects directly to your previous question.

Suppose:

Traffic = 1,000 requests/min
Pods = 3

Traffic increases:

Traffic = 1,800 requests/min

Kubernetes can use Horizontal Pod Autoscaler (HPA).

Traffic / Metrics
       ↓
      HPA
       ↓
Increase replicas
       ↓
3 Pods → 5 Pods

And when traffic decreases:

5 Pods
  ↓
Lower demand
  ↓
HPA
  ↓
3 Pods

We'll study HPA in detail later.


11. What happens when a Pod crashes?#

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 = 2

Kubernetes creates another Pod.

Pod 1 ✅
Pod 3 ✅
Pod 4 ✅

This is called self-healing.


12. Kubernetes doesn't just run applications#

It can manage many things around your application:

                    Kubernetes
                         │
       ┌─────────────────┼─────────────────┐
       ↓                 ↓                 ↓
   Deployment         Service          ConfigMap
       ↓                 ↓
      Pods            Networking
 
       ↓
    Secrets
 
       ↓
    Storage
 
       ↓
   Autoscaling
 
       ↓
    Monitoring

You'll eventually learn each of these.


13. A typical application architecture#

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
                                    ↓
                              PostgreSQL

Kubernetes can manage much of this infrastructure.


14. Why not just use VMs?#

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 environments

You need to manage:

  • Deployment
  • Scaling
  • Networking
  • Health
  • Failures
  • Updates
  • Configuration
  • Resources

Kubernetes automates much of this.


15. Kubernetes is NOT a cloud provider#

Another important distinction.

Kubernetes is not:

AWS
Azure
GCP

Instead, Kubernetes can run on cloud infrastructure.

For example:

AWS
 ↓
EKS
 ↓
Kubernetes
Google Cloud
 ↓
GKE
 ↓
Kubernetes
Azure
 ↓
AKS
 ↓
Kubernetes

You can also run Kubernetes locally.


16. Kubernetes ecosystem#

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.


17. The Kubernetes mental model#

This is probably the most useful diagram to remember after Chapter 1:

                    USER
                      │
                      ↓
                Load Balancer
                      │
                      ↓
                   Service
                      │
                      ↓
                 Deployment
                      │
                      ↓
                 ReplicaSet
                      │
             ┌────────┼────────┐
             ↓        ↓        ↓
           Pod      Pod      Pod
             │        │        │
             ↓        ↓        ↓
         Container Container Container

And underneath:

                  Kubernetes Cluster
                         │
             ┌───────────┴───────────┐
             │                       │
       Control Plane            Worker Nodes
                                   │
                              Pods run here

This architecture will become much clearer as we progress.


18. Important Kubernetes vocabulary#

Start remembering these terms:

Cluster#

A complete Kubernetes environment.

Node#

A machine inside the cluster.

Pod#

Smallest deployable unit.

Container#

Where your application actually runs.

Deployment#

Manages replicated application Pods.

Service#

Provides stable networking/access to Pods.

Ingress#

Manages external HTTP/HTTPS access.

ConfigMap#

Stores non-sensitive configuration.

Secret#

Stores sensitive configuration.

HPA#

Automatically scales Pods based on metrics.


19. Your first mental exercise#

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 → 10

That's the core idea of Kubernetes.


20. What you should know after Chapter 1#

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.


🧠 Chapter 1 Cheat Sheet#

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 scaling

Mini interview question#

Q: 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.

Finished this chapter?

Mark it as complete to track your mastery.

Previous ChapterKubernetes — Zero to Production Learning PlanNext ChapterChapter 2 — Docker & Containers Fundamentals
PrevNext