I am now trying to deploy the grafana service under the https://example.com/monitor path, Traffic is coming in through ingress-nginx, here is my ingress-nginx config
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-app-monitor
spec:
ingressClassName: nginx
tls:
- hosts:
- example.com
secretName: cloudflare-tls-prod
rules:
- host: example.com
http:
paths:
- pathType: Prefix
path: "/monitor"
backend:
service:
name: grafana-service
port:
number: 8000
and here is my grafana config
ENV GF_SERVER_DOMAIN=examlpe.com
ENV GF_SERVER_ROOT_URL=https://examlpe.com:443/monitor/
ENV GF_SERVER_SERVE_FROM_SUB_PATH=true
I also tried other configurations, but it still doesn't work...
If you're seeing this Grafana has failed to load its application files
1. This could be caused by your reverse proxy settings.
2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath. If not using a reverse proxy make sure to set serve_from_sub_path to true.
3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build
4. Sometimes restarting grafana-server can help
5. Check if you are using a non-supported browser. For more information, refer to the list of supported browsers.
And the log of ingress-nginx such like this,the traffic same like right...
GET /monitor HTTP/2.0" 200 34294 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.63" 859 0.140 [default-vrcollab-grafana-service-8000] [] 10.244.0.21:3000 34349 0.140 200 c745ad0149b8986e9bc230c84c9f6c4b
I also have tried the solution that recommend with the other pages.but none of them work. What should I do, can anyone advise?