Foundations · What Is Kubernetes, and Why

What Is Kubernetes, and Why

Kubernetes is an open-source system for running containerized applications across a fleet of machines and keeping them running the way you asked, even as individual servers fail, traffic shifts, and new versions roll out underneath everything. It exists because containers solved one problem — packaging an application so it starts fast and runs identically everywhere — while creating another: once you have hundreds of containers spread across dozens of hosts, something has to decide which host runs which container, restart the ones that crash, route traffic only to the ones that are healthy, and roll out changes without an outage. This page traces where Kubernetes came from — over a decade of Google running everything on internal systems called Borg and Omega — the single idea, declarative desired state, that makes it behave the way it does, and why, out of a genuinely crowded field of competitors, it is the one every major cloud now ships as a first-class product.

☺ Explain it like I'm 10

Imagine you run a school district that always needs exactly twelve buses out on the road, spread across four routes, no matter what. The old way: you personally watch every bus, and when one breaks down on Route 3 you scramble to find a spare, drive it there yourself, and hope you noticed before the stop filled up with waiting kids. The Kubernetes way: you write down the rule once — "twelve buses, three per route, replace any that stop moving" — and hand it to a dispatcher who never sleeps. The dispatcher checks every few seconds, notices the moment a bus goes quiet, and sends a spare without you lifting a finger. You didn't drive a single bus. You wrote down what "correct" looks like, and something else kept making it true.

🦉Your host for this topic: Professor Owl — the architect who insists on teaching the control-plane mental model before anyone touches a line of YAML, and this page is nothing but mental model.

The problem containers create once you have more than a few

☺ Like you're 10: One container on your laptop is easy to babysit by hand. A few hundred spread across dozens of machines is not — something has to decide where they run and notice when they die, without you watching every one of them.

Containers — covered in depth in DevOps's containers & orchestration lesson if you want the packaging story from the start — solve how an application starts and what it carries with it. They say nothing about where it runs or what happens when it stops running unexpectedly. The moment you have more containers than fit on one host, or more than one person can babysit by hand, five questions become unavoidable and have to be answered by something, continuously: which machine has room for this container right now? What happens to traffic pointed at a container that just crashed? How do you roll out v2 without dropping requests mid-swap? How does one container find another it depends on, when either might move hosts at any moment? Where do secrets and configuration live so they aren't baked into the image?

