Docker vs. Kubernetes - 8 Industry Opinions

but can also be used with other container engines

Docker vs. Kubernetes - 8 Industry Opinions

Docker Swarm and Kubernetes are two popular choices for container orchestration. We collected 8 industry opinions on which orchestration tool is better and which is more useful for different use cases.

In this page: what the community is saying on Docker vs. Kubernetes

What is Kubernetes

Kubernetes is a container orchestration system, which can be used to manage large numbers of containers on top of physical infrastructure. Kubernetes was built by Google based on their experience running massive amount of containers in production.

It's important to understand that unlike the popular Docker Engine, Kubernetes is not a container engine. It is a system that helps you manage containers. Typically Kubernetes deployments use Docker as the underlying container engine, but can also be used with other container engines such as rkt.

The diagram below shows the Kubernetes architecture. In Kubernetes, the master node places container workloads in user pods, on worker nodes or on the master node itself. 

Additional Kubernetes components include:

  • etcd: Stores configuration data, for access by the Kubernetes Master’s API Server.
  • API Server: The management hub for the Kubernetes master node, allowing communication between other components.
  • Controller Manager: Scales workloads up and down to ensure the cluster reaches its desired state.
  • Scheduler: This component places the workload on the appropriate node – in this case all workloads will be placed locally on your host.
  • Kubelet: Receives pod specifications from the API Server and manages running pods.
  • Pods: Kubernetes deploys and schedules containers in groups called pods. All the containers in a single pod run on the same node, and share resources on the physical host.

Important Kubernetes concepts:

  • Deployments: Used to create and manage a group of pods. Kubernetes supports service deployments, which enable scaling across multiple nodes.
  • Services: Endpoints that can be connected to pods using label selectors. A service round-robins requests between pods. Services are the external point of contact for container workloads, accessible via an internal DNS server. 
  • Labels: Key-value pairs that can be used to find multiple objects within the Kubernetes cluster and update them in bulk.

What is Docker Swarm

Docker swarm mode allows you to manage a cluster of Docker Engines, natively within the Docker platform. You can use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior.

Note #1: When people compare Kubernetes to Docker, they typically mean to compare it to Docker Swarm, the container orchestration engine offered within the Docker platform. It is not accurate to compare Kubernetes to "docker", the Docker Container Engine, because they have different functions. Kubernetes or Docker Swarm work together with the Docker Container Engine - the former manage and orchestrate containers, and the Docker Engine runs the containers themselves.

Note #2: As of the time of this writing in late 2017, Docker announced it will support both Swarm and Kubernetes as orchestration engines. Some believe that with support for Kubernetes, Docker Swarm will become obsolete. Others say that Swarm will continue to be relevant, as a simpler orchestration tool which is suitable for organizations with smaller container workloads.

Swarm's capabilities include coordination between containers, allocating tasks to groups of containers, health checks and lifecycle management of containers, redundancy and failover, scaling containers up and down based on load, and rolling updates.

Docker Swarm components:

  • Swarm – a swarm consists of multiple Docker hosts which run in swarm mode and act as managers and workers.
  • Task – the swarm manager distributes a specific number of tasks among the nodes, based on the service scale you specify. A task carries a Docker container and the commands to run inside the container. Once a task is assigned to a node, it cannot move to another node. It can only run on the assigned node or fail.
  • Service – a service is the definition of the tasks to execute on the manager or worker nodes. When you create a service, you specify which container image to use and which commands to execute inside running containers. 
  • Nodes – a swarm node is an individual Docker Engine participating in the swarm. You can run one or more nodes on a single physical computer or cloud server, but production swarm deployments typically include Docker nodes distributed across multiple machines.
  • Manager nodes – dispatch units of work called tasks to worker nodes. Manager nodes also perform orchestration and cluster management functions.
  • Leader node – manager nodes elect a single leader to conduct orchestration tasks, using the Raft consensus algorithm.
  • Worker nodes – receive and execute tasks dispatched from manager nodes. By default manager nodes also run services as worker nodes. An agent runs on each worker node and reports on the tasks assigned to it to its manager node.
  • Load balancing – the swarm manager uses ingress load balancing to expose the services running on the Docker swarm, enabling external access. 

Comparing Mindshare

Mindshare MetricKubernetesDocker Swarm
Google Monthly Searches165,00033,100
Pages Indexed by Google Past Year1,190,000135,000
News Stories Past Year36,0003,610
Github Stars28,9884,863
Github Commits58,0293,493

These stats are correct as of November, 2017, and will be updated every few months

Technical Comparisons from the Community

Mesosphere: Docker Engine vs. Kubernetes vs. Mesos

  • Undated
  • Opinion by:
    Amr Abdelrazik, Director, Product Marketing, Mesosphere
  • What is covered:
    • Detailed architecture overview
    • What each solution was intended to solve
    • Recommends the right solution for different use cases
  • Insight:
    Each technology was designed for a different purpose. Docker provided a standard file format for encapsulating applications. Kubernetes helps orchestrate containers at large scale. Mesos is actually not an orchestrator, it is a cluster management platform that can run any workloads, including containers (using the Marathon project). Mesos is agnostic to infrastructure giving it higher portability. 
  • Bottom line:
    If you are a developer looking for way to build and package applications, Docker is the best solution. For a DevOps team wanting to build a system dedicated exclusively to Docker containers, Kubernetes is the best fit. For organizations running multiple mission critical workloads including Docker containers, legacy applications (e.g., Java), and distributed data services (e.g., Spark, Kafka, Cassandra, Elastic), Mesos is the best fit. 
  • Grain of salt:
    Mesosphere is the commercial supporter of the Mesos project.

