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
<h3id="install-the-victoria-metrics-kubernetes-monitoring-stack">Install the Victoria Metrics Kubernetes monitoring stack<aclass="headerlink" href="#install-the-victoria-metrics-kubernetes-monitoring-stack" title="Permanent link">¶</a></h3>
5283
+
<detailsclass="admonition">
5284
+
<summary>Install on OpenShift</summary>
5285
+
<p>When installing the chart on OpenShift, some components might require additional Security Context Constraints (SCCs), depending on the permissions they need at runtime.</p>
5286
+
<p>The <code>prometheus-node-exporter</code> component runs as a DaemonSet and requires access to host-level resources such as <code>/proc</code>, <code>/sys</code>, and other node-level paths. Because these are exposed through <code>hostPath</code> mounts, the service account used by <code>prometheus-node-exporter</code> must be granted an SCC that allows host access, such as <code>hostaccess</code>, <code>hostmount-anyuid</code>, or a custom SCC with equivalent permissions.</p>
<p>Similarly, for <code>kube-state-metrics</code>, if the <code>restricted</code> 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:</p>
<p>Use the <ahref="https://raw.githubusercontent.com/Percona-Lab/k8s-monitoring/refs/tags/v0.1.2/vm-operator-k8s-stack/quick-install.sh">quick install script</a> 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.</p>
5304
+
<p>Use the <ahref="https://raw.githubusercontent.com/Percona-Lab/k8s-monitoring/refs/tags/v0.1.3/vm-operator-k8s-stack/quick-install.sh">quick install script</a> 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.</p>
5287
5305
<p>Replace the following placeholders with your values:</p>
5288
5306
<ul>
5289
5307
<li><code>PMM-SERVER-TOKEN</code> - The <ahref="https://docs.percona.com/percona-monitoring-and-management/3/api/authentication.html?h=authe#generate-a-service-account-and-token">PMM Server service account token</a></li>
@@ -5300,7 +5318,7 @@ <h3 id="install-the-victoria-metrics-kubernetes-monitoring-stack">Install the Vi
5300
5318
<divclass="tabbed-block">
5301
5319
<p>By default, Prometheus node exporter is not installed with this stack because it requires privileged access to the host system, which may not be desirable in some Kubernetes environments. Also, you may already have a solution in place to scrape and analyze hardware- and kernel-level metrics. </p>
5302
5320
<p>The following command installs the Victoria Metrics Kubernetes monitoring stack without Prometheus node exporter. To install it with the node-exporter, refer to the adjacent tab (“With Prometheus node-exporter”) for instructions.</p>
@@ -5310,7 +5328,7 @@ <h3 id="install-the-victoria-metrics-kubernetes-monitoring-stack">Install the Vi
5310
5328
</div>
5311
5329
<divclass="tabbed-block">
5312
5330
<p>To install Victoria Metrics Kubernetes monitoring stack with the metrics for Nodes, add the <code>--node-exporter-enabled</code> flag as follows:</p>
@@ -5387,8 +5405,8 @@ <h4 id="set-up-authentication-in-pmm-server">Set up authentication in PMM Server
5387
5405
<h4id="create-a-configmap-to-mount-for-kube-state-metrics">Create a ConfigMap to mount for <code>kube-state-metrics</code><aclass="headerlink" href="#create-a-configmap-to-mount-for-kube-state-metrics" title="Permanent link">¶</a></h4>
5388
5406
<p>The <ahref="https://github.com/kubernetes/kube-state-metrics"><code>kube-state-metrics</code> (KSM) <spanclass="twemoji"><svgxmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><pathd="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2m6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.75.75 0 0 1-1.042-.018.75.75 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1"/></svg></span></a> is a simple service that listens to the Kubernetes API server and generates metrics about the state of various objects - Pods, Deployments, Services and Custom Resources.</p>
5389
5407
<p>To define what metrics the <code>kube-state-metrics</code> should capture, create the <ahref="https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-metrics.md#configuration">ConfigMap <spanclass="twemoji"><svgxmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><pathd="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2m6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.75.75 0 0 1-1.042-.018.75.75 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1"/></svg></span></a> and mount it to a container.</p>
<p>As a result, you have the <code>customresource-config-ksm</code> ConfigMap created.</p>
5394
5412
<h4id="install-the-victoria-metrics-kubernetes-monitoring-stack_1">Install the Victoria Metrics Kubernetes monitoring stack<aclass="headerlink" href="#install-the-victoria-metrics-kubernetes-monitoring-stack_1" title="Permanent link">¶</a></h4>
@@ -5412,20 +5430,20 @@ <h4 id="install-the-victoria-metrics-kubernetes-monitoring-stack_1">Install the
5412
5430
<li>
5413
5431
<p>Install the Victoria Metrics Kubernetes monitoring stack Helm chart. You need to specify the following configuration:</p>
5414
5432
<ul>
5415
-
<li>the URL to access the PMM server in the <code>externalVM.write.url</code> option in the format <code><PMM-SERVER-URL>/victoriametrics/api/v1/write</code>. The URL can contain either the IP address or the hostname of the PMM server.</li>
5433
+
<li>the URL to access the PMM server in the <code>external.vm.write.url</code> option is in the format <code><PMM-SERVER-URL>/victoriametrics/api/v1/write</code>. The URL can contain either the IP address or the hostname of the PMM server.</li>
5416
5434
<li>the unique name or an ID of the Kubernetes cluster in the <code>vmagent.spec.externalLabels.k8s_cluster_id</code> option. Ensure to set different values if you are sending metrics from multiple Kubernetes clusters to the same PMM Server. </li>
5417
5435
<li>The Namespace must be the same as the Namespace for the Secret and ConfigMap</li>
<p>To illustrate, say your PMM Server URL is <code>https://pmm-example.com</code>, the cluster ID is <code>test-cluster</code> and the Namespace is <code>monitoring-system</code>. Then the command would look like this:</p>
@@ -5511,12 +5529,12 @@ <h2 id="uninstall-victoria-metrics-kubernetes-stack">Uninstall Victoria metrics
5511
5529
<divclass="tabbed-content">
5512
5530
<divclass="tabbed-block">
5513
5531
<p>Replace the <code><NAMESPACE></code> placeholder with the namespace you specified during the Victoria metrics Kubernetes stack installation: </p>
<p>Replace the <code><NAMESPACE></code> placeholder with the namespace you specified during the Victoria metrics Kubernetes stack installation: </p>
0 commit comments