Open chuckbelisle opened 2 years ago
You can try this first it may work and is simpler:
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-metrics-reader
rules:
- apiGroups: ["metrics.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["coordination.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: ["monitoring.coreos.com"]
resources: ["*"]
verbs: ["get", "watch", "list"]```
Still not working with latest lens 6.2.6
Same for me, I tried everything. Anyone here for rescue M
For me this works with lens v2023.3.171731-latest:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: some-really-cool-name
rules:
- apiGroups:
- ""
resources:
- "namespaces"
- "nodes"
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- "apiextensions.k8s.io"
resources:
- "customresourcedefinitions"
verbs:
- "get"
- "list"
- "watch"
- apiGroups:
- ""
resources:
- "services/proxy"
resourceNames:
- "prometheus-operated:9090"
verbs:
- "get"
- "list"
- "watch"
- "create"
- "update"
- "patch"
- "delete"
- apiGroups:
- ""
resources:
- services
verbs:
- "list"
probably not the best solution, since the service account can see all services, but sufficient for me. note also: nodes and customresourcedefinitions are optional
Relates to: #1120
View prometheus metrics in Lens, found an issue that has a solution for this: https://github.com/lensapp/lens/issues/3318