May 2019
Intermediate to advanced
442 pages
11h 36m
English
With the new namespace available, it's time to ensure that all access permissions are in place for the Prometheus Operator, as shown in the next few configuration snippets. The first one defines the ClusterRole:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata: name: prometheus-operatorrules:- apiGroups: [apiextensions.k8s.io] verbs: ['*'] resources: [customresourcedefinitions]- apiGroups: [monitoring.coreos.com] verbs: ['*'] resources: - alertmanagers - prometheuses - servicemonitors...
Then, we apply the ClusterRole to a ClusterRoleBinding:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: prometheus-operatorroleRef: apiGroup: rbac.authorization.k8s.io kind: ...
Read now
Unlock full access