从 c# https://github.com/Microsoft/Docker.DotNet 连接到 azure 容器服务 swarm 集群的正确端点是什么

What is the proper endpoint for connecting to azure container service swarm cluster from c# https://github.com/Microsoft/Docker.DotNet

部署 azuze 容器服务并使用 swarm 后,如何使用给出的示例进行连接:

var credentials = new CertificateCredentials (new X509Certificate2 ("CertFile", "Password"));
var config = new DockerClientConfiguration("http://ubuntu-docker.cloudapp.net:4243", credentials);
DockerClient client = config.CreateClient();

我已经制作了证书,只是无法弄清楚要使用的正确端点是什么?

来自 azure portl 的 url:<name>-mgmt.<region>.cloudapp.azure.com

A​​CS 默认不使用证书。我们使用 https://docs.microsoft.com/en-us/azure/container-service/container-service-connect

中记录的 SSH 隧道

如果您已连接到主机并手动将其配置为使用证书并在主机上正确安装这些证书,那么端点和连接细节就没有什么神奇之处了。它只是 Docker,因此请遵循相应的 Docker 文档。正如您在问题中指出的那样,正确的 URL 是 <name>-mgmt.<region>.cloudapp.azure.com.

但是,您应该知道,由于默认情况下我们不使用证书,因此我们不会在 Master LB 上打开必要的端口。您还需要在主 LB 上打开它们。有关示例(针对代理 LB 但过程相同),请参见 https://docs.microsoft.com/en-us/azure/container-service/container-service-enable-public-access