# Docker vs Swarm vs Kubernetes, plain comparison

> Engine runs containers, Compose defines apps, Swarm and Kubernetes keep cluster desired state. No market-share claims.

Source: https://fullbytedeveloper.com/blog/docker-swarm-vs-kubernetes-plain
Published here: 2026-11-21, updated 2026-12-03

Docker Engine packages and runs containers. Docker Compose defines multi-container apps, usually on one node [4]. Swarm mode and Kubernetes are cluster orchestrators that keep a declared desired state across nodes [1][9]. Climb the ladder with docs, not market-share percentages. Builds on [what is a container](/blog/what-is-a-container), [why Docker was introduced](/blog/why-docker-was-introduced), and [how Docker works](/blog/how-docker-works-images-containers-layers).

## Quick start: init Swarm and list the node

Commands follow Docker's Swarm overview and stack-deploy tutorial family. Run them on a machine where you may reset local Swarm state [1][3].

```bash
docker swarm init
docker node ls
```

Captured on this host (Docker Engine 29.1.3). Node IDs change per init. Sandbox capture on the review host; re-run on your box before you treat the numbers as a lab result.

```text
Swarm initialized: current node (unl0wbq8vsyrps91auiietc9w) is now a manager.
ID                            HOSTNAME   STATUS    AVAILABILITY   MANAGER STATUS   ENGINE VERSION
unl0wbq8vsyrps91auiietc9w *   cursor     Ready     Active         Leader           29.1.3
```

You should see `Swarm initialized` and one Ready manager. That proves Swarm mode is present in current Engine; it does not deploy your app yet [1].

## Split the three jobs before you compare brands

| Job | Tool | What docs claim |
|---|---|---|
| Package / run | Docker Engine | Containers as runnable image instances |
| Define multi-container app | Compose | One YAML project; start/stop/rebuild lifecycle [4] |
| Orchestrate a cluster | Swarm mode or Kubernetes | Desired-state scheduling across nodes [1][9] |

Swarm mode overview: current Docker versions include Swarm mode for managing a cluster of Docker Engines. Do not confuse it with Classic Swarm, which is no longer actively developed [1]. Classic Swarm (and overlay networks using an external cluster store) were deprecated in Engine v20.10 and removed in v23.0 [6].

<figure>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 280" role="img" aria-label="Left to right ladder: Docker Engine runs containers, Compose defines the multi-container app, then Swarm mode or Kubernetes keeps desired state across nodes, with footnotes on stack deploy legacy Compose v3 and Classic Swarm removal.">
  <defs>
    <marker id="swarmK8sArrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
      <path d="M0,0 L8,3 L0,6 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="720" height="280" rx="12" fill="#0b1f3a"/>
  <text x="24" y="36" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="16" font-weight="700">package, define, then orchestrate</text>
  <rect x="24" y="56" width="180" height="100" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="40" y="96" fill="#14b8a6" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Docker Engine</text>
  <text x="40" y="124" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">run containers</text>
  <path d="M204 106 H248" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#swarmK8sArrow)"/>
  <rect x="256" y="56" width="180" height="100" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="272" y="96" fill="#14b8a6" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Compose</text>
  <text x="272" y="124" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">define the app [4]</text>
  <path d="M436 106 H480" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#swarmK8sArrow)"/>
  <rect x="488" y="56" width="208" height="100" rx="8" fill="#123052" stroke="#f59e0b" stroke-width="2"/>
  <text x="504" y="88" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Swarm mode</text>
  <text x="504" y="116" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">or Kubernetes</text>
  <text x="504" y="140" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">desired state [1][9]</text>
  <rect x="24" y="180" width="672" height="72" rx="8" fill="#123052" stroke="#64748b" stroke-width="2"/>
  <text x="40" y="212" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">stack deploy uses legacy Compose v3; Compose Bridge aims at Kubernetes manifests [3][5]</text>
  <text x="40" y="236" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Classic Swarm is gone; Swarm mode remains in Engine [1][6]</text>
</svg>
</figure>

