Type: application Version: 0.13.7 Artifact Hub Slack

Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus

Prerequisites #

  • Install the follow packages: git, kubectl, helm, helm-docs. See this tutorial.

  • PV support on underlying infrastructure

Chart Details #

Note: this chart installs VictoriaMetrics cluster components such as vminsert, vmselect and vmstorage. It doesn’t create or configure metrics scraping. If you are looking for a chart to configure monitoring stack in cluster check out victoria-metrics-k8s-stack chart.

How to install #

Access a Kubernetes cluster.

Setup chart repository (can be omitted for OCI repositories) #

Add a chart helm repository with follow commands:

helm repo add vm https://victoriametrics.github.io/helm-charts/

helm repo update

List versions of vm/victoria-metrics-cluster chart available to installation:

helm search repo vm/victoria-metrics-cluster -l

Install victoria-metrics-cluster chart #

Export default values of victoria-metrics-cluster chart to file values.yaml:

  • For HTTPS repository

    helm show values vm/victoria-metrics-cluster > values.yaml
    
  • For OCI repository

    helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-cluster > values.yaml
    

Change the values according to the need of the environment in values.yaml file.

Test the installation with command:

  • For HTTPS repository

    helm install vmc vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE --debug --dry-run
    
  • For OCI repository

    helm install vmc oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-cluster -f values.yaml -n NAMESPACE --debug --dry-run
    

Install chart with command:

  • For HTTPS repository

    helm install vmc vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE
    
  • For OCI repository

    helm install vmc oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-cluster -f values.yaml -n NAMESPACE
    

Get the pods lists by running this commands:

kubectl get pods -A | grep 'vmc'

Get the application by running this command:

helm list -f vmc -n NAMESPACE

See the history of versions of vmc application with command.

helm history vmc -n NAMESPACE

How to uninstall #

Remove application with command.

helm uninstall vmc -n NAMESPACE

Documentation of Helm Chart #

Install helm-docs following the instructions on this tutorial.

Generate docs with helm-docs command.

cd charts/victoria-metrics-cluster

helm-docs

The markdown generation is entirely go template driven. The tool parses metadata from charts and generates a number of sub-templates that can be referenced in a template file (by default README.md.gotmpl). If no template file is provided, the tool has a default internal template that will generate a reasonably formatted README.

Parameters #

The following tables lists the configurable parameters of the chart and their default values.

Change the values according to the need of the environment in victoria-metrics-cluster/values.yaml file.

KeyTypeDefaultDescription
clusterDomainSuffixstring
cluster.local

k8s cluster domain suffix, uses for building storage pods’ FQDN. Details are here

extraObjectslist
[]

Add extra specs dynamically to this chart

extraSecretslist
[]
global.compatibility.openshift.adaptSecurityContextstring
auto
global.image.registrystring
""
global.imagePullSecretslist
[]
licenseobject
key: ""
secret:
    key: ""
    name: ""

Enterprise license key configuration for VictoriaMetrics enterprise. Required only for VictoriaMetrics enterprise. Documentation - https://docs.victoriametrics.com/enterprise, for more information, visit https://victoriametrics.com/products/enterprise/ . To request a trial license, go to https://victoriametrics.com/products/enterprise/trial/ Supported starting from VictoriaMetrics v1.94.0

license.keystring
""

License key

license.secretobject
key: ""
name: ""

Use existing secret with license key

license.secret.keystring
""

Key in secret with license key

license.secret.namestring
""

Existing secret name

printNotesbool
true
rbac.createbool
true
rbac.extraLabelsobject
{}
rbac.namespacedbool
false
serviceAccount.automountTokenbool
true
serviceAccount.createbool
true
serviceAccount.extraLabelsobject
{}
vminsert.affinityobject
{}

Pod affinity

vminsert.annotationsobject
{}
vminsert.automountServiceAccountTokenbool
true
vminsert.containerWorkingDirstring
""

