普罗米修斯不是 运行 OpenFaaS

Prometheus not running with OpenFaaS

我刚刚在 Kubernetes 上安装了 OpenFaaS,并且能够部署和调用一个简单的 hello-world 类型的函数(这意味着 OpenFaaS 工作正常)。然而,the guide I am following states that I should then be able to access the Prometheus UI at http://localhost:9090/。单击 link 会导致错误消息:

This site can’t be reached - localhost refused to connect. ERR_CONNECTION_REFUSED

如何在 OpenFaaS 中查看 Prometheus UI?

想通了,你必须先 运行 这个命令: kubectl port-forward deployment/prometheus 9090:9090 -n openfaas

来源:https://github.com/openfaas/workshop/blob/master/lab9.md