2017-02-17 79 views
0

我已用本说明书创建的服务:https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address-service/Kubernetes:如何连接到集群外部的服务?

该服务具有IP在该示例(10.32.0.16,由kubectl describe services example-service命令),我们可以创建proxy_pass规则:在proxy_pass http://10.32.0.16:8080;外部的nginx(群集外部)。

这个IP总是不同的(这取决于服务的数量等)。我怎样才能为我的外部nginx指定这项服务?

回答

1

的替代,我发现很厉害,是设置使用official nginx ingress controller集群内的nginx 。

然后,您可以同时拥有负载均衡/ HA nginx,并让kubernetes自动从入口规则更新其配置。