Container workdir

vminsert.enabledbool
true

Enable deployment of vminsert component. Deployment is used

vminsert.envlist
[]

Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables

vminsert.envFromlist
[]
vminsert.extraArgs."envflag.enable"string
"true"
vminsert.extraArgs."envflag.prefix"string
VM_
vminsert.extraArgs.loggerFormatstring
json
vminsert.extraContainerslist
[]
vminsert.extraLabelsobject
{}
vminsert.extraVolumeMountslist
[]
vminsert.extraVolumeslist
[]
vminsert.fullnameOverridestring
""

Overrides the full name of vminsert component

vminsert.horizontalPodAutoscaler.behaviorobject
{}

Behavior settings for scaling by the HPA

vminsert.horizontalPodAutoscaler.enabledbool
false

Use HPA for vminsert component

vminsert.horizontalPodAutoscaler.maxReplicasint
10

Maximum replicas for HPA to use to to scale the vminsert component

vminsert.horizontalPodAutoscaler.metricslist
[]

Metric for HPA to use to scale the vminsert component

vminsert.horizontalPodAutoscaler.minReplicasint
2

Minimum replicas for HPA to use to scale the vminsert component

vminsert.image.pullPolicystring
IfNotPresent

Image pull policy

vminsert.image.registrystring
""

Image registry

vminsert.image.repositorystring
victoriametrics/vminsert

Image repository

vminsert.image.tagstring
""

Image tag override Chart.AppVersion

vminsert.image.variantstring
cluster
vminsert.ingress.annotationsobject
{}

Ingress annotations

vminsert.ingress.enabledbool
false

Enable deployment of ingress for vminsert component

vminsert.ingress.extraLabelsobject
{}
vminsert.ingress.hostslist
[]

Array of host objects

vminsert.ingress.pathTypestring
Prefix

pathType is only for k8s >= 1.1=

vminsert.ingress.tlslist
[]

Array of TLS objects

vminsert.initContainerslist
[]
vminsert.namestring
vminsert

vminsert container name

vminsert.nodeSelectorobject
{}

Pod’s node selector. Details are here

vminsert.podAnnotationsobject
{}

Pod’s annotations

vminsert.podDisruptionBudget.enabledbool
false

See kubectl explain poddisruptionbudget.spec for more. Details are here

vminsert.podDisruptionBudget.labelsobject
{}
vminsert.podLabelsobject
{}
vminsert.podSecurityContext.enabledbool
false
vminsert.ports.namestring
http
vminsert.priorityClassNamestring
""

Name of Priority Class

vminsert.probe.livenessobject
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 15
tcpSocket: {}
timeoutSeconds: 5

vminsert liveness probe

vminsert.probe.readinessobject
failureThreshold: 3
httpGet: {}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

vminsert readiness probe

vminsert.probe.startupobject
{}

vminsert startup probe

vminsert.replicaCountint
2

Count of vminsert pods

vminsert.resourcesobject
{}

Resource object

vminsert.securityContextobject
enabled: false

Pod’s security context. Details are here

vminsert.service.annotationsobject
{}

Service annotations

vminsert.service.clusterIPstring
""

Service ClusterIP

vminsert.service.externalIPslist
[]

Service External IPs. Details are here

vminsert.service.externalTrafficPolicystring
""
vminsert.service.extraPortslist
[]

Extra service ports

vminsert.service.healthCheckNodePortstring
""
vminsert.service.ipFamilieslist
[]
vminsert.service.ipFamilyPolicystring
""
vminsert.service.labelsobject
{}

Service labels

vminsert.service.loadBalancerIPstring
""

Service load balancer IP

vminsert.service.loadBalancerSourceRangeslist
[]

Load balancer source range

vminsert.service.servicePortint
8480

Service port

vminsert.service.targetPortstring
http

Target port

vminsert.service.typestring
ClusterIP

Service type

vminsert.service.udpbool
false

