如何在Azure上运行的mesos集群(dc / os)中链接docker容器?(How can I link docker containers in mesos cluster (dc/os) r

编程入门 行业动态 更新时间:2024-10-27 18:33:48
如何在Azure上运行的mesos集群(dc / os)中链接docker容器?(How can I link docker containers in mesos cluster (dc/os) running on Azure?)

我正在Azure上使用azure容器服务在mesos集群上设置一个多容器应用程序,并且当前卡在链接容器中。

我的设置简介: - 使用Azure容器服务在Azure上部署Mesos集群 - 它是一个3容器应用程序 - A,B和C - B依赖于A和C依赖于A和B- - A目前已部署

如何链接上述容器?

谢谢,Suraj

I am setting up a multi container application on mesos cluster on Azure using azure container service and currently stuck in linking containers.

My setup brief info: - Mesos cluster is deployed on Azure using Azure container service - It's a 3 container application - A, B and C - B is dependent on A and C is dependent on A & B- - A is deployed currently

How can I link the above containers?

Thanks, Suraj

最满意答案

如果通过链接你的意思是Docker的--link那么那些弃用的练习和容器间通信应该使用Docker网络和端口映射来完成。

对于DC / OS - 您有一些不同的方法来实现这一点(也称为服务发现)。 我写了一篇博文,通过示例解释这些不同的工具: http : //blog.itaysk.com/2017/04/28/dcos-service-discovery-and-load-balancing-by-example

如果您不想阅读该长篇文章并寻求建议:尝试使用VIP。

创建应用程序时(从Marathon或DC / OS UI),请查找“VIP”设置。 在那里输入IP(可以是组成的IP)和端口。 您可以在此IP:端口下发现您的服务。

有关VIP的更多信息: https : //dcos.io/docs/1.9/networking/load-balancing-vips/virtual-ip-addresses/

If by linking you mean Docker's --link then thats deprecated practice and inter-container communication should be done using Docker networks and port mappings.

For DC/OS - you have some different ways to achieve this (also called Service Discovery). I have written a blog post explaining these different tools by examples: http://blog.itaysk.com/2017/04/28/dcos-service-discovery-and-load-balancing-by-example

If you don't want to read through that long post and looking for a recommendation: Try using VIPs.

When creating the application (either from Marathon or DC/OS UI), look for the 'VIP' setting. Enter an IP there (it can be a made up IP) and port. Your service will be discoverable under this IP:Port.

More on VIPs: https://dcos.io/docs/1.9/networking/load-balancing-vips/virtual-ip-addresses/

更多推荐

本文发布于:2023-07-09 15:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1087167.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:集群   容器   链接   如何在   mesos

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!