Container orchestration is a fast-evolving technology, dominated by three industry giants: Kubernetes, Docker Swarm, and Apache Mesos. They fall into the category of DevOps infrastructure management tools, known as ‘Container Orchestration Engines’.
Docker Swarm has won over a large customer base, becoming the leading choice in containerization, with Kubernetes and Mesos being the leading competitors.
This article compares the added value that Kubernetes and Mesos offer in container orchestration.
Drawbacks of Docker Swarm
Despite the popularity of Docker Swarm, it has some drawbacks and limited functionalities:
- Platform dependency.
- No efficient storage options.
- Limited fault tolerance.
- Inadequate monitoring.
These drawbacks provoke businesses to question: ‘How to choose the right container management and orchestration tool?’ Many companies are now choosing an alternative to Docker Swarm. This is where Kubernetes and Mesos come in. To examine this choice systematically, it’s essential to look at the core competencies of both options, so one can come to an independently informed conclusion.
Note: We also recommend you read our comparison article Docker Swarm vs Kubernetes.
Characteristics of Docker Swarm, Kubernetes, and Mesos
| Characteristics | Docker Swarm | Kubernetes | Mesos/Marathon |
| Initial Release Date | Mar 2013, Stable release July 2019 | July 2015, v1.16 in Sept 2019 | July 2016, Stable release August 2019 |
| Deployment | YAML based | YAML based | Unique format |
| Stability | Comparatively new and constantly evolving | Quite mature and stable with continuous updates | Mature |
| Design Philosophy | Docker-based | Pod-based resource-groupings | Cgroups and control groups based in Linux |
| Images Supported | Docker-image format | Supports Docker and rkt, limitedly | Supports mostly Docker |
| Learning Curve | Easy | Steep | Steep |