Make sure that service is not type “LoadBalancer”, as it requires “MixedProtocolLBService” feature gate. ref: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/

vminsert.serviceMonitor.annotationsobject
{}

Service Monitor annotations

vminsert.serviceMonitor.basicAuthobject
{}

Basic auth params for Service Monitor

vminsert.serviceMonitor.enabledbool
false

Enable deployment of Service Monitor for vminsert component. This is Prometheus operator object

vminsert.serviceMonitor.extraLabelsobject
{}

Service Monitor labels

vminsert.serviceMonitor.metricRelabelingslist
[]

Service Monitor metricRelabelings

vminsert.serviceMonitor.namespacestring
""

Target namespace of ServiceMonitor manifest

vminsert.serviceMonitor.relabelingslist
[]

Service Monitor relabelings

vminsert.strategyobject
{}
vminsert.suppressStorageFQDNsRenderbool
false

Suppress rendering --storageNode FQDNs based on vmstorage.replicaCount value. If true suppress rendering --storageNodes, they can be re-defined in extraArgs

vminsert.tolerationslist
[]

Array of tolerations object. Details are here

vminsert.topologySpreadConstraintslist
[]

Pod topologySpreadConstraints

vmselect.affinityobject
{}

Pod affinity

vmselect.annotationsobject
{}
vmselect.automountServiceAccountTokenbool
true
vmselect.cacheMountPathstring
/cache

Cache root folder

vmselect.containerWorkingDirstring
""

Container workdir

vmselect.emptyDirobject
{}
vmselect.enabledbool
true

Enable deployment of vmselect component. Can be deployed as Deployment(default) or StatefulSet

vmselect.envlist
[]

Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables

vmselect.envFromlist
[]
vmselect.extraArgs."envflag.enable"bool
true
vmselect.extraArgs."envflag.prefix"string
VM_
vmselect.extraArgs.loggerFormatstring
json
vmselect.extraContainerslist
[]
vmselect.extraHostPathMountslist
[]

Additional hostPath mounts

vmselect.extraLabelsobject
{}
vmselect.extraVolumeMountslist
[]

Extra Volume Mounts for the container

vmselect.extraVolumeslist
[]

Extra Volumes for the pod

vmselect.fullnameOverridestring
""

Overrides the full name of vmselect component

vmselect.horizontalPodAutoscaler.behaviorobject
{}

Behavior settings for scaling by the HPA

vmselect.horizontalPodAutoscaler.enabledbool
false

Use HPA for vmselect component

vmselect.horizontalPodAutoscaler.maxReplicasint
10

Maximum replicas for HPA to use to to scale the vmselect component

vmselect.horizontalPodAutoscaler.metricslist
[]

Metric for HPA to use to scale the vmselect component

vmselect.horizontalPodAutoscaler.minReplicasint
2

Minimum replicas for HPA to use to scale the vmselect component

vmselect.image.pullPolicystring
IfNotPresent

Image pull policy

vmselect.image.registrystring
""

Image registry

vmselect.image.repositorystring
victoriametrics/vmselect

Image repository

vmselect.image.tagstring
""

Image tag override Chart.AppVersion

vmselect.image.variantstring
cluster
vmselect.ingress.annotationsobject
{}

Ingress annotations

vmselect.ingress.enabledbool
false

Enable deployment of ingress for vmselect component

vmselect.ingress.extraLabelsobject
{}
vmselect.ingress.hostslist
[]

Array of host objects

vmselect.ingress.pathTypestring
Prefix

pathType is only for k8s >= 1.1=

vmselect.ingress.tlslist
[]

Array of TLS objects

vmselect.initContainerslist
[]
vmselect.namestring
vmselect

Vmselect container name

vmselect.nodeSelectorobject
{}

Pod’s node selector. Details are here

vmselect.persistentVolume.accessModeslist
- ReadWriteOnce

Array of access mode. Must match those of existing PV or dynamic provisioner. Details are here

