You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📖 describe need of RBAC permissions to allow Prometheus Operator to have access to the metrics (#2827)
* Describe the need of RBAC permissions to allow Prometheus Operator to have access to the metrics
Signed-off-by: João Vilaça <[email protected]>
* Apply suggestions from code review
Co-authored-by: Aldo Culquicondor <[email protected]>
Co-authored-by: Aldo Culquicondor <[email protected]>
Copy file name to clipboardExpand all lines: docs/book/src/reference/metrics.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ Follow the steps below to export the metrics using the Prometheus Operator:
51
51
We recommend using [kube-prometheus](https://github.com/coreos/kube-prometheus#installing)
52
52
in production if you don't have your own monitoring system.
53
53
If you are just experimenting, you can only install Prometheus and Prometheus Operator.
54
+
54
55
2. Uncomment the line `- ../prometheus` in the `config/default/kustomization.yaml`.
55
56
It creates the `ServiceMonitor` resource which enables exporting the metrics.
56
57
@@ -69,6 +70,20 @@ NAME AGE
69
70
monitor-controller-manager-metrics-monitor 2m8s
70
71
```
71
72
73
+
<aside class="warning">
74
+
<h2>If you are using Prometheus Operator ensure that you have the required
75
+
permissions</h2>
76
+
77
+
If you are using Prometheus Operator, be aware that, by default, its RBAC
78
+
rules are only enabled for the `default` and `kube-system namespaces`. See its
79
+
guide to know [how to configure kube-prometheus to monitor other namespaces using the `.jsonnet` file](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/monitoring-other-namespaces.md).
80
+
81
+
Alternatively, you can give the Prometheus Operator permissions to monitor other namespaces using RBAC. See the Prometheus Operator
82
+
[Enable RBAC rules for Prometheus pods](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#enable-rbac-rules-for-prometheus-pods)
83
+
documentation to know how to enable the permissions on the namespace where the
84
+
`ServiceMonitor`and manager exist.
85
+
</aside>
86
+
72
87
Also, notice that the metrics are exported by default through port `8443`. In this way,
73
88
you are able to check the Prometheus metrics in its dashboard. To verify it, search
74
89
for the metrics exported from the namespace where the project is running
0 commit comments