I am running service mesh using minikube and trying to access api running outside the minikube using fortio :
kubectl exec “$FORTIO_POD” -c fortio – /usr/bin/fortio load -c 1 -qps 0 -n 1 -loglevel debug http://localhost:3000
but this is giving me error :
dial tcp 127.0.0.1:3000: connect: connection refused
Below is the service entry and destinationRule object I have created :
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: localhost
spec:
hosts:
- localhost
location: MESH_EXTERNAL
ports:
- number: 3000
name: http
protocol: HTTP
resolution: STATIC
endpoints:
- address: 127.0.0.1
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: localhost
spec:
host: localhost
trafficPolicy:
tls:
mode: DISABLE