Hi everyone. I want to achieve it the possibility to mirror the traffic from my cluster to the external service that is available over HTTP. So for this, I have a ServiceEntry
that point to the external service, and the VirtialService
that mirrors the traffic to the ServiceEntry
. Here are my configs:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: external-svc-http
spec:
hosts:
- external.service.url
ports:
- number: 80
name: http-ext
protocol: HTTP
location: MESH_EXTERNAL
resolution: NONE
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: service-default
spec:
hosts:
- service
http:
- route:
- destination:
host: service
subset: v1
mirror:
host: external.service.url
I also have a simple DestinationRule
that creates the subset v1
.
However, when I apply these configs my external service still does not get any requests. I can curl
the external service from inside the pod using the URL after applying these configs. Any help would be appreciated!
I’ve tried to inspect the traffic using tcpdump
:
kubectl exec -it $POD_NAME -c istio-proxy -- sudo tcpdump -A -s 0 host external.service.url
And it does not show any traffic for the given host when I’m requesting my application. However, it does show the traffic when I’m explicitly curl
the host from inside the pod.
I can as well see that the endpoint is present in the list of clusters:
> istioctl proxy-config clusters $POD_NAME
SERVICE FQDN PORT SUBSET DIRECTION TYPE
external.service.url 80 - outbound &{ORIGINAL_DST}