Kubernetes' job description is right there in the word "orchestration." An orchestra doesn't need a conductor to make an individual instrument produce sound — that's the player's job, and in this analogy it's the container runtime's job (containerd, under the hood). It needs a conductor to decide who plays when, at what volume, and what happens the instant one musician skips a bar. Kubernetes is that conductor for containers: it decides placement (the scheduler), watches for failures and replaces what died (the kubelet plus controllers), gives every group of containers one stable address to be reached at (a Service), and rolls updates out gradually while watching for regressions (a Deployment's rolling-update strategy). None of that is optional once you're past a handful of containers — it's just a question of whether you build it yourself, badly, or adopt something that already has.

Where it came from: two decades of Google solving this internally first

☺ Like you're 10: Google didn't invent this problem for Kubernetes — they'd already been running nearly every one of their own services this way, on private systems called Borg and Omega, for more than a decade before Kubernetes ever became public.

Long before Kubernetes existed, Google had to solve the exact orchestration problem above at a scale almost nobody else operated at: hundreds of thousands of machines running search, Gmail, ads, and everything else, often on the same shared clusters. Their answer, running in production since the early 2000s, was an internal system called Borg — a central scheduler and cluster manager, publicly documented only in 2015 in the paper "Large-Scale Cluster Management at Google with Borg." Borg introduced, and battle-tested, most of the vocabulary Kubernetes still uses today: jobs made of tasks, priority and preemption, resource quotas, and a declarative configuration language rather than an imperative deploy script.

A 2013 paper described Omega, Google's next attempt — a redesign meant to fix Borg's biggest weakness, a single monolithic scheduler that became a bottleneck as the fleet grew, by moving toward a more decentralized, optimistic-concurrency approach where multiple schedulers could work against shared cluster state at once. Omega mostly never shipped as a replacement for Borg internally, but its ideas — not its code — fed directly into what came next.

In 2014, a small team at Google (Joe Beda, Brendan Burns, and Craig McLuckie are usually credited as its co-founders) open-sourced a brand-new system, written from scratch in Go rather than reusing Borg's C++ codebase, explicitly designed to run on any infrastructure — not just Google's own datacenters. It reached v1.0 in July 2015, the same moment Google donated it to help launch the newly formed Cloud Native Computing Foundation (CNCF) under the Linux Foundation — handing governance to a vendor-neutral body instead of keeping it a Google product. Kubernetes became the CNCF's first project to reach Graduated status, in March 2018. The name comes from the Greek κυβερνήτης (kybernḗtēs), "helmsman" — the same root as "governor" and "cybernetics" — which is why the project's logo is a seven-spoked ship's wheel, and why the community-standard abbreviation "K8s" simply counts the eight letters it replaces.

Borg since ~2003 Google-internal cluster manager Omega 2013 paper decentralized scheduling ideas Kubernetes 2014 open-sourced, rewritten in Go v1.0 + CNCF July 2015 founding donation, vendor-neutral Graduated 2018 CNCF's first — the standard since Two internal Google systems, one public rewrite, one neutral foundation.

The one idea that explains almost everything else: declarative desired state

☺ Like you're 10: You don't tell Kubernetes the exact steps to fix a broken container — you tell it what "fixed" looks like, once, and something inside the cluster keeps checking and re-fixing it forever.

Most operations tooling before Kubernetes was imperative: you wrote the steps, in order, to get from here to there, and ran them by hand or on a schedule. Keeping three copies of a web server running with a script looks something like this — and it only handles the failure case you thought to write:

# imperative: you own every step, forever
while true; do
  for n in 1 2 3; do
    if ! docker inspect -f '{{.State.Running}}' "web-$n" 2>/dev/null | grep -q true; then
      docker run -d --name "web-$n" myapp:v3
    fi
  done
  sleep 5
done

Kubernetes is declarative instead: you submit a description of the end state you want, and the system's own machinery is responsible for reaching and then continuously maintaining it — including failure cases you never wrote code for, like the entire host disappearing.

# declarative: you own the description, not the steps
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
        - name: web
          image: myapp:v3

kubectl apply -f deployment.yaml doesn't run those three replicas itself — it hands the description to the API server, which durably records it in etcd as desired state. From there, a controller does nothing but watch: compare desired state (three replicas) against actual state (however many are really running right now), and take the smallest action that closes the gap. Lose a node, and the gap reappears on its own; the controller notices on its very next pass and reschedules a replacement, with nobody paging anyone. This is the exact mechanism the object model page and the API & controller pattern page go on to formalize, and it's the same reconciliation idea platform engineering pushes one level further out, to Git, in PE's deep dive on Kubernetes as the platform substrate.

The reconciliation loop You declare intent kubectl apply -f deploy.yaml API server + etcd store desired state Controllers compare desired vs. actual state Cluster: actual state pods scheduled, restarted, updated watch → diff → act — every few seconds, forever
◆ Key idea

Every native Kubernetes object — Pods, Deployments, Services, Jobs, StatefulSets — is the same pattern wearing a different label: a desired-state record plus a controller whose only job is closing the gap between that record and reality. Learn to see that one pattern and the rest of the API stops looking like an arbitrary pile of nouns; it starts looking like forty variations on a single loop.

Why Kubernetes, out of a genuinely crowded field

☺ Like you're 10: Around 2014–2017 there were three serious contenders for "the" way to orchestrate containers — Kubernetes wasn't the obvious winner going in, and by 2017 the other two had mostly conceded.

Kubernetes didn't win by default. Docker Swarm, built directly into the Docker Engine, was genuinely the easiest of the three to start with — but its scheduling and extensibility were thin next to what large, complex deployments needed. Apache Mesos, paired with the Marathon framework, was already proven at enormous scale at companies like Twitter and Airbnb — but it was a general-purpose resource manager first, container orchestrator second, with more moving parts to operate than most teams wanted to take on. The period roughly 2014 through 2017 is often called the "orchestration wars," and Kubernetes came out of it as the clear default for a handful of concrete reasons, not just momentum:

See the CNCF project landscape for how Kubernetes' huge surrounding ecosystem — Prometheus, Helm, Argo, and dozens more — fits together, and multi-cluster & fleet management for what running more than one cluster of it actually looks like in practice.

What Kubernetes is not

☺ Like you're 10: Kubernetes runs containers reliably — it doesn't, by itself, give you a URL, a database, a CI pipeline, or good security, which is exactly why a whole ecosystem exists around it.

Kubernetes ships scheduling, self-healing, service discovery, and rollout primitives. It is not, by itself, a Platform-as-a-Service. A fresh cluster has no default ingress controller routing external traffic in, no CI/CD pipeline building or deploying anything, and no network policy restricting who can talk to whom — teams still choose and operate an ingress controller, a CNI plugin, an observability stack, and an RBAC and admission-control policy on top, each covered in its own deep-dive page later in this course. Nor is it a default choice for every team: running Kubernetes yourself carries real, ongoing operational weight — etcd backups, control-plane upgrades, node lifecycle — that a small application with steady, modest traffic frequently doesn't need at all.

⚠ Watch out

The most common real-world mistake with Kubernetes isn't misusing one of its features — it's reaching for Kubernetes at all, for a workload that would run for months on a single managed container service with a fraction of the operational surface. See anti-patterns & pitfalls for that exact failure mode, and best practices & the operating model for when the overhead genuinely earns its keep.

This course follows Kubernetes through the CNCF's own certification ladder, starting at the associate level with KCNA and KCSA and moving up through the professional and specialist tiers — CKA, CKAD, and CKS — beginning at Kubernetes Certifications. If you're chasing the full Kubestronaut or Golden Kubestronaut track, the other nine CNCF certifications plus the Linux Foundation's LFCS live in the sibling Golden Astronaut course — this course does not duplicate that material, only points to it.

✎ Try it

If you already have Docker installed, run docker run -d --name demo nginx, then docker kill demo, and time how long it takes you to notice and manually bring it back. That gap — the seconds or minutes between failure and you noticing — is exactly the manual labor Kubernetes's reconciliation loop replaces at any scale beyond "few enough to babysit."

🦉 Owl's-eye view

"Every new hire I've ever walked through this wants to start with kubectl and YAML, and I understand why — it's the part that feels like doing something. But I always make them sit through this page first, because the reconciliation loop isn't one Kubernetes feature among many; it's the only feature, applied to about forty different nouns. Skip this page and you'll spend six months memorizing what a Deployment does, what a StatefulSet does, what a Job does, as forty unrelated facts. Sit through it once, and you'll spend those same six months noticing they're all the same fact wearing different clothes."

🎬 At the Pod Squad
🦉

Professor Owl: Every question this whole course answers eventually boils down to one sentence: you declare what you want, and something keeps making it true.

👺

Gizmo: Sounds like a lot of ceremony for what a cron job and a Bash while-loop already do.

🦉

Professor Owl: A while-loop restarts one container on one machine you're already watching. Tell me how it reschedules a pod onto a healthy node the moment a whole machine dies — without you writing that code yourself, tonight, at 2 a.m.

🦊

Foxy: So it's basically Borg's brain, minus twelve years of Google-only baggage?

🦉

Professor Owl: Almost exactly. Same lineage, rewritten from scratch so it doesn't assume you're Google.

🐢

Timmy: And minus the twelve years of internal trust boundaries Google already had built around Borg — which is exactly why RBAC and admission control aren't optional extras once this is running anything real.

🦫

Benny: Fine, I'll bite. When do I get to actually write a Deployment manifest?

🦉

Professor Owl: Next page.

🐢 Timmy's checkpoint

1. What specific problems does an orchestrator solve that a container runtime alone does not? 2. Name the two internal Google systems that preceded Kubernetes, and what changed about the codebase when Kubernetes was created in 2014. 3. In your own words, explain "declarative desired state" and how it differs from an imperative restart script. 4. Name two of Kubernetes' major orchestration-era competitors and one concrete reason Kubernetes pulled ahead of both. 5. Give one concrete example of something a fresh Kubernetes cluster does NOT provide out of the box.

Check your answers
  1. Deciding which host runs which container (scheduling), restarting or replacing containers that crash (self-healing), giving a moving group of containers one stable address (service discovery), and rolling out changes without dropping traffic (controlled rollouts) — none of which a container runtime like containerd handles on its own.
  2. Borg (Google's original internal cluster manager, running since roughly 2003) and Omega (a 2013 redesign focused on decentralized scheduling). Kubernetes, created in 2014, was written from scratch in Go rather than reusing Borg's C++ codebase, and was designed to run on any infrastructure, not just Google's own datacenters.
  3. Declarative desired state means describing the end state you want once — "three replicas of this container" — and letting a controller continuously reconcile reality toward it, including failures you never anticipated. An imperative script only handles the exact failure cases you thought to write code for, and stops working the moment reality deviates from what the script author imagined.
  4. Docker Swarm and Apache Mesos (with Marathon). Any of: CNCF's vendor-neutral governance avoided any single company controlling the roadmap; an extensible API (CRDs, admission webhooks) let it become a platform for platforms; competitors like Docker Enterprise and Mesosphere's DC/OS eventually added native Kubernetes support themselves; every major cloud now offers a managed, portable control plane (EKS, GKE, AKS) built on the same API.
  5. Any of: a default ingress controller for external traffic, a CI/CD pipeline, enforced network policy between services, or a managed database — a fresh cluster provides scheduling, self-healing, service discovery, and rollout primitives, not a full platform.