vmselect.persistentVolume.annotationsobject
{}

Persistent volume annotations

vmselect.persistentVolume.enabledbool
false

Create/use Persistent Volume Claim for vmselect component. Empty dir if false. If true, vmselect will create/use a Persistent Volume Claim

vmselect.persistentVolume.existingClaimstring
""

Existing Claim name. Requires vmselect.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound

vmselect.persistentVolume.labelsobject
{}

Persistent volume labels

vmselect.persistentVolume.sizestring
2Gi

Size of the volume. Better to set the same as resource limit memory property

vmselect.persistentVolume.subPathstring
""

Mount subpath

vmselect.podAnnotationsobject
{}

Pod’s annotations

vmselect.podDisruptionBudget.enabledbool
false

See kubectl explain poddisruptionbudget.spec for more. Details are here

vmselect.podDisruptionBudget.labelsobject
{}
vmselect.podLabelsobject
{}
vmselect.podSecurityContext.enabledbool
true
vmselect.ports.namestring
http
vmselect.priorityClassNamestring
""

Name of Priority Class

vmselect.probe.livenessobject
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 15
tcpSocket: {}
timeoutSeconds: 5

vmselect liveness probe

vmselect.probe.readinessobject
failureThreshold: 3
httpGet: {}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

vmselect readiness probe

vmselect.probe.startupobject
{}

vmselect startup probe

vmselect.replicaCountint
2

Count of vmselect pods

vmselect.resourcesobject
{}

Resource object

vmselect.securityContextobject
enabled: true

Pod’s security context. Details are here

vmselect.service.annotationsobject
{}

Service annotations

vmselect.service.clusterIPstring
""

Service ClusterIP

vmselect.service.externalIPslist
[]

Service External IPs. Details are here

vmselect.service.externalTrafficPolicystring
""
vmselect.service.extraPortslist
[]

Extra service ports

vmselect.service.healthCheckNodePortstring
""
vmselect.service.ipFamilieslist
[]
vmselect.service.ipFamilyPolicystring
""
vmselect.service.labelsobject
{}

Service labels

vmselect.service.loadBalancerIPstring
""

Service load balacner IP

vmselect.service.loadBalancerSourceRangeslist
[]

Load balancer source range

vmselect.service.servicePortint
8481

Service port

vmselect.service.targetPortstring
http

Target port

vmselect.service.typestring
ClusterIP

Service type

vmselect.serviceMonitor.annotationsobject
{}

Service Monitor annotations

vmselect.serviceMonitor.basicAuthobject
{}

Basic auth params for Service Monitor

vmselect.serviceMonitor.enabledbool
false

Enable deployment of Service Monitor for vmselect component. This is Prometheus operator object

vmselect.serviceMonitor.extraLabelsobject
{}

Service Monitor labels

vmselect.serviceMonitor.metricRelabelingslist
[]

Service Monitor metricRelabelings

vmselect.serviceMonitor.namespacestring
""

Target namespace of ServiceMonitor manifest

vmselect.serviceMonitor.relabelingslist
[]

Service Monitor relabelings

vmselect.statefulSet.enabledbool
false

Deploy StatefulSet instead of Deployment for vmselect. Useful if you want to keep cache data.

vmselect.statefulSet.podManagementPolicystring
OrderedReady

Deploy order policy for StatefulSet pods

vmselect.strategyobject
{}
vmselect.suppressStorageFQDNsRenderbool
false

Suppress rendering --storageNode FQDNs based on vmstorage.replicaCount value. If true suppress rendering --storageNodes, they can be re-defined in extraArgs

vmselect.tolerationslist
[]

Array of tolerations object. Details are here

vmselect.topologySpreadConstraintslist
[]

Pod topologySpreadConstraints

vmstorage.affinityobject
{}

Pod affinity

vmstorage.annotationsobject
{}
vmstorage.automountServiceAccountTokenbool
true
vmstorage.containerWorkingDirstring
""

