I was trying to setup elasticsearch statefulset pod on kubernetes cluster. It works perfectly fine, when I do it without istio. But as soon as I try it with istio sidecar auto injection enabled, I get this error(logs from elasticsearch client):

[INFO ][o.e.d.z.ZenDiscovery ] [elastic-elasticsearch-client-588f99db79-f67pc] failed to send join request to master [{elastic-elasticsearch-master-0}{4SjC6CqUSpKVP_IbvdpvfQ}{saZaYbY7R0mxYW5ygbnKBA}{}{}{ml.machine_memory=8369913856, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}], reason [RemoteTransportException[[elastic-elasticsearch-master-0][][internal:discovery/zen/join]]; nested: ConnectTransportException[[elastic-elasticsearch-client-588f99db79-f67pc][] general node connection failure]; nested: TransportException[handshake failed because connection reset]; ]

Any suggestions on how to go about fixing this?
I suspect it has to do something with this:
Any suggestions on how to go about this issue?