@chris-lsn did you find the cause of the issue? I’m having the exact same problem, calling the url from a browser or cli outside of k8s cluster works fine perfectly, but when trying the same url from inside the k8s cluster (any pod) it times out, seems an issue with CoreDNS timing out on external dns resolution from inside k8s cluster.
We believe the issue came up from a recent change we did in the network policies. We have restricted some traffic and is affecting the communication between services exposed in Okteto when using the public endpoint. To communicate with services within the same namespace, we recommend you to use the service name instead of using the public domain, the request will use the internal network and have better performance.
We are working on changing these rules to allow again that traffic. I’ll let you know when we apply the changes.
Thanks for the quick reply, appreciate it. Regarding to communicating through service name is a valid option, the only problem with that is I have to aware the service that is being called from front-end/public and that can be accomplished through X-Forward-* headers.
I was not able to perform that config on ingress due to okteto security reasons, tried with nginx.ingress.kubernetes.io/configuration-snippet: besides with nginx configmap approach, so Im dead in the water at this point, any suggestions is much appreciated, thanks!
@elreclamador I think it would be best to not rely on the ingress controller for this, especially, if this is always service-to-service traffic. For this case I would recommend adding an nginx to your deployment. Then you can manage this nginx config as you see fit. So, if you have service A communicating to service B. The path would be A->nginx->B and the address for nginx would probably be nginx:<port>. This assumes you always need service-to-service and that you can configure nginx to route based on path or something other than host name. Even if you do need hostname routing it may be possible by adding multiple services for the single nginx deployment. This is a bit off-topic for the original connection issue though so if you have more questions let’s migrate to a new question.
@Jacob I thought on that solution as well but was adding extra hops and software that should not be needed when deploying on a prod cloud env where you have total control over k8s cluster, beside still need to forward X-forwarded-* headers from ingress to nginx to aware FE/original IP communication, anyhow thanks for the quick replies and help! much appreciated! have a nice day.