Container workdir

vmstorage.emptyDirobject
{}

Use an alternate scheduler, e.g. “stork”. ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ schedulerName:

vmstorage.enabledbool
true

Enable deployment of vmstorage component. StatefulSet is used

vmstorage.envlist
[]

Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables

vmstorage.envFromlist
[]
vmstorage.extraArgs."envflag.enable"string
"true"
vmstorage.extraArgs."envflag.prefix"string
VM_
vmstorage.extraArgs.loggerFormatstring
json
vmstorage.extraContainerslist
[]
vmstorage.extraHostPathMountslist
[]

Additional hostPath mounts

vmstorage.extraLabelsobject
{}
vmstorage.extraSecretMountslist
[]
vmstorage.extraVolumeMountslist
[]

Extra Volume Mounts for the container

vmstorage.extraVolumeslist
[]

Extra Volumes for the pod

vmstorage.fullnameOverridestring
null

Overrides the full name of vmstorage component

vmstorage.image.pullPolicystring
IfNotPresent

Image pull policy

vmstorage.image.registrystring
""

Image registry

vmstorage.image.repositorystring
victoriametrics/vmstorage

Image repository

vmstorage.image.tagstring
""

Image tag override Chart.AppVersion

vmstorage.image.variantstring
cluster
vmstorage.initContainerslist
[]
vmstorage.namestring
vmstorage

vmstorage container name

vmstorage.nodeSelectorobject
{}

Pod’s node selector. Details are here

vmstorage.persistentVolume.accessModeslist
- ReadWriteOnce

Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here

vmstorage.persistentVolume.annotationsobject
{}

Persistent volume annotations

vmstorage.persistentVolume.enabledbool
true

Create/use Persistent Volume Claim for vmstorage component. Empty dir if false. If true, vmstorage will create/use a Persistent Volume Claim

vmstorage.persistentVolume.existingClaimstring
""

Existing Claim name. Requires vmstorage.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound

vmstorage.persistentVolume.labelsobject
{}

Persistent volume labels

vmstorage.persistentVolume.mountPathstring
/storage

Data root path. Vmstorage data Persistent Volume mount root path

vmstorage.persistentVolume.namestring
vmstorage-volume
vmstorage.persistentVolume.sizestring
8Gi

Size of the volume.

vmstorage.persistentVolume.storageClassNamestring
""

Storage class name. Will be empty if not setted

vmstorage.persistentVolume.subPathstring
""

Mount subpath

vmstorage.podAnnotationsobject
{}

Pod’s annotations

vmstorage.podDisruptionBudgetobject
enabled: false
labels: {}

See kubectl explain poddisruptionbudget.spec for more. Details are here

vmstorage.podLabelsobject
{}
vmstorage.podManagementPolicystring
OrderedReady

Deploy order policy for StatefulSet pods

vmstorage.podSecurityContext.enabledbool
false
vmstorage.ports.namestring
http
vmstorage.priorityClassNamestring
""

Name of Priority Class

vmstorage.probe.livenessobject
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket: {}
timeoutSeconds: 5

vmstorage liveness probe

vmstorage.probe.readinessobject
failureThreshold: 3
httpGet: {}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

vmstorage readiness probe

vmstorage.probe.startupobject
{}

vmstorage startup probe

vmstorage.replicaCountint
2

Count of vmstorage pods

vmstorage.resourcesobject
{}

Resource object. Details are here

vmstorage.retentionPeriodint
1

Data retention period. Supported values 1w, 1d, number without measurement means month, e.g. 2 = 2month

vmstorage.securityContextobject
enabled: false

Pod’s security context. Details are here

vmstorage.service.annotationsobject
{}

Service annotations

vmstorage.service.externalTrafficPolicystring
""
vmstorage.service.extraPortslist
[]

Extra service ports

