Quick answer: Docker and Kubernetes are not really competitors. Docker builds and runs containers: it packages an application with everything it needs so it runs the same everywhere. Kubernetes orchestrates containers: it runs many of them across a cluster of machines, restarts them when they fail, scales them with demand and rolls out new versions. Most teams use Docker (or a compatible tool) to build images and run them locally, and only add Kubernetes when they need to run many services reliably across several servers. For a single application or a small team, Docker with Docker Compose, or a managed container service, is often enough.
This guide explains what each tool does, how they work together, the key differences, the alternatives in between, and how to decide what your project needs.
What is Docker?
Docker is a platform for building, sharing and running containers. A container is an isolated process that includes the application code, runtime, libraries and settings it needs, so it behaves the same on a laptop, a test server and production.
The main parts you will use:
- Dockerfile: a recipe that describes how to build an image.
- Image: the built, read-only package. Images follow the open OCI standard, so they run on other container runtimes too.
- Registry: where images are stored and shared, such as Docker Hub or your cloud provider’s registry.
- Docker Engine: the service that runs containers on a server.
- Docker Compose: a file that defines several containers that work together, such as an app, a database and a cache, and starts them with one command.
- Docker Desktop: the developer app for Windows and macOS.
One licensing point to know: according to Docker’s licence terms, Docker Desktop is free for personal use, education, non-commercial open source and small businesses with fewer than 250 employees and less than $10 million in annual revenue. Larger organisations need a paid subscription. Docker Engine on Linux servers is open source.
What is Kubernetes?
Kubernetes is an open-source platform for running containerised applications across a cluster of machines. You describe the state you want, such as “run three copies of this service and expose it on port 443”, and Kubernetes keeps the cluster in that state.
The core concepts:
- Cluster and nodes: a cluster is a group of machines (nodes) managed by a control plane.
- Pod: the smallest unit Kubernetes runs, usually one container, sometimes a few that must run together.
- Deployment: keeps a set number of pods running and rolls out new versions gradually, with rollback if something goes wrong.
- Service and Ingress: give pods a stable address and route outside traffic to them, with load balancing.
- ConfigMaps and Secrets: hold configuration and sensitive values outside the image.
- Autoscaling: adds or removes pods, and with the right setup nodes, based on load.
Kubernetes releases about three minor versions a year, and the project maintains the three most recent ones; at the time of writing those are 1.35 to 1.37, according to the Kubernetes releases page. Keeping clusters upgraded is part of running Kubernetes.
Free resource
Upgrade and patching checklist
Want this applied to your project? Our engineers will send it with notes for your stack.
How Docker and Kubernetes work together
A typical workflow is: developers build an image with Docker, push it to a registry, and Kubernetes pulls that image and runs it across the cluster. The two meet at the image, not at the runtime.
This causes a common confusion. Kubernetes once had a built-in bridge to Docker Engine called dockershim, and it was removed in Kubernetes 1.24. Clusters now use runtimes such as containerd or CRI-O instead. That did not stop Docker images working: the Kubernetes dockershim FAQ confirms that images built with docker build work with all of these runtimes. You can keep building with Docker and deploying to Kubernetes.
Docker vs Kubernetes: key differences
| Docker | Kubernetes | |
|---|---|---|
| Main job | Build, share and run containers | Run and manage many containers across a cluster |
| Scope | One machine (Compose for multi-container apps) | Many machines working as one cluster |
| Scaling | Manual, or basic with Docker Swarm | Automatic, based on load |
| Self-healing | Restart policies on one host | Replaces failed pods and reschedules them on healthy nodes |
| Rolling updates | Limited on its own | Built in, with rollback |
| Learning curve | Gentle | Steep |
| Running cost | Low | Higher: control plane, more nodes and the skills to run it |
| Best for | Local development, CI builds and simple deployments | Production systems with many services, high availability needs or variable traffic |
The fair comparison for orchestration is Kubernetes against Docker Swarm mode, Docker’s own clustering feature. Swarm is simpler to set up and uses familiar Compose-style files, but Kubernetes has a much larger ecosystem and is what most managed cloud services and tools are built around.
The options in between
Many teams do not need to choose between running Docker on one server and running their own Kubernetes cluster:
- Managed Kubernetes: Amazon EKS, Azure Kubernetes Service and Google Kubernetes Engine run the control plane for you. You still manage workloads, upgrades and configuration.
- Managed container services: AWS ECS and Fargate, Google Cloud Run and Azure Container Apps run your containers with scaling and load balancing, without Kubernetes to manage.
- Platform services: some hosting platforms deploy straight from a Dockerfile or a Git repository and handle the rest.
For many web applications and APIs, a managed container service gives most of the benefit of Kubernetes for a fraction of the operational work.
Container security basics
Neither Docker nor Kubernetes makes an application secure on its own. Containers share the host’s kernel, so isolation is weaker than between virtual machines, and a cluster adds its own settings to get right. The basics apply whichever you use:
- Start from small, official or trusted base images, and rebuild them regularly to pick up security fixes.
- Scan images for known vulnerabilities in your build pipeline.
- Run containers as a non-root user and give them only the permissions they need.
- Keep passwords and keys out of images; pass them in as secrets at run time.
- On Kubernetes, use role-based access control, network policies between services, and keep the cluster on a supported version.
Which do you need?
| Your situation | A sensible starting point |
|---|---|
| Consistent local development environments | Docker and Docker Compose |
| One web application or API with modest traffic | Docker on a server, or a managed container service |
| A handful of services and a small team | A managed container service such as ECS, Cloud Run or Container Apps |
| Many services, several teams, strict uptime or very variable traffic | Managed Kubernetes |
| Strict data rules or on-premises hosting | Self-managed Kubernetes, with the team to run it |
Kubernetes pays off when its automation saves more effort than it costs to run. If you are moving towards many independent services, our guide to web services vs microservices covers when that architecture is worth it, and DevOps as a service covers getting the delivery pipeline in place.
Frequently asked questions
Can I use Kubernetes without Docker?
Yes. Kubernetes nodes run containers with containerd or CRI-O, not Docker Engine. You can still build images with Docker, or with other tools such as Podman or Buildah, because they all produce standard OCI images.
Is Docker still relevant now that Kubernetes dropped dockershim?
Yes. Docker remains one of the most common ways to build images and run containers on developer machines and in CI pipelines. The change only affected which runtime Kubernetes uses on its nodes.
Is Docker Swarm a good alternative to Kubernetes?
For small clusters and teams that want simplicity, it can be. For larger systems, Kubernetes, or a managed container service, usually has better tooling, cloud support and hiring options.
Is Docker Desktop free?
For personal use, education, non-commercial open source and small businesses under 250 employees and $10 million in revenue, yes. Larger organisations need a paid Docker subscription to use Docker Desktop.
Do small applications need Kubernetes?
Usually not. A single server running Docker, or a managed container service, is simpler and cheaper. Consider Kubernetes when you run many services, need high availability across machines or have traffic that changes a lot.
Need help with containers or Kubernetes?
Vibidsoft containerises applications, sets up CI/CD pipelines and runs workloads on AWS and Azure, from simple Docker deployments to managed Kubernetes, as part of our cloud and DevOps services. We start with a fixed-price assessment from $1,500 that recommends the simplest set-up that meets your needs, with a written plan and cost. Builds and migrations are priced as fixed milestones, and live systems can go on a care plan from $1,500 a month. We never bill by the hour.