*Left to right: Docker Engine runs containers, Compose defines the multi-container app, then Swarm mode or Kubernetes keeps desired state across nodes. Footnotes call out stack deploy on legacy Compose v3 and Classic Swarm removal while Swarm mode stays in Engine.*

## Read Swarm mode as still present, with slowed SwarmKit investment

Docker's Swarm overview still documents integrated cluster management, declarative services, scaling, desired-state reconciliation, overlay networking, service discovery, load balancing, mutual TLS between nodes, and rolling updates [1][2]. Engine 29.x notes still ship Swarm-related networking fixes [8].

Docker's retired / open-source notes: SwarmKit powers Swarm mode; "While Swarm mode remains functional, development has slowed in favor of Kubernetes-based solutions" [7]. That is a roadmap honesty note, not a claim that Swarm mode was removed.

## Deploy a tiny stack, then tear it down

Per the stack-deploy tutorial, even when Engine is in swarm mode, `docker compose up` still schedules all containers on the current node; use `docker stack deploy` for multi-node placement [3]. Docs also note that `docker stack deploy` accepts legacy Compose file version 3 only; the latest Compose Specification format is not compatible with that command [3].

Example compose file used for the capture below:

```yaml title="compose.yaml"
services:
  web:
    image: nginx:alpine
    ports:
      - "8080:80"
```

```bash
docker stack deploy --compose-file compose.yaml stackdemo
docker stack services stackdemo
```

Captured shape on this host after `docker pull nginx:alpine` (replica count can sit at `0/1` until the task settles):

```text
Creating network stackdemo_default
Creating service stackdemo_web
ID             NAME            MODE         REPLICAS   IMAGE          PORTS
hyqw4hary6pm   stackdemo_web   replicated   0/1        nginx:alpine   *:8080->80/tcp
```

You should see a `stackdemo_web` service listed when the compose file and image are valid [3]. Teardown from the same tutorial family:

```bash
docker stack rm stackdemo
docker swarm leave --force
```

Captured leave line:

```text
Node left the swarm.
```

## Compare Kubernetes on documented axes only

Kubernetes is a portable, extensible open-source platform for managing containerized workloads with declarative configuration and automation, with a large ecosystem [9]. It provides service discovery and load balancing, storage orchestration, rollouts/rollbacks, bin packing, self-healing, secrets and config, batch execution, horizontal scaling, dual-stack networking, and explicit extensibility [9]. Control plane pieces include kube-apiserver, etcd, kube-scheduler, and controllers; nodes run kubelet and a container runtime [10].

Kubernetes docs also say what it is not: not a traditional all-inclusive PaaS, not a source-to-image builder, not a bundled database product, and not a mandate for one logging stack [9].

Fair axes without invented adoption numbers:

- Control-plane surface: Swarm managers built into Engine [2] vs Kubernetes apiserver/etcd/scheduler/controllers [10].
- Schedule scope: Compose on one node vs Swarm tasks / Kubernetes Pods across workers [3][9].
- Extensibility: Swarm integrated Engine features vs Kubernetes addons and CRDs [1][9].
- Path from Compose: `docker stack deploy` (legacy v3) [3] vs Compose Bridge to Kubernetes manifests and Kustomize [5].

