1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-13 15:56:28 +00:00
prometheus-operator/contrib/kube-prometheus/experimental/metrics-server/metrics-server-cluster-role.yaml
Saverio Proto aff318edea metrics-server: enable access to nodes/stats
Without this access the logs of metrics-server will show the following error line:
```
unable to fully scrape metrics from source kubelet_summary:k8s-1: unable to fetch metrics from Kubelet k8s-1 (10.8.10.14): request failed - "403 Forbidden", response: "Forbidden (user=system:serviceaccount:kube-system:metrics-server, verb=get, resource=nodes, subresource=stats)",
```
and `kubectl top nodes` will give no results
2018-07-24 12:58:40 +02:00

24 lines
320 B
YAML

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- nodes/stats
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- "extensions"
resources:
- deployments
verbs:
- get
- list
- watch