vmstorage.service.healthCheckNodePortstring
""
vmstorage.service.ipFamilieslist
[]
vmstorage.service.ipFamilyPolicystring
""
vmstorage.service.labelsobject
{}

Service labels

vmstorage.service.servicePortint
8482

Service port

vmstorage.service.vminsertPortint
8400

Port for accepting connections from vminsert

vmstorage.service.vmselectPortint
8401

Port for accepting connections from vmselect

vmstorage.serviceMonitor.annotationsobject
{}

Service Monitor annotations

vmstorage.serviceMonitor.basicAuthobject
{}

Basic auth params for Service Monitor

vmstorage.serviceMonitor.enabledbool
false

Enable deployment of Service Monitor for vmstorage component. This is Prometheus operator object

vmstorage.serviceMonitor.extraLabelsobject
{}

Service Monitor labels

vmstorage.serviceMonitor.metricRelabelingslist
[]

Service Monitor metricRelabelings

vmstorage.serviceMonitor.namespacestring
""

Target namespace of ServiceMonitor manifest

vmstorage.serviceMonitor.relabelingslist
[]

Service Monitor relabelings

vmstorage.terminationGracePeriodSecondsint
60

Pod’s termination grace period in seconds

vmstorage.tolerationslist
[]

Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Details are here #

vmstorage.topologySpreadConstraintslist
[]

Pod topologySpreadConstraints

vmstorage.vmbackupmanager.destinationstring
""

backup destination at S3, GCS or local filesystem. Pod name will be included to path!

vmstorage.vmbackupmanager.disableDailybool
false

disable daily backups

vmstorage.vmbackupmanager.disableHourlybool
false

disable hourly backups

vmstorage.vmbackupmanager.disableMonthlybool
false

disable monthly backups

vmstorage.vmbackupmanager.disableWeeklybool
false

disable weekly backups

vmstorage.vmbackupmanager.enabledbool
false

enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages

vmstorage.vmbackupmanager.envlist
[]

Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables

vmstorage.vmbackupmanager.extraArgs."envflag.enable"string
"true"
vmstorage.vmbackupmanager.extraArgs."envflag.prefix"string
VM_
vmstorage.vmbackupmanager.extraArgs.loggerFormatstring
json
vmstorage.vmbackupmanager.extraSecretMountslist
[]
vmstorage.vmbackupmanager.image.registrystring
""

vmbackupmanager image registry

vmstorage.vmbackupmanager.image.repositorystring
victoriametrics/vmbackupmanager

vmbackupmanager image repository

vmstorage.vmbackupmanager.image.tagstring
""

vmbackupmanager image tag override Chart.AppVersion

vmstorage.vmbackupmanager.image.variantstring
cluster
vmstorage.vmbackupmanager.probe.livenessobject
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket:
    port: manager-http
timeoutSeconds: 5

vmbackupmanager liveness probe

vmstorage.vmbackupmanager.probe.readinessobject
failureThreshold: 3
httpGet:
    port: manager-http
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

vmbackupmanager readiness probe

vmstorage.vmbackupmanager.probe.startupobject
{}

vmbackupmanager startup probe

vmstorage.vmbackupmanager.resourcesobject
{}
vmstorage.vmbackupmanager.restoreobject
onStart:
    enabled: false

Allows to enable restore options for pod. Read more: https://docs.victoriametrics.com/vmbackupmanager#restore-commands

vmstorage.vmbackupmanager.retentionobject
keepLastDaily: 2
keepLastHourly: 2
keepLastMonthly: 2
keepLastWeekly: 2

backups’ retention settings

vmstorage.vmbackupmanager.retention.keepLastDailyint
2

keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off

vmstorage.vmbackupmanager.retention.keepLastHourlyint
2

keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off

vmstorage.vmbackupmanager.retention.keepLastMonthlyint
2

keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off

vmstorage.vmbackupmanager.retention.keepLastWeeklyint
2

keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off