What Is Kubernetes?
First released in June of 2014, Kubernetes was also known as k8s. It is a container orchestration platform by Google for Cloud-native computing. In terms of features, Kubernetes is one of the most natively integrated options available. It also has a large community behind it. Google utilizes Kubernetes for its Container as a Service offering, now known as the Google Container Engine. Other platforms that have extended support to Kubernetes include Microsoft Azure and Red Hat OpenShift. It also supports Docker and uses a YAML-based deployment model.
Constructed on a modular API core, the architecture of Kubernetes allows vendors to integrate systems around its proprietary technology. It does a great job of empowering application developers with a powerful tool for Docker container orchestration and open-source projects.
What is Apache Mesos?
Apache Mesos’ roots go back to 2009 when Ph.D. students first developed it at UC Berkley. Compared to Kubernetes and Docker Swarm, it adopts a more distributed approach to managing datacenter and cloud resources.
It takes a modular approach when dealing with container management. It provides users with flexibility in the types and scalability of applications they can run. Mesos allows other container management frameworks to run on top of it. This includes Kubernetes, Apache Aurora, Mesosphere Marathon, and Chronos.
Mesos was created to solve a variety of challenges:
- To abstract data center resources into a single pool.
- To collocate diverse workloads and automate day-two operations.
- To provide evergreen extensibility to running tasks and new applications.
It has a unique ability to manage a diverse set of workloads individually, including application groups such as Java, stateless microservices, and other similar technologies.
Container Management: Explained
Before selecting a container management tool, it is essential to understand the concept of Container Management in more detail.
Container Management is the process of adding, organizing, and replacing large numbers of software containers. It utilizes software for automatically creating, deploying, and scaling containers. Container management requires a platform to organize software containers, known as operating-system-level virtualizations. This platform optimizes efficiency and streamlines container delivery, eliminating the need for complex interdependent system architectures.
Containers have become quite popular, as more enterprises are using DevOps for quicker development and for its applications. Container management gives rise to the need for container orchestration, which is a more specialized tool. It automates deployment, management, networking, scaling, and availability of container-based applications.
Container Orchestration: Explained
Container Orchestration refers to the automated process of managing and scheduling individual containers used in microservices-based applications across multiple clusters. It works with both Kubernetes and Mesos. It also schedules the deployment of containers into the clusters, determining the best host for the container.
Some of the reasons why a container orchestration framework is required include;
- Configuring and scheduling containers
- Container Configuration
- Container Availability
- Container Provisioning and Deployment
- Health monitoring of containers
- Scaling applications of containers for load balancing
- Securing interactions between containers
How to Select Container Management and Orchestration Tool
There are many variables to consider when deciding on how to implement container management and orchestration efficiently. The final selection will depend on the specific requirements of the user. Some of which are briefly explained below.
- CNI Networking: A good tool should allow trivial network connectivity between services. This is to avoid developers having to spend time on special-purpose codes for finding dependencies.
- Simplicity: The tool in use should be as simple to implement as possible.
- Active Development: The tool chosen should have a development team that provides users with regular updates. This is due to the ever-evolving nature of container orchestration.
- Cloud Vendor: The tool chosen should not be tied to any single cloud provider.
Note: Container orchestration is just one example of a workload that the Mesos Modular Architecture can run. This specialized orchestration framework is called Marathon. It was originally developed to orchestrate app archives in Linux cgroup containers, later extended support to Docker containers in 2014.
What are the differences between Kubernetes and Mesos?
Kubernetes and Mesos have different approaches to the same problem. Kubernetes acts as a container orchestrator, and Apache Mesos works like a cloud operating system. Therefore, there are several fundamental differences between the two, which are highlighted in the table below.
| Points of Difference | Kubernetes | Apache Mesos |
| Application Definition | Kubernetes is a combination of Replica Sets, Replication Controllers, Pods, along with certain Services and Deployments. Here, “Pod” refers to a group of co-located containers, which is considered as the atomic unit of deployment. | The Mesos’ Application Group is modeled as an n-ary tree, with groups as branches and applications as leaves. It’s used to partition multiple applications into manageable sets, where components are deployed in order of dependency. |
| Availability | Pods are distributed among Worker Nodes. | Applications are distributed among Slave nodes. |
| Load Balancing | Pods are exposed via a service that acts as a load balancer. | Applications can be reached through an acting load balancer, which is the Mesos-DNS. |
| Storage | There are two Stage APIs. The first one provides abstractions for individual storage back-ends such as NFS, AWS, and EBS, etc. The second one provides an abstraction for a storage resource request. This is fulfilled with different storage back-ends. | A Marathon Container can utilize persistent volumes, which are local to the node where they are created. Hence, the container is always required to run on the said node. The experimental flocker integration is responsible for supporting persistent volumes that are not local to a single node. |
| Networking Model | Kubernetes’ networking model allows any pod to communicate with any service or with other pods. It requires two separate networks to operate, with neither network requiring connectivity from outside the cluster. This is accomplished by deploying an overlay network on the cluster nodes. | Marathon’s Docker integration allows mapping container ports to host ports, which are a limited resource. Here, the container will not automatically acquire an IP, that is only possible by integrating with Calico. It should be noted that multiple containers cannot share the same network namespace. |
| Purpose of Use | It is ideal for newcomers to the clustering world, providing a quick, easy, and light way to begin their journey in cluster-oriented development. It offers a great degree of versatility and portability, and is supported by several major providers such as Microsoft and IBM. | It is ideal for large systems as it is designed for maximum redundancy. For existing workloads such as Hadoop or Kafka, Mesos provides a framework allowing the user to interleave those workloads with each other. It is a much more stable platform while being comparatively complex to use. |
| Vendors and Developers | Kubernetes is used by several companies and developers and is supported by a few other platforms, such as Red Hat OpenShift and Microsoft Azure. | Mesos is supported by large organizations such as Twitter, Apple, and Yelp. Its learning curve is steep and quite complex as its core focus is on Big Data and analytics. |
Note: If you want to simplify configuring Kubernetes network connectivity, one of the options is Calico. Learn more by referring to our article How to Run Kubernetes with Calico.
Kubernetes and Mesos employ different tactics to tackle the same problem. In comparing them based on several features, we have found that both solutions are equivalent in terms of features and other advantages when compared to Docker Swarm.
The conclusion we can come to is that they are both viable options for container management and orchestration. Each tool is effective in managing Docker containers. They both provide access to container orchestration for the portability and scalability of applications.
The intuitive architectural design of Mesos offers effective solutions for handling legacy systems and large-scale clustered environments through its DC/OS. It’s also adept at handling more specific technologies such as distributed processing with Hadoop. Kubernetes is preferred more by development teams who want to build a system dedicated exclusively to Docker container orchestration.
Our straightforward comparison should provide users with a clear picture of Kubernetes vs Mesos and their core competencies. The goal has been to provide the reader with relevant data and facts to inform their decision.
How to Choose?
Choosing between them depends on finding the right cluster management solution that fits your company’s technical requirements. If you’d like to find out more about which solution would suit you best, contact us today for a free consultation.