how to set grafana path prefix?
ggaaooppeenngg opened this issue · 2 comments
ggaaooppeenngg commented
the default prefix is "/", but I want to dispatch ingress to a sub path, I want all urls follow "prefix/" , can I set a url prefix for grafana?
mscholze commented
- pass env var to grafana deployment:
- name: GF_SERVER_ROOT_URL
value: https://url/subpath/
- ingress with the trailing "/" in path config
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: grafana
namespace: monitoring
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- hosts:
- url
secretName: url-tls
rules:
- host: url
http:
paths:
- path: /subpath/
backend:
serviceName: grafana
servicePort: 3000`
This works for me!
pipo02mix commented
@ggaaooppeenngg Has you tried mikes suggestion?