The VictoriaLogs cluster Helm chart deploys VictoriaLogs cluster database in Kubernetes. It optionally includes log collector for automatic collection of logs from Kubernetes containers and forwarding them to the deployed VictoriaLogs database.
Prerequisites #
Before installing this chart, ensure your environment meets the following requirements:
- Kubernetes cluster - A running Kubernetes cluster with sufficient resources
- Helm - Helm package manager installed and configured
Additional requirements depend on your configuration:
- Persistent storage - Required if you enable persistent volumes for data retention (enabled by default)
- kubectl - Needed for cluster management and troubleshooting
For installation instructions, refer to the official documentation:
Chart Details #
VictoriaLogs Cluster #
The chart deploys VictoriaLogs cluster database. It deploys the following components according to VictoriaLogs cluster architecture :
vlstorage
stores the ingested logs to the configured persistent volumesvlinsert
receives incoming logs and spreads them evenly acrossvlstorage
nodesvlselect
provides API for querying the ingested logs
It is possible to deploy an optional log collector, which will automatically discover and collect
all the logs from all the containers in Kubernetes, and send them to the deployed VictoriaLogs database.
Set vector.enabled: true
in the configs in order to enable the collector:
vector:
enabled: true
The default chart setup is shown below:
graph LR Vector["Log Collector"] --> VLI1["vlinsert-1"] Vector --> VLI2["vlinsert-2"] subgraph "VictoriaLogs Cluster" VLI1 --> VLS1["vlstorage-1"] VLI1 --> VLS2["vlstorage-2"] VLI2 --> VLS1 VLI2 --> VLS2 VLS1 <--> VLQ1["vlselect-1"] VLS1 <--> VLQ2["vlselect-2"] VLS2 <--> VLQ1 VLS2 <--> VLQ2 end VLQ1 <--> Users["Users/Grafana/vlogscli"] VLQ2 <--> Users
vmauth #
When you enable vmauth
with:
vmauth:
enabled: true
The chart launches an
vmauth
service
for proxying and load-balancing incoming data ingestion requests to vlinsert
nodes and for proxying and load-balancing incoming queries to vlselect
nodes.
The default Vector configuration bypasses vmauth
and continues sending logs directly to vlinsert
. So, the chart can now be thought of as:
graph LR Vector["Log Collector"] --> VLI1["vlinsert-1"] Vector --> VLI2["vlinsert-2"] subgraph "VictoriaLogs Cluster" VLI1 --> VLS1["vlstorage-1"] VLI1 --> VLS2["vlstorage-2"] VLI2 --> VLS1 VLI2 --> VLS2 VLS1 <--> VLQ1["vlselect-1"] VLS1 <--> VLQ2["vlselect-2"] VLS2 <--> VLQ1 VLS2 <--> VLQ2 end VLQ1 <--> Users["vmauth"] VLQ2 <--> Users
Note that vmauth
can send requests to vlinsert
as needed. The diagram above shows a common use case.
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-logs-cluster
chart available to installation:
helm search repo vm/victoria-logs-cluster -l
Install victoria-logs-cluster
chart
#
Export default values of victoria-logs-cluster
chart to file values.yaml
:
For HTTPS repository
helm show values vm/victoria-logs-cluster > values.yaml
For OCI repository
helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-cluster > values.yaml
Change the values according to the need of the environment in values.yaml
file.
Consider setting .Values.nameOverride
to a small value like vlc
to avoid hitting resource name limits of 63 characters
Test the installation with command:
For HTTPS repository
helm install vlc vm/victoria-logs-cluster -f values.yaml -n NAMESPACE --debug
For OCI repository
helm install vlc oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-cluster -f values.yaml -n NAMESPACE --debug
Install chart with command:
For HTTPS repository
helm install vlc vm/victoria-logs-cluster -f values.yaml -n NAMESPACE
For OCI repository
helm install vlc oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-cluster -f values.yaml -n NAMESPACE
Get the pods lists by running this commands:
kubectl get pods -A | grep 'vlc'
Get the application by running this command:
helm list -f vlc -n NAMESPACE
See the history of versions of vlc
application with command.
helm history vlc -n NAMESPACE
How to uninstall #
Remove application with command.
helm uninstall vlc -n NAMESPACE
Documentation of Helm Chart #
Install helm-docs
following the instructions on this
tutorial
.
Generate docs with helm-docs
command.
cd charts/victoria-logs-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-logs-cluster/values.yaml
file.
Key | Description |
---|---|
| (object) common for all components image configuration |
| (list) Add extra specs dynamically to this chart |
| (object) k8s cluster domain suffix, uses for building storage pods’ FQDN. Details are here |
| (object) Openshift security context compatibility configuration |
| (string) Image registry, that can be shared across multiple helm charts |
| (list) Image pull secrets, that can be shared across multiple helm charts |
| (string) Override chart name |
| (bool) Print information after deployment |
| (object) Service account annotations |
| (bool) mount API token to pod directly |
| (bool) Specifies whether a service account should be created |
| (object) Service account labels |
| (string) The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| (object) Pod affinity |
| (object) Deployment annotations |
| (string) Container workdir |
| (bool) Enable deployment of vlinsert component. |
| (list) Additional environment variables (ex.: secret tokens, flags). Check here for details. |
| (list) Specify alternative source for env variables |
| (list) IDs of vlstorage nodes to exclude from writing |
| (object) Extra command line arguments for vlinsert component |
| (list) Extra containers to run in a pod with vlinsert |
| (object) Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vlinsert component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vlinsert component |
| (int) Maximum replicas for HPA to use to to scale the vlinsert component |
| (list) Metric for HPA to use to scale the vlinsert component |
| (int) Minimum replicas for HPA to use to scale the vlinsert component |
| (string) Image pull policy |
| (string) Image registry |
| (string) Image repository |
| (string) Image tag override Chart.AppVersion |
| (string) Image tag suffix, which is appended to |
| (object) Ingress annotations |
| (bool) Enable ingress for vlinsert component |
| (object) Ingress extra labels |
| (list) Array of host objects |
| (string) Ingress controller class name |
| (string) Ingress path type |
| (list) Array of TLS objects |
| (list) Init containers for vlinsert |
| (object) Specify pod lifecycle |
| (string) Override default |
| (object) Pod’s node selector. Details are here |
| (object) Pod’s annotations |
| (object) See |
| (object) Pod’s additional labels |
| (object) Pod’s security context. Details are here |
| (string) vlinsert http port name |
| (string) Name of Priority Class |
| (object) Readiness & Liveness probes |
| (object) vlinsert liveness probe |
| (object) vlinsert readiness probe |
| (object) vlinsert startup probe |
| (int) Count of vlinsert pods |
| (object) Resource object. Details are here |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) Create vlinsert service |
| (list) Service external IPs. Details are here |
| (string) Service external traffic policy. Check here for details |
| (list) Extra service ports |
| (string) Health check node port for a service. Check here for details |
| (list) List of service IP families. Check here for details. |
| (string) Service IP family policy. Check here for details. |
| (object) Service labels |
| (string) Service load balancer IP |
| (list) Load balancer source range |
| (int) Service port |
| (string) Target port |
| (string) Service type |
| (object) vlinsert strategy |
| (bool) Suppress rendering |
| (int) |
| (list) Array of tolerations object. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) VMServiceScrape annotations |
| (bool) Enable VMServiceScrape for vlinsert component, which is managed by vm-operator. |
| (object) VMServiceScrape labels |
| (string) Target namespace of VMServiceScrape manifest |
| (string) |
| (bool) Create ServiceMonitor instead of VMServiceScrape, which is managed by prometheus-operator |
| (object) Pod affinity |
| (object) Deployment annotations |
| (string) Container workdir |
| (bool) Enable deployment of vlselect component. |
| (list) Additional environment variables (ex.: secret tokens, flags). Check here for details. |
| (list) Specify alternative source for env variables |
| (object) Extra command line arguments for vlselect component |
| (list) Extra containers to run in a pod with vlselect |
| (object) Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vlselect component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vlselect component |
| (int) Maximum replicas for HPA to use to to scale the vlselect component |
| (list) Metric for HPA to use to scale the vlselect component |
| (int) Minimum replicas for HPA to use to scale the vlselect component |
| (string) Image pull policy |
| (string) Image registry |
| (string) Image repository |
| (string) Image tag override Chart.AppVersion |
| (string) Image tag suffix, which is appended to |
| (object) Ingress annotations |
| (bool) Enable deployment of ingress for vlselect component |
| (object) Ingress extra labels |
| (list) Array of host objects |
| (string) Ingress controller class name |
| (string) Ingress path type |
| (list) Array of TLS objects |
| (list) Init containers for vlselect |
| (object) Specify pod lifecycle |
| (string) Override default |
| (object) Pod’s node selector. Details are here |
| (object) Pod’s annotations |
| (object) See |
| (bool) See |
| (object) Pod’s additional labels |
| (object) Pod’s security context. Details are here |
| (string) vlselect http port name |
| (string) Name of Priority Class |
| (object) Readiness & Liveness probes |
| (object) vlselect liveness probe |
| (object) vlselect readiness probe |
| (object) vlselect startup probe |
| (int) Count of vlselect pods |
| (object) Resource object. Details are here |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) Create vlselect service |
| (list) Service external IPs. Details are here |
| (string) Service external traffic policy. Check here for details |
| (list) Extra service ports |
| (string) Health check node port for a service. Check here for details |
| (list) List of service IP families. Check here for details. |
| (string) Service IP family policy. Check here for details. |
| (object) Service labels |
| (string) Service load balancer IP |
| (list) Load balancer source range |
| (int) Service port |
| (string) Target port |
| (string) Service type |
| (object) |
| (bool) Suppress rendering |
| (int) Pod’s termination grace period in seconds |
| (list) Array of tolerations object. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) VMServiceScrape annotations |
| (bool) Enable VMServiceScrape for vlselect component, which is managed by vm-operator. |
| (object) VMServiceScrape labels |
| (string) Target namespace of VMServiceScrape manifest |
| (string) |
| (bool) Create ServiceMonitor instead of VMServiceScrape, which is managed by prometheus-operator |
| (object) Pod affinity |
| (object) StatefulSet/Deployment annotations |
| (string) Container workdir |
| (object) Empty dir configuration if persistence is disabled |
| (bool) Enable deployment of vlstorage component. StatefulSet is used |
| (list) Additional environment variables (ex.: secret tokens, flags). Check here for details |
| (list) Specify alternative source for env variables |
| (object) Additional vlstorage container arguments. Extra command line arguments for vlstorage component |
| (list) Extra containers to run in a pod with vlstorage |
| (object) StatefulSet/Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vlstorage component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vlstorage component |
| (int) Maximum replicas for HPA to use to to scale the vlstorage component |
| (list) Metric for HPA to use to scale the vlstorage component |
| (int) Minimum replicas for HPA to use to scale the vlstorage component |
| (string) Image pull policy |
| (string) Image registry |
| (string) Image repository |
| (string) Image tag override Chart.AppVersion |
| (string) Image tag suffix, which is appended to |
| (list) Init containers for vlstorage |
| (object) Specify pod lifecycle |
| (int) |
| (string) Override default |
| (object) Pod’s node selector. Details are here |
| (list) Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here |
| (object) Persistent volume annotations |
| (bool) Create/use Persistent Volume Claim for vlstorage component. Empty dir if false. If true, vlstorage will create/use a Persistent Volume Claim |
| (string) Existing Claim name. Requires vlstorage.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound |
| (object) Persistent volume labels |
| (string) Data root path. vlstorage data Persistent Volume mount root path |
| (string) |
| (string) Size of the volume. |
| (string) Storage class name. Will be empty if not set |
| (string) Mount subpath |
| (object) Pod’s annotations |
| (object) See |
| (object) Pod’s additional labels |
| (string) Deploy order policy for StatefulSet pods |
| (object) Pod’s security context. Details are here |
| (string) vlstorage http port name |
| (string) Name of Priority Class |
| (object) Readiness probes |
| (object) vlstorage readiness probe |
| (object) vlstorage startup probe |
| (int) Count of vlstorage pods |
| (object) Resource object. Details are here |
| (string) Data retention max capacity. Default unit is GiB. See these docs |
| (string) Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these docs |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) |
| (string) Service external traffic policy. Check here for details |
| (list) Extra service ports |
| (string) Health check node port for a service. Check here for details |
| (list) List of service IP families. Check here for details. |
| (string) Service IP family policy. Check here for details. |
| (object) Service labels |
| (int) Service port |
| (string) Target port |
| (string) Service type |
| (int) Pod’s termination grace period in seconds |
| (list) Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) VMServiceScrape annotations |
| (bool) Enable VMServiceScrape for vlstorage component, which is managed by vm-operator. |
| (object) VMServiceScrape labels |
| (string) Target namespace of VMServiceScrape manifest |
| (string) |
| (bool) Create ServiceMonitor instead of VMServiceScrape, which is managed by prometheus-operator |
| (object) Pod affinity |
| (object) VMAuth annotations |
| (object) |
| (string) VMAuth configuration secret name |
| (string) Container workdir |
| (bool) Enable deployment of vmauth component, to help better balance the read and write requests to vlinsert and vlselect components. With vmauth enabled, please also set |
| (list) Additional environment variables (ex.: secret tokens, flags). Check here for details |
| (list) Specify alternative source for env variables |
| (object) Extra command line arguments for vmauth component |
| (list) Extra containers to run in a pod with vmauth |
| (object) VMAuth additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vmauth component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vmauth component |
| (int) Maximum replicas for HPA to use to to scale the vmauth component |
| (list) Metric for HPA to use to scale the vmauth component |
| (int) Minimum replicas for HPA to use to scale the vmauth component |
| (string) Image pull policy |
| (string) Image registry |
| (string) Image repository |
| (string) Image tag override the default Chart.AppVersion, which is for vlogs components |
| (object) Ingress annotations |
| (bool) Enable deployment of ingress for vmauth component |
| (object) |
| (list) Array of host objects |
| (string) pathType is only for k8s >= 1.1= |
| (list) Array of TLS objects |
| (list) Init containers for vmauth |
| (object) Specify pod lifecycle |
| (string) Override default |
| (object) Pod’s node selector. Details are here |
| (object) Pod’s annotations |
| (object) See |
| (object) VMAuth pod labels |
| (object) Pod’s security context. Details are here |
| (string) VMAuth http port name |
| (string) Name of Priority Class |
| (object) VMAuth liveness probe |
| (object) VMAuth readiness probe |
| (object) VMAuth startup probe |
| (int) Count of vmauth pods |
| (object) Resource object |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) Create VMAuth service |
| (list) Service External IPs. Details are here |
| (string) Service external traffic policy. Check here for details |
| (list) Extra service ports |
| (string) Health check node port for a service. Check here for details |
| (list) List of service IP families. Check here for details. |
| (string) Service IP family policy. Check here for details. |
| (object) Service labels |
| (string) Service load balancer IP |
| (list) Load balancer source range |
| (int) Service port |
| (string) Target port |
| (string) Service type |
| (object) VMAuth Deployment strategy |
| (list) Array of tolerations object. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) VMServiceScrape annotations |
| (bool) Enable VMServiceScrape for vmauth component, which is managed by vm-operator. |
| (object) VMServiceScrape labels |
| (string) Target namespace of VMServiceScrape manifest |
| (string) |
| (bool) Create ServiceMonitor instead of VMServiceScrape, which is managed by prometheus-operator |