azure - ACS (DCOS) 中除 80 之外的任何其他端口上的应用

标签 azure azure-virtual-machine marathon dcos azure-container-service

如何在 ACS (DCOS) 中的除 80 之外的任何其他端口上托管应用程序?我可以提供任何其他 URL 而不是使用端口号来访问吗?

{
 "id": "/dockercloud-hello-world",
 "cmd": null,
 "cpus": 0.1,
 "mem": 128,
 "disk": 0,
 "instances": 2,
 "acceptedResourceRoles": [
   "*"
 ],
 "container": {
   "type": "DOCKER",
   "volumes": [],
   "docker": {
     "image": "dockercloud/hello-world",
     "network": "BRIDGE",
     "portMappings": [
       {
         "containerPort": 80,
         "hostPort": 0,
         "servicePort": 10000,
         "protocol": "tcp",
         "labels": {}
       }
     ],
     "privileged": false,
     "parameters": [],
     "forcePullImage": true
   }
 },

 "portDefinitions": [
   {
     "port": 10000,
     "protocol": "tcp",
     "name": "default",
     "labels": {}
   }
 ]
}

根据 Marathon 的说法,应用程序可在端口 4170 上使用。

我无法从代理 fqn:portnumber 进行访问

最佳答案

是的,这是可能的。

首先,您需要将hostPort值修改为4170,并将acceptedResourceRoles修改为slave_public

然后您需要在代理节点 NSG 上打开端口 4170。

enter image description here

那么您还需要在代理节点LB上打开端口。

1.添加健康探针

enter image description here

2.负载均衡规则

enter image description here

有关此的更多信息请查看此 link .

关于azure - ACS (DCOS) 中除 80 之外的任何其他端口上的应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49126879/

相关文章:

Azure AD OAuth token 受众错误(客户端凭据流)

visual-studio - Azure VM 中的 Visual Studio 2017 - 无法更改 IE 安全区域

azure - 即使配置 Azure 入站规则和 Windows 防火墙后,也无法列出 Azure 上 IIS FTP 服务器上的目录

docker - 如何在Marathon中指定Docker容器的IP?

c# - Azure 文件存储创建文件 404 错误

c# - 使用 C# 在 Azure 中的存储容器之间复制 blob

azure - 如何在不使用公共(public) IP 的情况下将 Azure Worker/Web 角色连接到 Azure Iaas VM?

mesos - 在 Apache Marathon 上运行 Hadoop/Storm 任务

dns - 访问部署在 apache mesos 代理上的微服务

Azure 仪表板仅显示服务运行状况