ACS (DCOS) 中除 80 以外的任何其他端口上的应用程序

Application in ACS (DCOS) on any other port except 80

如何在 80 以外的任何其他端口上托管 ACS (DCOS) 中的应用程序?我可以给任何其他 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端口

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

1.Add 健康探测

2.Load 平衡规则

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