istio How to configure services that use the root directory to convert to secondary paths

Viewed 14

enter image description here

How does my nginx configuration work in the isio? I need to be able to access pgadmin through the secondary path rather than through the root directory. The root directory will be used by other important servers

1 Answers

You would need to create istio gateway and istio virtual service objects. Please refer istio documentation for traffic management. Below is the sample of uri base routing and similarly you can add different routes based on the requirement.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: app-route
spec:
  hosts:
  - app.prod.svc.cluster.local
  http:
  - match:
    - uri:
        prefix: /pgadmin
    - route:
      - destination:
        host: <db service name>
Related