Home › Compare › Docker vs Kubernetes

Docker vs Kubernetes

From WikiTech, the encyclopedia of technology

A tool for building and running containers versus a system for orchestrating them across a cluster.

Overview

Docker and Kubernetes are often mentioned together but operate at different levels. Docker packages an application and its dependencies into a container image and runs that image as an isolated process on one machine. Kubernetes schedules and supervises many containers across a cluster of machines, restarting failed ones and scaling them with demand.

They are complements rather than competitors. A typical workflow builds an image with Docker or a compatible builder, pushes it to a registry, and describes how to run it in a Kubernetes manifest.

Side-by-side comparison

DockerKubernetes
ScopeBuilds and runs containers on a hostOrchestrates containers across a cluster
OrigindotCloud, 2013Google, 2014
Basic unitContainerPod (one or more containers)
ScalingSingle host; Docker Swarm for simple clustersBuilt-in horizontal scaling and self-healing
NetworkingBridge and host networks per machineCluster-wide Services and Ingress
ConfigurationDockerfile and Compose filesDeclarative YAML manifests
Written inGoGo

Choosing between them

A single server or a small project is usually well served by Docker or Docker Compose alone. Kubernetes starts to pay off when an application is split into many services, needs rolling updates, automatic recovery or running across several machines, accepting extra operational complexity in return.

Kubernetes does not require Docker itself: it runs any container runtime that implements its Container Runtime Interface, and images built with Docker run unchanged.

Read more

  • Docker: A platform for building, distributing and running applications in containers.
  • Kubernetes: An open-source system for automating deployment, scaling and management of containerised applications.