0

I am trying to test Istio 1.9 on Kubernetes 1.20.2 (on premise)

First of all, when Nginx proxy_pass has fqdn of service for tomcat deployment

location /  {
            proxy_pass              http://tomcat.default.svc.cluster.local:8080;
            proxy_http_version      1.1;
            proxy_set_header        Connection "";
            proxy_redirect          off;
            proxy_set_header        Host    $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header        X-Forwarded-Proto  $scheme;
        }

while showing 404 error, It doesn't work and I couldn't find any tcp packet towards tomcat from tcpdump in Nginx pod.

Secondly, If I change the fqdn in proxy_pass into clusterIP or pod IP of tomcat pod, It works very well.

Finally, If I remove istio sidecar(envoy) injected into nginx, it works with fqdn in proxy_pass.

In this case, when the fqdn is used with envoy, why proxy_pass is not working? is there any required configurationn for Nginx with envoy?

I can expect the fqdn is used commonly in the light of the fact clusterIP could be changed.

Solsupungi
  • 29
  • 2
  • can you please describe what exactly you wanna achieve? use case. istio proxy has their own names for objects. And it seems..additionally using `proxy_pass` breakes correct behavior – Vit Feb 23 '21 at 16:13
  • In two tiers (nginx + tomcat), if I use fqdn in `proxy_pass` in nginx.conf for tomcat backend, always **40X or 50X** errors show up with istio-proxy. This problem doesn't happen if I use ip address of tomcat pod instead of fqdn. What I am missing when I would like to use fqdn in `proxy_pass`? – Solsupungi Feb 23 '21 at 16:48
  • With the fqdn, try this instead of the above Host header: proxy_set_header Host tomcat.default.svc.cluster.local – David Chandler Mar 01 '21 at 00:48
  • wow, thank you **David** it works very well, it's perfect . Could you explain what is defferent? – Solsupungi Mar 01 '21 at 05:50

0 Answers0