MainHistoryExamplesRecommended Reading

What is Kubernetes?

Help others learn from this page

A program can only execute successfully if it can be reliably deployed onto the machine where it should run.
Kelsey Hightower/ Kubernetes Contributor and Evangelist
image for entry

Kubernetes (a.k.a. K8s) is the de facto orchestrator for deploying, scaling, and managing containerized apps in production.

Kubernetes (K8s) is an open-source platform that manages containerized applications. If Docker is how you package and run one container, Kubernetes is how you manage hundreds or thousands of them — across a fleet of machines.

It handles things like scheduling, scaling, load balancing, failover, and service discovery — so you don’t have to.


What It Is — Technically:

Kubernetes is a container orchestration system. It takes your Docker containers (or any OCI-compatible containers) and runs them in a cluster of machines. It ensures the right number of containers are running, restarts them if they crash, and routes traffic to them.

K8s uses a declarative config model — you tell it what you want (e.g. “3 replicas of my Node app running”) and it figures out how to do it.

Core Concepts:

  • Cluster: A group of machines (VMs or bare metal) that Kubernetes manages
  • Pod: The smallest deployable unit; usually one container, sometimes more
  • Deployment: Describes how to deploy Pods and manage updates
  • Service: Exposes Pods over the network, often behind a stable IP or DNS
  • Ingress: Handles external HTTP traffic (like an API gateway)

What It Handles For You:

  • Scaling: Automatically add or remove containers based on load
  • Self-healing: Restart containers that crash or misbehave
  • Rolling updates: Deploy new versions of your app without downtime
  • Load balancing: Evenly distribute traffic across healthy Pods
  • Secrets/configs: Securely inject env vars and credentials into your app

Why You’d Use It:

  • You’re running multiple containers or microservices
  • You want automated deployment, scaling, and recovery
  • You need zero-downtime rollouts and rollbacks
  • You're deploying to cloud or hybrid environments

When Not to Use Kubernetes:

  • For solo projects or monoliths where Docker Compose is enough
  • When team size or app complexity doesn’t justify the learning curve
  • If you’re fine with simpler alternatives like Heroku, ECS, or Render

Real-World Example:

Say you have a Node.js API, Redis, and Postgres — all containerized. With Kubernetes, you:

  1. Define Deployments and Services in YAML
  2. Push them to the K8s API
  3. Kubernetes handles scheduling, networking, scaling, and health checks

Now, if a container dies? Kubernetes replaces it. Need more traffic capacity? Increase replicas. All without logging into servers or scripting custom logic.

Kubernetes brings structure and resilience to container-based applications — especially in complex or growing systems.

FAQ

Is Kubernetes just for big companies?
Not at all. It’s used by startups and enterprises alike — but it shines when you have multiple services, environments, or teams that need reliability at scale.
Can I use Kubernetes locally?
Yes. Tools like Minikube, kind, and Docker Desktop let you spin up a local Kubernetes cluster for development.
Do I need to know YAML to use Kubernetes?
YAML is the standard way to define Kubernetes resources. You don’t need to *master* it, but being comfortable reading and writing YAML is essential.
Is Kubernetes overkill?
Sometimes, yes. If you’re just building a solo app or need quick deploys, simpler platforms like Heroku, Fly.io, or Render may be better.
How does Kubernetes compare to Docker Swarm?
Kubernetes has become the industry standard for container orchestration. It’s more powerful, flexible, and widely supported than Docker Swarm.

Related Stuff

  • What is Docker?: Docker is how you package apps into containers — Kubernetes is how you run them at scale.
  • What is a Container?: Understanding containers is fundamental to using Kubernetes effectively.
  • What is CI/CD?: Kubernetes integrates tightly with modern CI/CD workflows for automated rollouts and rollbacks.

Enjoyed this explanation? Share it!