Bookmarks

Container orchestration

Automatic management of containers across a cluster of machines: a scheduler places them, the system monitors their state, scales and updates them without manual work.

Also: container orchestration, cluster orchestration, container orchestrator

checked 9 Nov

All terms

On its own, a container lives on a single machine: if that machine fails, the container disappears with it, and starting it on another machine is a separate job. When there are dozens of containers spread across dozens of machines, watching over each one by hand is no longer workable — this is the job the orchestrator takes over.

What an orchestrator does

TaskWhat the system does
Schedulingdecides which node to place each container on, taking into account free CPU and memory, service requirements and availability zones
Self-healingrestarts failed containers and moves them off dead nodes; the count is kept against the declared number of replicas
Scalingadds and removes replicas according to load or to a set number
Updatesrolls out a new version in stages, with health checks; a failed release is rolled back
Networking and discoveryassigns addresses to containers, maintains internal names and balances traffic between replicas
Everything elsesecrets and configuration, storage, resource limits

Kubernetes, Nomad and Docker Swarm

There are several orchestrators, and they differ in design. Kubernetes is the most widespread: it is developed under the CNCF, its configuration is declared in YAML manifests, and a large ecosystem of tools has grown around it. Google open-sourced the project in 2014; by origin it goes back to Borg, Google’s internal cluster management system. Nomad from HashiCorp is a single binary that handles not only containers but also plain processes and other workloads. Docker Swarm is built right into the Docker engine and is driven by ordinary docker commands, though it is more modest in capabilities.

SystemWho maintains itWhat it is known for
KubernetesCNCF; the project was open-sourced by Google in 2014the de facto standard: a declarative model, autoscaling, a wealth of extensions and tools
NomadHashiCorpa single binary with no external services, a single scheduler for containers, processes and other workloads
Docker SwarmDockerswarm mode inside Docker Engine: the docker swarm and docker service commands

Example: a Kubernetes manifest specifies replicas: 3 — three replicas of the service. The node hosting one of them dies: the controller notices that only two replicas are left and starts a third on another node — with no human involvement. This self-healing is a direct consequence of the declarative model: the system simply brings the state back to what was declared. Change the entry to replicas: 6, and three more replicas will come up.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • IaCInfrastructure as Code

    IaC describes and creates the infrastructure itself — machines, networks, load balancers; the orchestrator places containers on those machines and looks after them.

  • microservices

    Microservices are a style of application architecture; orchestration is how such an application is run. It is microservices that are most often run in an orchestrator.

In depth in the references

where the topic is covered in detail