0

我正在为我的一项服务使用 istio 入口网关,该服务必须暴露给 http 请求。我已经配置了网关(myservice-gatewa)和虚拟服务(myservice-endpoints)。我可以使用 http://{ingress_ip}:{ingress_port}/{path} 访问服务。但我想使用主机名而不是任何 IP 地址来访问服务。我该怎么做?提前致谢

4

1 回答 1

-1

If I understand your question correctly, You want to access your service from within your cluster via host name and not via IP ( Assuming service is of type NodePort). If yes have you considered looking up the Kubernetes documentation on DNS for Services and Pods?

于 2021-03-15T23:28:05.950 回答