Kubernetes versus Docker: how they fit together
Docker and Kubernetes are often presented as rivals, but they work at different levels. Docker packages and runs containers on a machine; Kubernetes decides which machine runs which container and keeps them running.
What does Docker do?
It builds container images and runs them. An image bundles an application with its libraries and settings; a container is a running instance of that image, isolated from others with Linux namespaces and control groups. Docker provides the build tool, a local image store, networking and volumes, and the command line most developers learn first. Under the hood it uses containerd to run containers, the same runtime Kubernetes commonly uses.
What does Kubernetes do?
It orchestrates containers across a cluster of machines. You declare what should run, such as three replicas of an API, a database with a volume and a public route, and Kubernetes schedules pods onto nodes, restarts failed ones, replaces pods on failed nodes, rolls out new versions gradually and connects services by name. It does not build images; it pulls them from a registry and runs them through a container runtime.
| Question | Docker (with Compose) | Kubernetes |
|---|---|---|
| Scope | One host | Many hosts |
| Builds images | Yes | No |
| Restarts failed containers | Restart policies on the same host | Reschedules anywhere in the cluster |
| Rolling updates | Basic | Built in, with health checks |
| Learning curve | Gentle | Steep |
| Operational load | Low | Significant: control plane, upgrades, networking |
When is Docker Compose enough?
More often than people expect. A single powerful machine running Compose can host a web application, worker queues, a database and a cache with very little overhead. Restart policies bring containers back after crashes, and a reboot brings the whole stack up again. On a dedicated server with 16 cores and 128 GB DDR5, such as ESSENTIAL-L at $106.20 a month, that covers a lot of traffic.
services:
api:
image: registry.example.org/shop/api:2026.12.1
restart: unless-stopped
env_file: /srv/shop/api.env
ports:
- target: 8080
host_ip: 127.0.0.1
published: "9180"
depends_on: [db]
db:
image: postgres:17
restart: unless-stopped
volumes: ["/srv/shop/pg:/var/lib/postgresql/data"]
When does Kubernetes pay off?
When you run many services across several machines, need to survive a node failure without manual work, deploy many times a day with rolling updates, or give several teams a shared platform with quotas. Below that point, its control plane, networking and upgrade cycle cost more time than they save.
How do I run Kubernetes on dedicated servers?
Directly on the operating system, without a hypervisor. Lightweight distributions such as k3s and RKE2, or upstream kubeadm, install on Debian, Ubuntu or the EL family. Three machines make a highly available control plane that also runs workloads. Because we do not sell a private network, use a CNI plugin with built-in WireGuard encryption, such as Flannel's WireGuard backend or Cilium's transparent encryption, so pod traffic between nodes is encrypted over the public ports.
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --cluster-init --flannel-backend=wireguard-native --node-ip=10.44.0.1" sh -
Services that must be reachable from the internet need an ingress controller on each node and DNS pointing at the nodes' addresses, since we do not sell load balancers or failover IPs.
What about storage for stateful containers?
Use local NVMe volumes for databases that replicate at the application level, such as PostgreSQL with an operator, and a distributed storage layer such as Longhorn or Rook Ceph for general volumes that must follow pods between nodes. Our Software-defined storage page covers the latter.
How are images moved to the servers?
Through a registry. Build images in a pipeline, tag them with a version rather than only latest, and push them to a registry your servers can reach: a hosted one, or your own Harbor or the open-source Distribution registry on one of your machines. Sign images and scan them for known vulnerabilities before release. Pull secrets give each node read-only access. Pinning exact tags in Compose files and manifests means a node rebuilt next month runs the same code as today.
Which should I learn first?
Docker. Building images and running them with Compose teaches the concepts Kubernetes builds on, and many projects never need more. Containers or virtual machines compares containers with virtual machines, and Rancher and Kubernetes explains cluster management tools.
Machines for container hosts and cluster nodes
| Model | Processor | Cores | Memory | Drives | Port | Per month |
|---|---|---|---|---|---|---|
| ESSENTIAL-M | AMD Ryzen 9 9900X | 12 | 64 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $70.80 |
| ESSENTIAL-L | AMD Ryzen 9 9950X | 16 | 128 GB | 2x 960 GB SSD NVMe | 1 Gbps unmetered | $106.20 |
| ESSENTIAL-XL | AMD EPYC TURIN 9455 | 48 | 128 GB | 2x 1.92 TB SSD NVMe | 1 Gbps unmetered | $212.40 |
| BUSINESS-3 2026 | AMD EPYC 4465P | 12 | 64 GB | 2x 960 GB SSD NVMe | 3 Gbps unmetered | $184.20 |
| ENTERPRISE-a3 2026 | AMD EPYC TURIN 9355 | 32 | 128 GB | 2x 1.92 TB SSD NVMe | 5 Gbps unmetered | $481.80 |
Related pages
Containers or virtual machines
Containers share the host kernel; virtual machines bring their own. Isolation, density, start times and when to combine both on one dedicated server.
Read moreRancher and Kubernetes
Kubernetes is the orchestrator; Rancher manages many Kubernetes clusters. What each layer does, when a management plane helps, and running both on bare metal.
Read morePrivate cloud
Three node Proxmox and Ceph clusters on Enterprise hardware, linked over WireGuard, with guests that survive a host failure.
Read moreCI runners and build farms
High clock Ryzen and many-core EPYC machines for CI runners, container builds and compile farms that finish faster.
Read moreQuestions and answers
Is Kubernetes a replacement for Docker?
No. Docker builds and runs containers on one host; Kubernetes schedules and manages containers across many hosts.
Does Kubernetes still use Docker?
Kubernetes runs containers through a runtime such as containerd. Images built with Docker run on it unchanged.
When is Docker Compose enough?
For applications that fit on one machine and can tolerate a short outage during host maintenance.
Can I run Kubernetes on your dedicated servers?
Yes. Install k3s, RKE2 or kubeadm directly on the operating system and encrypt node traffic with a WireGuard-capable CNI.
How many servers does a highly available Kubernetes cluster need?
Three for the control plane, which can also run workloads on small clusters.