无法获取Grafana掌舵图URL来使用子路径 [英] Unable to get a Grafana helm-charts URL to work with subpath
问题描述
我正在使用舵图在本地kube集群上设置Grafana服务器.我试图使其在子路径上工作,以便稍后在具有tls的生产环境中实现它,但是我无法在 http://localhost:3000/grafana .
我已经尝试了Internet上所有关于向入口添加子路径的所有建议,但似乎没有任何效果.
当我删除root_url时, http://localhost:3000/上显示Grafana登录屏幕: http://localhost:3000/grafana
但是当我添加root_url时: http://localhost:3000/grafana 回到values.yaml文件我看到下面附有该错误(在本博文末尾).
root_url: http://localhost:3000/grafana and ingress as:
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
labels: {}
path: /grafana
hosts:
- localhost
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
我希望 http://localhost:3000/grafana 网址向我显示登录屏幕,而不是看到以下错误:
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
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
您能帮我修复values.yaml上的入口和root_url,以使Grafana URL在/grafana上工作吗?
在检查文档时,配置Proxy 后面的grafana,root_url
应该在[server]
部分下的grafana.ini
文件中进行配置.您可以修改您的values.yaml
来实现.
grafana.ini:
...
server:
root_url: http://localhost:3000/grafana/
此外,您对值的输入应如下所示.
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
labels: {}
path: /grafana/
hosts:
- ""
希望它会有所帮助.
I am setting up a Grafana server on my local kube cluster using helm-charts. I am trying to get it to work on a subpath in order to implement it on a production env with tls later on, but I am unable to access Grafana on http://localhost:3000/grafana.
I have tried all most all the recommendations out there on the internet about adding a subpath to ingress, but nothing seems to work.
The Grafana login screen shows up on http://localhost:3000/ when I remove root_url: http://localhost:3000/grafana from Values.yaml
But when I add root_url: http://localhost:3000/grafana back into values.yaml file I see the error attached below (towards the end of this post).
root_url: http://localhost:3000/grafana and ingress as:
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
labels: {}
path: /grafana
hosts:
- localhost
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
I expect the http://localhost:3000/grafana url to show me the login screen instead i see the below errors:
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
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
Can you please help me fix the ingress and root_url on values.yaml to get Grafana URL working at /grafana ?
As you check documentation for Configuring grafana behind Proxy, root_url
should be configured in grafana.ini
file under [server]
section. You can modify your values.yaml
to achieve this.
grafana.ini:
...
server:
root_url: http://localhost:3000/grafana/
Also your ingress in values should look like this.
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
labels: {}
path: /grafana/
hosts:
- ""
Hope it helps.
这篇关于无法获取Grafana掌舵图URL来使用子路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!