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
Copy file name to clipboardExpand all lines: docs/monitor-kubernetes.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,32 @@ To set up monitoring of Kubernetes, you need the following:
28
28
29
29
### Install the Victoria Metrics Kubernetes monitoring stack
30
30
31
+
??? admonition "Install on OpenShift"
32
+
33
+
When installing the chart on OpenShift, some components might require additional Security Context Constraints (SCCs), depending on the permissions they need at runtime.
34
+
35
+
The `prometheus-node-exporter` component runs as a DaemonSet and requires access to host-level resources such as `/proc`, `/sys`, and other node-level paths. Because these are exposed through `hostPath` mounts, the service account used by `prometheus-node-exporter` must be granted an SCC that allows host access, such as `hostaccess`, `hostmount-anyuid`, or a custom SCC with equivalent permissions.
36
+
37
+
For example:
38
+
39
+
```bash
40
+
oc adm policy add-scc-to-user node-exporter \
41
+
-z prometheus-node-exporter \
42
+
-n <namespace>
43
+
```
44
+
45
+
Similarly, for `kube-state-metrics`, if the `restricted` SCC is enforced, avoid setting fixed user, group, or filesystem group IDs. Allow OpenShift to assign these values from the namespace UID/GID range by either adding the service account to the required SCC or by adding the following entries to the values YAML file:
46
+
47
+
```yaml
48
+
kube-state-metrics:
49
+
securityContext:
50
+
runAsUser: null
51
+
runAsGroup: null
52
+
fsGroup: null
53
+
```
54
+
55
+
Next, follow the steps to install Victoria Metrics Kubernetes Monitoring stack.
56
+
31
57
=== ":material-run-fast: Quick install"
32
58
33
59
Use the [quick install script](https://raw.githubusercontent.com/Percona-Lab/k8s-monitoring/refs/tags/{{k8s_monitor_tag}}/vm-operator-k8s-stack/quick-install.sh) and the set of flags that describe your PMM Server and Kubernetes environment to install Victoria Metrics Kubernetes monitoring stack with a single command. The script installs Victoria Metrics Kubernetes monitoring stack with default parameters.
@@ -174,14 +200,14 @@ To set up monitoring of Kubernetes, you need the following:
174
200
175
201
8. Install the Victoria Metrics Kubernetes monitoring stack Helm chart. You need to specify the following configuration:
176
202
177
-
* the URL to access the PMM server in the `externalVM.write.url` option in the format `<PMM-SERVER-URL>/victoriametrics/api/v1/write`. The URL can contain either the IP address or the hostname of the PMM server.
203
+
* the URL to access the PMM server in the `external.vm.write.url` option is in the format `<PMM-SERVER-URL>/victoriametrics/api/v1/write`. The URL can contain either the IP address or the hostname of the PMM server.
178
204
* the unique name or an ID of the Kubernetes cluster in the `vmagent.spec.externalLabels.k8s_cluster_id` option. Ensure to set different values if you are sending metrics from multiple Kubernetes clusters to the same PMM Server.
179
205
* The Namespace must be the same as the Namespace for the Secret and ConfigMap
0 commit comments