Foundations

What Is Kubernetes?

● Beginner ⏱ 10 min read

Kubernetes (often abbreviated K8s) is an open-source container orchestration system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Originally designed by Google and now maintained by the Cloud Native Computing Foundation (CNCF), Kubernetes has become the de-facto standard for running containers at scale.

The Problem Kubernetes Solves

Before container orchestration, scaling a web application meant manually provisioning servers, SSH-ing in, installing dependencies, starting processes, and crossing your fingers nothing crashed. When it did crash, someone got paged at 2am.

Containers (popularised by Docker in 2013) solved the "it works on my machine" problem by packaging an application with its runtime, libraries, and config into an immutable image. But containers don't manage themselves. When you have hundreds or thousands of containers across dozens of hosts, you need something to answer questions like:

Kubernetes answers all of these questions.

Without Kubernetes
SSH into each server to deploy manually
No automatic restarts when containers crash
Manual scaling — provision servers, install deps
No built-in service discovery between hosts
On-call alerts at 2am when things go down
With Kubernetes
Declare desired state — K8s figures out placement
Self-healing: crashed containers restart automatically
Horizontal autoscaling based on CPU/memory/custom metrics
Built-in service discovery via DNS and ClusterIP
Continuous reconciliation keeps the cluster healthy
The problems Kubernetes was built to solve

History & Origins

Kubernetes was born from over a decade of Google's internal experience running containerised workloads. Google had been running Borg, its internal cluster management system, since around 2004. Borg ran Google's production workloads — Search, Gmail, Maps — at massive scale. A redesign of Borg's lessons led to Omega, a more flexible scheduler.

In 2013, three Googlers — Joe Beda, Brendan Burns, and Craig McLuckie — started a new project to bring Borg-style orchestration to the outside world. The project was announced publicly in June 2014 and released as open source. Google donated it to the newly-formed Cloud Native Computing Foundation (CNCF) in 2016.

The name "Kubernetes" comes from the Greek word for helmsman or pilot. The "K8s" abbreviation replaces the eight middle letters with the number 8.

YearMilestone
2004Google internally starts Borg cluster manager
2013Docker released publicly; container adoption explodes
2014Kubernetes announced and open-sourced by Google
2016Kubernetes donated to CNCF; v1.0 released
2018CNCF graduates Kubernetes (first ever graduation)
2020+Kubernetes becomes the default for cloud-native workloads

What Kubernetes Does

Kubernetes provides a framework to run distributed systems resiliently. It handles scaling and failover for your application, provides deployment patterns, and more. Specifically, Kubernetes provides:

🔍 Service Discovery Exposes containers via DNS or IP. Load-balances traffic across replicas automatically.
💾 Storage Orchestration Mounts local disks, cloud volumes, or network storage into pods on demand.
🚀 Automated Rollouts Rolls out new versions progressively and rolls back automatically on failure.
📦 Bin Packing Fits containers onto nodes to maximise resource utilisation based on requests.
❤️ Self-Healing Restarts crashed containers, reschedules pods from failed nodes, removes unhealthy pods from traffic.
🔒 Secrets & Config Stores and injects sensitive data without baking it into container images.
⬆️ Horizontal Scaling Scale replicas up or down via command, UI, or automatically from CPU/memory metrics.
Core capabilities Kubernetes provides out of the box

What Kubernetes Is Not

It's equally important to know what Kubernetes deliberately does not do:

⚠️
K8s Has Real Complexity

Kubernetes' power comes with operational complexity. For a simple web app with a single service, a PaaS like Heroku, Railway, or Render is probably the right choice. Kubernetes shines when you have many microservices, multiple teams, need fine-grained resource control, or are running stateful workloads at scale.

Use Cases

Kubernetes is appropriate when you need:

Declarative vs Imperative

Kubernetes is fundamentally a declarative system. You describe the state you want the cluster to be in, and Kubernetes continuously reconciles actual state to match it. This is different from the imperative approach of issuing step-by-step commands.

ApproachHow it worksK8s example
Imperative Issue commands one at a time. If the system drifts, nothing corrects it automatically. kubectl run nginx --image=nginx:1.27
Declarative Write a manifest describing desired state. Kubernetes watches and reconciles continuously. kubectl apply -f deployment.yaml

In practice, you write YAML manifests and commit them to Git. kubectl apply sends the manifest to the API server, which computes the difference between current and desired state and makes the necessary changes. This is the foundation of GitOps — your Git repository becomes the source of truth for cluster state.

💡
Imperative commands still have their place

Quick one-offs like kubectl scale deployment myapp --replicas=5 or kubectl rollout undo deployment myapp are fine during incident response or local development. But anything that must be reproducible across environments, or survive beyond a single session, belongs in a manifest.

Step 1 Declare Write YAML manifest,
kubectl apply
Step 2 Observe K8s reads current
cluster state
Step 3 Diff Compare desired
vs actual state
Step 4 Act Apply smallest change
to reconcile gap
Kubernetes continuously reconciles actual state to your declared desired state

Kubernetes controllers run continuous reconciliation loops: they watch for drift between desired and actual state and correct it. This is why crashed pods get restarted, failed nodes have their workloads rescheduled, and scaled deployments converge — all without human intervention.