简体   繁体   中英

Access service on kuberntes using hostname instead of ip Address

I am using istio ingress gateway for one of my services, which has to be exposed to http requests. I have configured gateway(myservice-gatewa) and virtual service(myservice-endpoints). I am able to access service using http://{ingress_ip}:{ingress_port}/{path}. But I want to access service using host name instead of any ip address. how do I do it? Thanks in advance

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM