I am running 2 services in Kubernetes cluster.
Service is deployed with type "ClusterIP" and ingress( netscalar ) is sitting in front of the service.
schedulesvc is running fine and I am able to access schedulesvc from outside the Kubernetes cluster.
Now, trying to access schedulesvc from pricesvc. Either I can use the ClusterIP service endpoint or Ingress. Since, I am planning for running Kubernetes cluster in multiple Data Center, I will be running my application in Active/Active across DC and hence I dont want to use the ClusterIP url and would like to use Ingress URL for now.
I can access the schedulesvc ingress url from outside kubernetes cluster. However, if i try to invoke schedulesvc from pricesvc using ingress URL, getting the below error.
Caused by: java.net.UnknownHostException: schedulesvc.testns.ing.lb.kubecloud.io: Temporary failure in name resolution
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_152]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[na:1.8.0_152]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[na:1.8.0_152]
at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[na:1.8.0_152]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_152]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_152]
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.2.jar!/:4.5.2]
Am i missing anything?
It seems that you created a namespace called testns
.
Remember that it's only possible to create an ingress to address services inside the namespace in which the Ingress resides. Cross-namespace ingresses are not implemented for security reasons.