Access external service

Hi All,

need help regarding external service accessing in istio

usecase: I have 1 service running suppose media-service outside k8s i.e on some IP:port on some vm

want to access this service from istio.

1 way which i got is serviceentry, but it is not working and giving 404.

Service entry file

serviceentry.yaml

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: consul-media-service
spec:
  hosts:
  - consul-media-service
  addresses:
  - x.x.x.x
  location: MESH_INTERNAL
  ports:
  - number: 8105
    name: http
    protocol: HTTP
  resolution: STATIC
  endpoints:
  - address: x.x.x.x
  location: MESH_EXTERNAL

virtual service file

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: media-service
spec:
  hosts:
  - 99services.99.jsb9.net
  http:
  - match:
    - uri:
        prefix: /media-service/
    rewrite:
      uri: /
    route:
    - destination:
        host: consul-media-service
        port:
          number: 8105

What im missing? Any help would be highly appreciated.

Hi team

Any update?

Thanks in advance.

Hi Team,

Any update?

Thanks in advance.

Hello @Aman_Gupta. How are your internal services accessing the external service? Using 99services.99.jsb9.net?

Is it really only HTTP?

BTW, you’re setting "location: " twice, with conflicting options (MESH_INTERNAL and MESH_EXTERNAL)…

Yes, We are accessing all services via 99services.99.jsb9.net

yes, its on HTTP ( external service here means outside k8s cluster )

Below is typo error
BTW, you’re setting "location: " twice, with conflicting options (MESH_INTERNAL and MESH_EXTERNAL)…

Hi team,

any update?

let me know if any other info is required.

@sergiomacedo Any update.