Apache的Mesos和谷歌的Kubernetes到底有什么区别? 我知道这两个都是服务器集群管理软件。谁能详细说明一下主要的区别在哪里——什么时候哪个框架是首选的?

为什么要在Mesosphere上使用Kubernetes呢?


当前回答

我喜欢这个短视频在这里mesos学习材料

对于裸金属集群,你需要生成HDFS、SPARK、MR等堆栈……因此,如果只使用裸金属集群管理启动与这些相关的任务,将会有很多冷启动时间。

使用mesos,您可以将这些服务安装在裸金属之上,并且可以避免这些基础服务的启动时间。这是内消旋体擅长的。并且可以由kubernetes在其之上构建。

其他回答

我喜欢这个短视频在这里mesos学习材料

对于裸金属集群,你需要生成HDFS、SPARK、MR等堆栈……因此,如果只使用裸金属集群管理启动与这些相关的任务,将会有很多冷启动时间。

使用mesos,您可以将这些服务安装在裸金属之上,并且可以避免这些基础服务的启动时间。这是内消旋体擅长的。并且可以由kubernetes在其之上构建。

Kubernetes is an open source project that brings 'Google style' cluster management capabilities to the world of virtual machines, or 'on the metal' scenarios. It works very well with modern operating system environments (like CoreOS or Red Hat Atomic) that offer up lightweight computing 'nodes' that are managed for you. It is written in Golang and is lightweight, modular, portable and extensible. We (the Kubernetes team) are working with a number of different technology companies (including Mesosphere who curate the Mesos open source project) to establish Kubernetes as the standard way to interact with computing clusters. The idea is to reproduce the patterns that we see people needing to build cluster applications based on our experience at Google. Some of these concepts include:

豆荚-一种将集装箱组合在一起的方法 复制控制器——一种处理容器生命周期的方法 标签-一种查找和查询容器的方法 服务——一组执行公共功能的容器。

因此,仅使用Kubernetes,你就会拥有一些简单、易于启动和运行、可移植和可扩展的东西,它将“集群”作为一个名词,以尽可能轻的方式管理。在集群上运行应用程序,不要再担心单个机器。在这种情况下,集群就像虚拟机一样是一种灵活的资源。它是一个逻辑计算单元。打开它,使用它,调整它的大小,把它迅速和容易。

With Mesos, there is a fair amount of overlap in terms of the basic vision, but the products are at quite different points in their lifecycle and have different sweet spots. Mesos is a distributed systems kernel that stitches together a lot of different machines into a logical computer. It was born for a world where you own a lot of physical resources to create a big static computing cluster. The great thing about it is that lots of modern scalable data processing application run well on Mesos (Hadoop, Kafka, Spark) and it is nice because you can run them all on the same basic resource pool, along with your new age container packaged apps. It is somewhat more heavy weight than the Kubernetes project, but is getting easier and easier to manage thanks to the work of folks like Mesosphere.

现在真正有趣的是,Mesos目前正在进行调整,以添加许多Kubernetes概念,并支持Kubernetes API。因此,如果你需要的话,它将为你的Kubernetes应用程序提供更多的功能(高可用性主,更高级的调度语义,扩展到大量节点的能力),并且非常适合运行生产工作负载(Kubernetes仍然处于alpha状态)。

当被问到这个问题时,我倾向于说:

Kubernetes is a great place to start if you are new to the clustering world; it is the quickest, easiest and lightest way to kick the tires and start experimenting with cluster oriented development. It offers a very high level of portability since it is being supported by a lot of different providers (Microsoft, IBM, Red Hat, CoreOs, MesoSphere, VMWare, etc). If you have existing workloads (Hadoop, Spark, Kafka, etc), Mesos gives you a framework that let's you interleave those workloads with each other, and mix in a some of the new stuff including Kubernetes apps. Mesos gives you an escape valve if you need capabilities that are not yet implemented by the community in the Kubernetes framework.

这两个项目都旨在简化在数据中心或云中的容器中部署和管理应用程序。

为了在Mesos上部署应用程序,可以为Mesos使用Marathon或Kubernetes。

Marathon是一个集群范围的初始化和控制系统,用于在cgroups和Docker容器中运行Linux服务。Marathon有许多不同的金丝雀部署特性,是一个非常成熟的项目。

马拉松运行在Mesos之上,Mesos是一个高度可伸缩、经过战斗测试和灵活的资源管理器。“马拉松”已被证明具有可扩展性,并可在许多生产环境中运行。

Mesos和Mesosphere技术堆栈为运行现有Linux工作负载提供了类似云的环境,但它也为构建新的分布式系统提供了原生环境。

Mesos is a distributed systems kernel, with a full API for programming directly against the datacenter. It abstracts underlying hardware (e.g. bare metal or VMs) away and just exposes the resources. It contains primitives for writing distributed applications (e.g. Spark was originally a Mesos App, Chronos, etc.) such as Message Passing, Task Execution, etc. Thus, entirely new applications are made possible. Apache Spark is one example for a new (in Mesos jargon called) framework that was built originally for Mesos. This enabled really fast development - the developers of Spark didn't have to worry about networking to distribute tasks amongst nodes as this is a core primitive in Mesos.

据我所知,Kubernetes目前还没有在谷歌的生产部署中使用。对于生产,谷歌使用Omega/Borg,这更类似于Mesos/Marathon模型。然而,使用Mesos作为基础的好处是Kubernetes和Marathon都可以在它上面运行。

更多关于马拉松的资源:

https://mesosphere.github.io/marathon/

视频: https://www.youtube.com/watch?v=hZNGST2vIds

Kubernetes和Mesos是天作之合。Kubernetes支持Pod(共定位容器组)抽象,以及用于服务发现、负载平衡和复制控制的Pod标签。Mesos为集群中的节点之间的pod提供了细粒度的资源分配,并且可以使Kubernetes与运行在相同集群资源上的其他框架很好地合作。

来自kubernetes-mesos的自述

Mesos和Kubernetes都可以用来管理机器集群,并抽象出硬件。

Mesos在设计上没有提供调度器(用于决定在何处、何时运行进程以及如果进程失败该做什么),您可以使用Marathon或Chronos之类的调度器,也可以编写自己的调度器。

Kubernetes可以为你做开箱即用的调度,也可以用作Mesos的调度程序(如果我错了,请纠正我!),在这里你可以一起使用它们。Mesos可以有多个调度程序共享同一个集群,所以理论上你可以在同一个硬件上同时运行kubernetes和chronos。

超级简单:如果你想控制你的容器如何调度,选择Mesos,否则Kubernetes会很糟糕。