TL;DR
Docker packages and runs single containers; Kubernetes orchestrates containers at scale. They are complementary: Kubernetes schedules containers, which are usually run by containerd rather than the Docker engine.
Key Points
- Docker: images + containers + Dockerfile; solves "it works on my machine" portability.
- Kubernetes: scheduling, scaling, self-healing, service discovery, rolling updates, config and storage management.
- Relationship: K8s talks to a CRI runtime (default containerd) running OCI images; Docker-built images work directly on K8s.
- When you need K8s: multi-service production systems needing replicas, autoscaling, and self-healing. For small single-machine projects, Docker Compose is enough.
Common Misconceptions
- "K8s replaces Docker" is wrong — they solve different layers.
- "K8s is always better" is wrong — operational cost is high; small projects get slower, not faster.
Sources
- docs.docker.com
- kubernetes.io official docs
- OCI specifications