[在不同的论坛上有很多关于此的文章,但是仍然没有找到简单直接的答案。
我想通过prometheus-operator在名为development
和production
的命名空间中监视Kubernetes集群上运行的几个应用程序。
使用的安装命令(根据Github)是:
helm install prometheus-operator stable/prometheus-operator -n production --set prometheusOperator.enabled=true,prometheus.service.type=NodePort,prometheusOperator.service.type=NodePort,alertmanager.service.type=NodePort,grafana.service.type=NodePort,grafana.service.nodePort=30906
我需要在上述命令中添加哪些参数才能使prometheus-operator
发现并监视在所有namespaces
中运行的所有应用/服务/吊舱?
[使用此选项,Service Discovery
仅显示一些与prometheus-operator
相关的services
,但不显示我正在'生产'名称空间中运行的应用程序,即使prometheus-operator
已安装在同一namespace
中。
我想念的东西吗?
注意-我正在使用同一用户(使用$HOME/.kube/config file
)执行所有操作,因此我认为权限不是问题。
kubectl版本-v1.17.3头盔版本-3.1.2
不好,但是您可以创建新的名称空间来进行监视并在该位置安装prometheus,这将可以很好地管理与监视有关的事情。
helm install prometheus-operator stable/prometheus-operator -n monitoring