Hi guys,
With my own kubernetes cluster 1.8.8 working on an openstack cloud, I am trying to
use traefik (1.6.1) as a reverse proxy (ingress controller) for my applications. It works just fine for an app I call helloworld but
not for prometheus (in last version).
Is there something I miss for making prometheus work with traefik ?
The result with prometheus UI is a 404 error page and /prometheus is automatically redirected to /graph. I must add that, of course, prometheus is working ok from my internal cluster and I can access home page when created a NodePort (but my goal is to use a reverse proxy for accessing it).
Configuration of prometheus ingress:apiVersion: v1
kind: Service
metadata:
name: prometheus-svc
labels:
app: prometheus
annotations:
prometheus.io/scrape: 'true'
spec:
ports:
- name: prom
port: 9090
targetPort: 9090
externalIPs:
- <mypublicip>
selector:
app: prometheus
env: dev
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: prometheus-ingress
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
traefik.frontend.passHostHeader: "true"
traefik.backend.loadbalancer.sticky: "true"
spec:
rules:
- http:
paths:
- path: /prometheus
backend:
serviceName: prometheus-svc
servicePort: prom
Configuration of helloworld ingress:apiVersion: extensions/v1beta1
kind: Ingress
metadata:
namespace: helloworld
name: helloworld
annotations:
kubernetes.io/ingress.class: "traefik"
traefik.frontend.rule.type: PathPrefixStrip
traefik.frontend.passHostHeader: "true"
traefik.backend.loadbalancer.sticky: "true"
spec:
rules:
- http:
paths:
- path: /hello
backend:
serviceName: helloworld
servicePort: 80