Company blogs (for example GitHub Engineering's 2017 Kubernetes migration) show Kubernetes at scale narratives; they are not Swarm status updates [11]. Primary Docker and Kubernetes docs still win for definitions.

## Use Compose Bridge when the destination is Kubernetes

Compose Bridge converts Compose configuration into platform-specific formats; the default path produces Kubernetes manifests and a Kustomize overlay aimed at Desktop Kubernetes [5]. Follow the "Use Compose Bridge" guide for flags rather than inventing them here [5]. Desktop Kubernetes is a development path, not proof that your production cluster is ready.

## Mistakes that mix the ladder rungs

Saying "Docker Swarm is deprecated" when you mean Classic Swarm: Swarm mode remains documented in Engine; Classic Swarm was removed [1][6][7].

Expecting `docker compose up` to place tasks across a multi-node swarm: docs warn it stays on the current node; use `docker stack deploy` [3].

Feeding the newest Compose Specification into `docker stack deploy`: docs limit that command to legacy Compose file version 3 [3].

Calling Kubernetes a full PaaS that ships your database and logging stack by default: the overview page denies that framing [9].

Inventing market-share percentages to settle Swarm versus Kubernetes: use the documented axes above instead [1][9].

## Depth: desired state is the shared idea

Swarm services and Kubernetes controllers both chase a declared desired state [1][9]. The difference that matters in a hiring or platform review is control-plane surface and extensibility, not a slogan. If your team already lives in Engine and needs a small cluster with stack deploy, Swarm mode is still a documented path [1][3]. If you need CRDs, a large addon ecosystem, and the Kubernetes API, start from the Kubernetes overview and components pages [9][10].

When you only need image versus container vocabulary, stay on [what is a container](/blog/what-is-a-container) and [how Docker works](/blog/how-docker-works-images-containers-layers). This page starts after that packaging story.

## Interview answer that stays honest

"Is Swarm dead?" is a common whiteboard trap. The honest short answer: Classic Swarm is gone; Swarm mode remains built into Docker Engine; SwarmKit investment has slowed while the mode stays functional [1][6][7]. "Should we use Kubernetes?" is a different question. Answer it with workload size, need for CRDs and addons, and who will run the control plane, not with a viral market-share slide [9][10].

A second trap: treating Compose as an orchestrator. Compose defines and runs a project, usually on one node [4]. Orchestration across nodes is Swarm mode or Kubernetes [1][9]. Keep those three nouns separate in the design doc and the resume bullet.

## Related reading

[What is a container](/blog/what-is-a-container), [how Docker works (images, containers, layers)](/blog/how-docker-works-images-containers-layers), [why Docker was introduced](/blog/why-docker-was-introduced).

Classic Swarm is gone; Swarm mode remains in Engine. Answer interview traps with those two nouns, not with a market-share slide.

Browse the [Dev explainers topic](https://fullbytedeveloper.com/blog/topic/dev-explainers).

Send this to the friend who still mixes Docker, Swarm, and Kubernetes into one word.

Image: A modest engine cube in front of two cluster diagrams: on the left a simple teal ring of identical container cubes around a coordinator sphere, and on the right a taller amber control-plane of layered hex planes guiding many small pod cubes, with no logos or typography.
https://fullbytedeveloper.com/media/docker-swarm-vs-kubernetes-plain/docker-swarm-vs-kubernetes-plain-venice.webp
The engine runs one box. A cluster manager keeps a desired state across many.

## Sources

1. [Docker Docs: Swarm mode overview, accessed 2026-11-20](https://docs.docker.com/engine/swarm/)
2. [Docker Docs: Swarm key concepts, accessed 2026-11-20](https://docs.docker.com/engine/swarm/key-concepts/)
3. [Docker Docs: Deploy a stack to a swarm, accessed 2026-11-20](https://docs.docker.com/engine/swarm/stack-deploy/)
4. [Docker Docs: Compose overview, accessed 2026-11-20](https://docs.docker.com/compose/)
5. [Docker Docs: Compose Bridge, accessed 2026-11-20](https://docs.docker.com/compose/bridge/)
6. [Docker Docs: Engine deprecated features, accessed 2026-11-20](https://docs.docker.com/engine/deprecated/)
7. [Docker Docs: Retired products (SwarmKit note), accessed 2026-11-20](https://docs.docker.com/retired/)
8. [Docker Engine 29 release notes, accessed 2026-11-20](https://docs.docker.com/engine/release-notes/29/)
9. [Kubernetes docs: Overview, accessed 2026-11-20](https://kubernetes.io/docs/concepts/overview/)
10. [Kubernetes docs: Cluster components, accessed 2026-11-20](https://kubernetes.io/docs/concepts/overview/components/)
11. [GitHub Engineering: Kubernetes at GitHub (2017), related reading](https://github.blog/2017-08-16-kubernetes-at-github/)
