Getty Images

Tip

Compare container orchestrators Apache Mesos vs. Kubernetes

Exploring options for container orchestration? Kubernetes' popularity doesn't mean it's always the best choice. Discover the tradeoffs and use cases of Mesos vs. Kubernetes.

Kubernetes controls the lion's share of the container orchestration market, but it's not the only orchestration tool in town. Other orchestrators, such as Apache Mesos, remain viable alternatives -- and for some use cases, they might even be a better option.

What is Apache Mesos?

Apache Mesos is an open source platform used to manage clusters of servers. It was introduced in 2009, before containers started to gain widespread adoption after Docker's launch in 2013.

Mesos takes a user-defined workload -- known as a task -- and runs it on a cluster of servers. Although Mesos can run containers, it can also run non-containerized applications.

What is Kubernetes?

Kubernetes is an open source platform that deploys and manages containerized applications called pods across a cluster of servers.

Although Kubernetes' roots trace back to the cluster management platform Borg, developed at Google in the 2000s, Kubernetes didn't launch as an open source project until 2014. By that time, containerized applications were well on their way to widespread popularity.

While Kubernetes faced some early competition from other container orchestrators like Docker Swarm and Mesos, it has become by far the most popular orchestration platform today. A 2021 survey by the Cloud Native Computing Foundation, which hosts the Kubernetes project, found that 96% of respondents' organizations were using or evaluating Kubernetes.

Apache Mesos vs. Kubernetes: The main differences

Despite Kubernetes' popularity, it's not always the best choice compared with rival orchestrators like Mesos. Rather than viewing Kubernetes as overall better or worse than alternatives, it's more useful to understand the fundamental differences in how each platform operates.

Defining workloads

In both Mesos and Kubernetes, users can define workloads using JSON or YAML code. Mesos also has a resource for task groups called pods, which differ from Kubernetes pods.

The specific languages used are different, so users must master separate configuration languages to work with Kubernetes and Mesos. In general, Mesos workload definitions are somewhat shorter and easier to write. Overall, however, the differences are minimal.

Deploying workloads

In Kubernetes, the most common way to deploy a workload after defining it is to use the following kubectl command:

kubectl apply -f your-deployment.yaml

In contrast, Mesos users can deploy workloads with API calls using generic Linux commands like curl instead of an external tool like kubectl.

curl -X POST http://localhost:8080/v2/apps -d @hello-marathon.json -H "Content-type: application/json"

This small convenience eliminates the need to install a specialized tool on every machine to administer a Mesos cluster.

Workload types

Mesos supports any type of workload -- containerized or not -- while Kubernetes is designed specifically for containerized applications.

It's technically possible to run non-containerized applications on Kubernetes by deploying them to a VM and running them inside a Kubernetes cluster with an add-on, such as KubeVirt. But doing so requires extra setup and more tools, whereas Mesos can run non-containerized apps out of the box.

List of elements involved in building an efficient container ecosystem.
Choosing the right orchestration tool is key to building an efficient container ecosystem.

Networking

Compared with Kubernetes, networking in Mesos is easier to set up but less flexible.

Kubernetes supports networking management plugins that are compatible with the Container Network Interface (CNI). Depending on your needs and level of networking complexity, you can pick and choose from a variety of Kubernetes networking plugins.

Mesos doesn't use networking plugins by default. Instead, it uses built-in networking features that can assign ports to workloads at definition but otherwise don't provide granular control over network configuration. While Mesos now offers CNI support, it's less mature, and not all CNI plugins are compatible with Mesos.

Storage

Similar to networking, Mesos is easier to configure but less flexible than Kubernetes on the storage front.

In general, production workloads on Mesos are limited to using local storage volumes to persist data. Mesos workloads can access persistent storage resources hosted on nodes in clusters, similar to using local persistent volumes in Kubernetes.

However, Mesos' Container Storage Interface (CSI) support remains experimental and limited. Kubernetes, in contrast, supports dozens of storage plugins that can integrate workloads with external storage services so long as they comply with the CSI.

Ecosystem support

Kubernetes and Mesos both benefit from thriving ecosystems and are both used by major enterprises for production workloads.

However, because Kubernetes is more widely used, it's easier to find expertise, integrations and add-ons for Kubernetes than for Mesos. If your business doesn't already have in-house cluster management expertise, it will likely be easier to acquire the right skills for Kubernetes compared with Mesos.

Reasons to choose Mesos vs. Kubernetes

So why would an organization choose Mesos instead of Kubernetes?

First, Mesos has existed longer than Kubernetes and is thus somewhat more mature. Mesos can also be easier to set up than Kubernetes -- provided that it supports your networking and storage requirements based on its native features. Mesos' ability to run non-containerized apps natively is also an advantage, especially for organizations looking to deploy a range of application types.

On the other hand, Kubernetes is a better choice than Mesos for organizations looking to benefit from the hundreds of open source add-ons and integrations provided by the Kubernetes community. Choosing Kubernetes also makes it easier to find engineers with the right expertise to support your clusters.

Next Steps

How to tackle container orchestration challenges

Kubernetes vs Docker Compose: What's the difference?

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
Data Center
Close