<p>I am trying to setup Prometheus in k8 cluster, able to run using helm. Accessing dashboard when i expose prometheus-server as LoadBalancer service using external ip.
Same does not work when I try to configure this service as ClusterIP and making it as backend using ingress controller. Receiving 404 error, any thoughts on how to troubleshoot this?</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ops-ingress
  annotations:
    #nginx.org/server-snippet: "proxy_ssl_verify off;"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
  - http:
      paths:
      - path: /prometheus(/|$)(.*)
        backend:
          serviceName: prometheus-server
          servicePort: 80
</code></pre>

<p>with above ingress definition in place, url  “http://&lt;>/prometheus/ getting redirected to http://&lt;>/graph/ and then 404 error page getting rendered. When url adjusted to http://&lt;>/prometheus/graph some of webcontrols gets rendered with lots of errors on browser console.</p>

<p>Prometheus might be expecting to have control over the root path (/).</p>

<p>Please change the Ingress to <code>prometheus.example.com</code> and it should work fine. (Changing it to a subdomain)</p>
