Files
kubernetes/metrics/metrics.yaml
Dustin C. Hatch 5208902706 metrics: Add role to allow anon access to metrics
By default, the Kubernetes metrics endpoints are restricted.  I don't
think they're worth protecting with authentication, so I've added a
cluster role/binding to allow anonymous access to them.
2022-11-05 16:23:02 -05:00

30 lines
511 B
YAML

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups: ['']
resources:
- nodes/metrics
verbs:
- get
- nonResourceURLs:
- /metrics
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:anonymous