Fetch K8s Metrics on Vanilla Cluster

This page explains how to fetch Kubernetes metrics on a vanilla cluster using VictoriaMetrics, along with the optional installation of:

  • Prometheus Node Exporter
  • kube-state-metrics

It also covers configuring vmagent to push metrics to a remote VictoriaMetrics database.

Prerequisites

  • A running Kubernetes cluster
  • Helm installed and configured

Step 1: Add VictoriaMetrics Helm Repository

Add the Helm repository:

Bash
Copy

Update the repository:

Bash
Copy

Step 2: Configure Values File

Update the values_vmdb.yaml file with the following configuration:

Bash
Copy
  • Replace VMDBSERVER with your VictoriaMetrics server hostname.
  • Replace CLUSTERHASH with your cluster identifier.
  • If you already have Node Exporter or Kube-State-Metrics deployed, update the vmagent relabel configs to point to existing services instead of enabling new ones.

Step 3: Install the Stack

Deploy the VictoriaMetrics Kubernetes stack:

Bash
Copy

This installation includes:

  • VictoriaMetrics Operator
  • vmagent
  • Node Exporter (optional)
  • Kube-State-Metrics (optional)

Deploy vmagent only (Without Helm)

If you already have:

  • Prometheus Node Exporter
  • kube-state-metrics

Running in your cluster, you do not need to install the full VictoriaMetrics stack via Helm.

Instead, deploy only vmagent using Kubernetes manifests. Edit the configuration accordingly.

Summary

This setup enables:

  • Collection of node-level and cluster-level metrics
  • Remote write to VictoriaMetrics backend
  • Flexible integration with existing monitoring components
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard