默认部署promethues operator后,不能发现不同namespace下的metrics,通过查找修改
promtheus-clusterRole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-k8s
rules:
- apiGroups:
- ""
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- nonResourceURLs:
- /metrics
verbs:
- get
设置grafana的时候开始nginx的老打开不对,最后发现应该是倒入的nginx的模板不对,倒入9614成功