1

I created two sample application(tcp-server and tcp-client) for checking TCP connection in istio environment. Used the below link to create server and client in g0

https://www.linode.com/docs/guides/developing-udp-and-tcp-clients-and-servers-in-go/

Deployed the application in kubernetes cluster and tested without istio, it is working fine.

But after installing istio(demo configuration, followed this url to install istio: https://istio.io/latest/docs/setup/getting-started/), and redeploying the apps to fill with envoy-proxy, the client is not connecting to server

Also using below command makes the server connect success

sh -c "echo world | nc 10.244.1.29 1234" is 

What am I doing wrong?

JibinNajeeb
  • 784
  • 1
  • 10
  • 31
  • Maybe your app makes network calls before the Proxy is ready. See https://stackoverflow.com/questions/52936524/starting-a-container-pod-after-running-the-istio-proxy and https://github.com/istio/istio/issues/11130#issuecomment-779300172 – user140547 Sep 12 '21 at 09:17
  • Thx for the reply. This is not the problem here. This can be solved by overriding istiooperator with holdApplicationUntilProxyStarts: true – JibinNajeeb Sep 13 '21 at 06:56
  • I found the solution. I tried providing ip address of server directly from client app which is not working, dont know why. Now I replaced ip address with service_name of server app and it is working – JibinNajeeb Sep 13 '21 at 06:58
  • Please post your solution as an answer. – Mikołaj Głodziak Sep 13 '21 at 08:06

1 Answers1

1

Posting the solution I found.

Issue: I was trying to connect to server using ip address and nodePort, which some how not working in istio environment

Solution: From Client instead of providing ip address and nodePort of server node, give service name and container port of server app.

Extra Info: For using client from outside cluster, create gateway and virtual service for server. In your external client provide nodePort and ip address of istio-ingress pod as server destination

JibinNajeeb
  • 784
  • 1
  • 10
  • 31