I’ve configured istio components under “istio-system” namespace. For some reason, I’m not able to access Prometheus through “istio-ingressgateway” even after adding gateway service and virtual service.
Here is my virtual service and gateway config for prometheus routing:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: istio-prometheus-gw
namespace: ns1 # Individual name (we’ll use this later in VirtualServer)
spec:
selector:
istio: ingressgateway # Specify the ingressgateway created for us
servers:
- port:
number: 80 # Service port to watch
name: http
protocol: HTTP
hosts:- “" # Host to watch on, could be "”
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
annotations:
name: istio-prometheus-vs
namespace: ns1
spec:
hosts:
- “*”
gateways: - istio-prometheus-gw
http: - match:
- uri:
prefix: /prometheus-ns1
route: - destination:
host: prometheus-server
port:
- uri: