Question

Can't access deployment from another deployment though nginx-ingress load-balancer.

Posted January 13, 2020 512 views
Kubernetes

Hi, I have 2 deployments and Nginx ingress (https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm).

External traffic works but when the first deployment trying to contact the second deployment using his address (Access from external works perfectly), it not working.
How I can fix it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi, if you post the used manifests or helm deployments, it would be very helpful…

some clues:

  • check all applied and defined labels :)
  • you need to be more specific in your question :)
  • different or same namespaces ?
  • I have 2 deployments in the default namespace which was deployed using manifests and ingress deployed using helm in ‘ingress’ namespace.

    The problem is when deployment1 with address deployment1.k8s.<my domain>.com trying to access deployment2 with address deployment2.k8s.<my domain>.com ingress throws a timeout error:

    2020/01/14 11:48:29 [error] 37#37: *174482 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.132.46.250, server: <my domain>.com, request: "GET /admin HTTP/1.1", upstream: "http://10.244.0.6:80/admin", host: "<my domain>.com"
    

@vista1nik Hello, have you been able to solve this problem? I also get a 504 error when accessing a neighboring pod.

Submit an Answer