问题现象:

k8s安装prometheus(sealos)解决grafana连接prometheus报错的问题:HTTP Error Bad Gateway_配置使用

解决办法:

配置使用iptables做转发,即可。

k8s安装prometheus(sealos)解决grafana连接prometheus报错的问题:HTTP Error Bad Gateway_配置使用_02

重新apply以后就正常:

[root@k8s-n0 prometheus]# ll
总用量 1153616
-rwxr-xr-x. 1 1001 115 592 10月 27 2019 config
-rwxr-xr-x. 1 1001 115 686704640 10月 27 2019 images.tar
-rwxr-xr-x. 1 1001 115 246601258 10月 27 2019 images.tar.gz
drwxr-xr-x. 2 1001 115 4096 10月 27 2019 manifests
-rw-r--r--. 1 root root 247982080 1月 7 15:34 prometheus.tar
[root@k8s-n0 prometheus]# sudo kubectl apply -f manifests/

k8s安装prometheus(sealos)解决grafana连接prometheus报错的问题:HTTP Error Bad Gateway_配置使用_03

参考连接:

https://www.sealyun.com/instructions