Ali Kahoot
Ali Kahoot

Reputation: 3589

Unable to Connect to SQL Server from Istio Envoy Proxy

I am using Istio and Envoy as sidecar proxy. I have deployed the bookinfo sample and its working fine but when I am deploying my own application which calls SQL Server on https or other external services, it gives exception.

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)

Upvotes: 1

Views: 2685

Answers (2)

Vadim Eisenberg
Vadim Eisenberg

Reputation: 3427

To let Istio applications communicate with external TCP services, check this blog post https://istio.io/latest/blog/2018/egress-tcp/.

To let Istio applications communicate with external HTTP and TLS services, check https://istio.io/latest/docs/tasks/traffic-management/egress/egress-control/.

Upvotes: 3

Shree Prakash
Shree Prakash

Reputation: 2314

I faced same issue to connect SQL server from my application, Which i have deployed

in istio enabled namespace. I created serviceentry as shown below to create accessablity.

 apiVersion: networking.istio.io/v1alpha3
 kind: ServiceEntry
 metadata:
   name: sql-replica
 spec:
   hosts:
     - SQL-DNS-NAME or IP 
   addresses:
     - xxx.xx.x.xxx/32 
   ports:
     - number: 5432
       name: tcp
       protocol: TCP
   location: MESH_EXTERNAL



Here in config file xxx.xx.x.xxx ip is that IP which we get by pinging to DNS
$ kubectl apply -f access-sql-server-from-mesh.yaml

Upvotes: 1

Related Questions