gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 01:44:17 25 4
gpt4 key购买 nike

如何在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com