Why orchestration exists

Intermediate · 4 min

One container on one server is easy. Fifty across ten machines needs scheduling, restarts, rollouts and discovery. Orchestrators do that with reconcile loops.

Before thisWhat a container really isRegistries, tags and image provenanceDeployment strategies: rolling, blue-green and canary

TechWorld with Nana · 4 min

Why orchestration exists

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by TechWorld with NanaReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • Running containers across many machines raises the same questions every time: where each one runs, who restarts it, how to update without downtime, and how services find each other.
  • An orchestrator answers them from a declared desired state, such as three copies of this image, rather than from commands you run in sequence.
  • Controllers run a reconcile loop: observe what exists, compare it with what was declared, act to close the gap, and repeat forever.
  • Kubernetes splits into a control plane (API server, etcd, scheduler, controllers) that decides, and nodes (kubelet and a container runtime) that run containers.
  • An orchestrator is a large system to operate. One server with a few containers, or a managed platform, is often the better choice.

From one container to fifty

On one server, containers are easy. You docker run the notes API, wrap it in a systemd unit so it restarts, and put nginx in front. Many real products run happily like that for years.

Now grow it. The API needs eight copies, there is a worker service, a search service and a cache, and they run on ten machines because no single one is big enough. The questions arrive in a fixed order:

  • Placement. Which machine has enough free memory for the next copy?
  • Recovery. A container crashes at 3 a.m. Worse, a whole machine dies with four containers on it. Who starts replacements, and where?
  • Rollouts. How do you replace eight copies of version 1.4 with 1.5, a few at a time, stopping if the new ones fail their health checks? That is the rolling deployment from earlier, now done by machine.
  • Discovery. Copies come and go with new IP addresses. How does the worker find the API? That is service discovery.
  • Scaling. Traffic doubles at lunchtime. Who adds copies, and removes them later?

You can answer each one with a script. Teams that do end up with a homemade, lightly tested orchestrator. A container orchestrator is the off-the-shelf version.

Declare, then reconcile

The central idea is a change in how you give instructions. You stop issuing commands like “start three containers”. You declare a desired state: “there should be three copies of notes-api@sha256:…”. Then a controller runs a loop forever:

  1. Observe what actually exists.
  2. Compare it with what was declared.
  3. Act to close the difference.
  4. Repeat.

A thermostat works this way. You set 21 °C, not “run the heater for ten minutes”. It measures, compares and switches the heater, all day, and it copes with an open window without you.

I wrote a toy controller in Python to watch the loop happen on this Mac. It wants three copies of a small web server, checks once a second, and starts whatever is missing. While it ran, I found the copy on port 8102 with lsof and killed it with kill -9:

killing pid on :8102 -> 40598
t= 0.0s  observed 0 running, want 3
t= 0.0s  started replica on :8101 (pid 40597)
t= 0.0s  started replica on :8102 (pid 40598)
t= 0.0s  started replica on :8103 (pid 40599)
t= 3.0s  observed 2 running, want 3
t= 3.0s  started replica on :8102 (pid 40603)

(The first line is from my shell. The controller’s log was printed after I stopped it.) Nobody told the controller that a process had died. On its next pass it saw two, wanted three, and started one. That is the whole trick. A real orchestrator runs dozens of loops like this: one for copies, one for rollouts, one for nodes, one for endpoints, each small and each converging on what was declared.

What Kubernetes looks like

Kubernetes is the dominant orchestrator. The current stable release, from dl.k8s.io/release/stable.txt when I checked, is v1.37.3. Its parts split into deciding and doing.

The control plane decides:

  • API server: the front door. Every change, from you or from a controller, goes through it.
  • etcd: a consistent key-value store that holds the desired and observed state.
  • Scheduler: picks a node for each new pod based on free resources and constraints.
  • Controller manager: runs the built-in reconcile loops, such as “a Deployment wants 3 pods”.

Each node does:

  • kubelet: an agent that makes sure the containers assigned to its node are running and reports back.
  • Container runtime: containerd or CRI-O, which uses the namespaces and cgroups from what a container really is.
  • kube-proxy or an equivalent network plugin, which routes traffic for services.

Recovery from a dead machine follows directly. The node stops reporting, its pods are marked lost, the replica controller sees fewer pods than declared, and the scheduler places new ones elsewhere. The next lesson covers the objects you declare.

Do you need one?

Kubernetes is a distributed system that you operate: upgrades every few months, networking, storage, access control, its own failure modes. Other orchestrators exist, such as HashiCorp Nomad and Amazon ECS. Managed services, such as EKS, GKE and AKS, run the control plane for you. Platforms such as Cloud Run hide the cluster entirely. For a handful of services on one or two machines, Docker Compose under systemd is a perfectly respectable answer. Reach for an orchestrator when placement, recovery and rollouts across many machines are problems you actually have.

About the video

“Kubernetes Simply Explained” is from TechWorld with Nana, published September 2026, 4 minutes 13 seconds. Its description says it gives the problem first and the parts second, and it defines Kubernetes as a system for running containerized applications automatically across many servers. That framing is why it fits a lesson about why orchestration exists. It has no chapters, so I cannot say which components it names. English was judged from the title, description, channel and its English auto-caption track. IBM’s 2019 video in deeper covers the operations team’s view of orchestration in more depth.

Where this fits

You know why an orchestrator exists and how it thinks. Next, the objects you hand it: Kubernetes core objects.

Check yourself

  1. 01A node running two of your containers loses power. Without an orchestrator, what happens, and what changes with one?

    Without one, those containers stay down until a person notices and starts them elsewhere. An orchestrator sees fewer running copies than declared and schedules replacements on healthy nodes.

  2. 02What is the difference between telling a system run 3 containers and telling it there should be 3 containers?

    The first is a one-off command. Once it finishes, nothing notices if a container dies. The second is desired state that a controller keeps enforcing for as long as the declaration exists.

  3. 03Which Kubernetes component decides which node a new pod runs on?

    The scheduler. It picks a node with enough free resources that satisfies the pod's constraints, and the kubelet on that node starts the containers.

  4. 04When might you choose not to run Kubernetes?

    When you have a few services that fit on one or two machines, or a team too small to operate a cluster. Docker Compose with systemd, or a managed container service, gives most of the benefit with far less to run.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark