I installed Istio with
gateways.istio-egressgateway.enabled = true
When I try to connect to external database I receive an error. I do not have a domain (only ip and port), so I define the following rules:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: external-db
spec:
hosts:
- external-db.tcp.svc
addresses:
- 190.64.31.232/32
ports:
- number: 3306
name: tcp
protocol: TCP
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: 190.64.31.232
then I open a Shell in my system (deployed in my service mesh) And it can't resolve the name
$ ping external-db.tcp.svc
ping: ceip-db.tcp.svc: Name or service not known
But i can connect using the ip address
$ ping 190.64.31.232
PING 190.64.31.232 (190.64.31.232) 56(84) bytes of data.
64 bytes from 190.64.31.232: icmp_seq=1 ttl=249 time=1.35 ms
64 bytes from 190.64.31.232: icmp_seq=2 ttl=249 time=1.42 ms
What is happening? Do I have to connect using the domain or the ip? Can I define a internal domain for my external ip?