I am facing a situation where I have to check tcp connection from within container to a remote application. And source container runs with sidecar container of istio-proxy.
When sidecar is there, and I telnet to any IP and port, it always gives output as connected. Irrespective of whether that IP is reachable or not and whether the port is open or not on remote end.
Istio version I am using is 1.6.2.
Kubernetes version is: 1.17.4
How to replicate.
Create two namespaces one with label istio-injection=enabled and other without that label.
Deploy nginx pod in both the namespaces.
Install telnet in both pods(apt-get update, apt install telnet)
Now telnet will show connected for all IP and ports from the pod that is in namespace where istio-injection is enabled. While in second namespace from nginx pod, telnet will work fine(As expected).
ncat utility also provides same results as telnet.
Request to provide further guidance on this.