Hello,
I have a remote cluster which works when using xxx.default.global (with ServiceEntry). However, I would like to use a custom cluster.local DNS.
Example: mongodb-primary-0.mongodb-headless.default.svc.cluster.local points to mongodb-primary-0.default.global
Is this possible (Istio 1.5.1)? I tried the following without success:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: mongodb-arbiter-0-headless
spec:
hosts:
- "somecustom.subdomain.svc.cluster.local"
location: MESH_INTERNAL
ports:
- name: tcp
number: 27017
protocol: TCP
- name: http1
number: 9216
protocol: http
resolution: DNS
endpoints:
- address: myservice.default.global
ports:
tcp: 27017
http1: 9216
I know it is possible to rewrite DNS directly with CoreDNS but it is the least favourable solution for me.
Thanks