Platform9: Kubernetes vs. Docker Swarm

  • Date:
    June 22, 2017
  • Opinion by: 
    Akshai Parthasarathy, Technical Product Marketing Manager, Platform9
  • What is covered:
    • Detailed architecture overview of both systems
    • Feature comparison: Application definition, scalability constructs, high availability, load balancing, auto-scaling for the application, rolling upgrades and rollback, health checks, storage, networking, service discovery, performance and scalability.
  • Bottom line:
    Kubernetes has over 80% of mindshare for news articles, Github popularity, and web searches, and is the default choice for users. However, there is consensus that Kubernetes is more complex to deploy and manage. The Kubernetes community has tried to mitigate this drawback by offering a variety of deployment options, including Minikube and kubeadm.
  • Grain of salt:
    Platform9 offers a managed Kubernetes service.

Rancher: Docker Swarm vs. Kubernetes White Paper

  • Undated
  • Opinion By: 
    Rancher Labs
  • What is covered:
    • Detailed overview of architecture and usage
    • Detailed feature descriptions: networking, storage, scheduling, service discovery, load balancing, scalability, performance
    • Comparison table covering installation, ease of use, concepts, best suited for, data volumes, secrets, scaling, and more
    • Considerations for application architects - passing credentials, cluster awareness, health checks
  • Insight: 
    The two platforms have very different constructs and architecture (nodes/tasks vs. pods), so the choice of orchestrator is not a reversible decision. Apps will have to be architected in a way that is tightly coupled with the orchestrator.
  • Bottom line:
    Achieving the same tasks is much more complex in Kubernetes vs. Swarm. But Kubernetes provides a lot of additional functionality like auto-scaling.
  • Grain of salt:
    Rancher is a platform for deploying both Kubernetes and Docker Swarm clusters.

Loom Systems: Kubernetes vs. Docker Swarm vs. Apache Mesos

  • Date:
    June 16, 2017
  • Opinion By: 
    Aviv Lichtigstein, Head of Product Evangelism, Loom Systems
  • What is covered:
    • Overview of key concepts and components in each system
    • Brief feature comparisons across the three systems: cluster installation, container deployment, minimum cluster size, scalability, maturity
    • How they compare with orchestration options from public cloud providers
  • Bottom line: 
    Docker Swarm is easier to use and more native to Docker, if you don't need bigger scale. Kubernetes is suitable for more complex setups, if you don't need to scale up to thousands of servers. Mesos/Marathon is for big players who need to scale to thousands of servers and/or need to set up scheduling constraints based on host, racks or any other specific variable.

Stratoscale - Kubernetes vs. Docker Swarm: An Architect's Perspective

  • Undated
  • Opinion by:
    Rotem Dafni, R&D at Stratoscale
  • What is covered:
    • History of container orchestration
    • Feature comparison with code samples: installation and operations, images update, separation of environments, secrets
    • Comparison of market interest and popularity
    • Availability on public clouds
  • Bottom line: 
    From an architect’s perspective, Swarm's advantage is that it is easy to create and deploy cluster for testing purposes. Kubernetes needs a more complex procedure to deploy. But Kubernetes has namespace separation, a great feature that provides one way to use the same cluster for production, staging and development, avoiding the need for test clusters. The market is heavily interested in Kubernetes, so a bigger community is available. 
  • Grain of salt:
    Stratoscale's product helps deploy Kubernetes on-prem and on AWS.

Kubernauts.io - Kubernetes vs. Mesos vs. Docker Swarm

  • Date:
    June 15, 2017
  • Opinion by: 
    Arash Kaffamanesh, independent blogger
  • What is covered:
    • Detailed requirements one should consider before selecting a container orchestrator
    • High level summary comparison table
    • Research on which Kubernetes versions are actually used in production
    • Container as a service options
  • Bottom line: 
    Apache Mesos supported by Mesosphere still has a strong place when it comes to big data and data analytics tools like Apache Spark. Docker Swarm is popular, but Kubernetes has the largest momentum as a default tool for managing containers at scale.

Business Commentaries

Forbes: Docker and Kubernetes, Friends or Foes?

  • Date:
    April 28, 2017
  • Opinion by:
    Mike Kavis, VP/Principal Architect for Cloud Technology Partners
  • The gist:
    While industry commentators talk about a battle between Docker and Kubernetes, in reality Docker is a wider platform and not just about containers. The orchestration tier is only one part of Docker's offering, and there is still a very big need for the platform, even if the orchestration layer were replaced with Kubernetes.
  • Bottom line:
    Kubernetes is an enabler for Docker, not a competitor. Docker's main interest is to have more Docker engines running, which will increase their support revenues. Support for Kubernetes and greater uptake of Kubernetes should only help with this goal.

The Register: Kubernetes has won. Docker Enterprise Edition will support rival container-wrangling tech

  • Date:
    October 17, 2017
  • Opinion by:
    Thomas Claburn, Journalist, former editor at InformationWeek
  • The gist:
    Both Docker and Mesos realized that mindshare behind Kubernetes is just too big and made a pragmatic decision to support Kubernetes, while not giving up on their native solutions, Swarm and Marathon.
  • Bottom line:
    Docker Swarm and Mesos/Marathon are good solutions, but analysts believe Kubernetes will eventually take over, and there is no room in the market for three orchestration platforms. 

Further Reading

For many more resources on using and managing Docker and Kubernetes, see the additional topics below.

Docker

Kubernetes

Help Make the Wiki Better!

The URL you want to suggest or report

New topic you suggest for the wiki

Your email address

 

  • No labels