The VictoriaLogs single Helm chart deploys a high-performance, cost-effective log storage solution for Kubernetes environments. It optionally includes Vector as a log collector to automatically gather logs from Kubernetes pods and forward them to the VictoriaLogs instance.
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 #
The chart’s architecture centers around deploying VictoriaLogs as either a StatefulSet or Deployment, with StatefulSet being the default mode.
The chart provides extensive configuration options for:
- Persistent volume support is enabled by default with a 10GB volume size.
- Data retention (how long to keep logs): supporting both time-based retention periods (with units of hours, days, weeks, or years) and disk space-based retention limits. The default retention period is set to 1 month, with a minimum requirement of 24 hours.
Out of the box, the chart only deploys VictoriaLogs itself without any log collector. Users need to explicitly enable Vector if they want automated log collection from Kubernetes pods:
vector:
enabled: true
graph TB subgraph "Kubernetes Node 1" Pod1["App Pod"] Pod2["App Pod"] Vector1["Vector<br/>DaemonSet"] style Vector1 fill:#d0ebff,stroke:#339af0,stroke-width:2px end subgraph "Kubernetes Node 2" Pod3["App Pod"] Pod4["App Pod"] Vector2["Vector<br/>DaemonSet"] style Vector2 fill:#d0ebff,stroke:#339af0,stroke-width:2px end Pod1 -.-> Vector1 Pod2 -.-> Vector1 Pod3 -.-> Vector2 Pod4 -.-> Vector2 Vector1 --> VL["VictoriaLogs<br/>StatefulSet"] Vector2 --> VL style VL fill:#e6fcf5,stroke:#20c997,stroke-width:2px
Vector #
When Vector is enabled, the default configuration is quite comprehensive and well-structured:
- The default role is set to “Agent” (typically deployed as a DaemonSet with a data directory at
/vector-data-dir
. - Vector is configured with the
k8s
source uses thekubernetes_logs
type to collect logs from all Kubernetes pods in the cluster. - The default transform configuration includes a parser component that performs JSON parsing on incoming log messages.
- It attempts to parse the message field as JSON, and if successful, stores the parsed content in a
.log
field. - If JSON parsing fails, it falls back to keeping the original message content.
- It attempts to parse the message field as JSON, and if successful, stores the parsed content in a
- The default sink configuration includes a
vlogs
sink, configured as an Elasticsearch-compatible endpoint, which sends processed logs to VictoriaLogs using bulk mode withgzip
compression.
Minimal Configuration #
You can install the chart right away without any configuration (How to install ), but here is the minimal configuration that is commonly customized:
# VictoriaLogs server (enabled by default)
server:
enabled: true
# Time-based retention (default: 1 month)
retentionPeriod: 7d
# OR disk-based retention (default: none)
retentionDiskSpaceUsage: 5GB
# Storage size
persistentVolume:
size: 20Gi # Adjust based on your log volume
# Vector log collector (disabled by default, needs to be enabled)
vector:
enabled: true
The beauty of this chart is that with just vector.enabled: true
, you get a fully functional log collection and storage system. Vector automatically discovers all pods in the cluster, parses their logs, and forwards them to the VictoriaLogs instance with proper metadata enrichment.
Sending logs to external VictoriaLogs #
The VictoriaLogs single chart provides an option to install logs collection agents only and send logs to external VictoriaLogs:
.Values.server.enabled: false
skips deploying any VictoriaLogs server components (StatefulSet/Deployment, Service, PVC, etc.).Values.vector.enabled: true
chart deploys Vector as a DaemonSet (by default) with the specified configuration.Values.vector.customConfig.sinks.vlogs.endpoints: [<remote-endpoint-1>/insert/elasticsearch, <remote-endpoint-n>/insert/elasticsearch]
overrides the destination endpoints to external VictoriaLogs single-node or cluster instances.
# Disable the VictoriaLogs server deployment
server:
enabled: false
# Enable Vector log collector
vector:
enabled: true
customConfig:
sinks:
vlogs:
type: elasticsearch
inputs: [parser]
mode: bulk
api_version: v8
compression: gzip
healthcheck:
enabled: false
# Specify your external VictoriaLogs endpoints
endpoints:
- "https://external-vlogs.example.com/insert/elasticsearch"
- "https://backup-vlogs.example.com/insert/elasticsearch"
request:
headers:
VL-Time-Field: timestamp
VL-Stream-Fields: stream,kubernetes.pod_name,kubernetes.container_name,kubernetes.pod_namespace
VL-Msg-Field: message,msg,_msg,log.msg,log.message,log
AccountID: "0"
ProjectID: "0"
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-single
chart available to installation:
helm search repo vm/victoria-logs-single -l
Install victoria-logs-single
chart
#
Export default values of victoria-logs-single
chart to file values.yaml
:
For HTTPS repository
helm show values vm/victoria-logs-single > values.yaml
For OCI repository
helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-single > 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 vls vm/victoria-logs-single -f values.yaml -n NAMESPACE --debug
For OCI repository
helm install vls oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-single -f values.yaml -n NAMESPACE --debug
Install chart with command:
For HTTPS repository
helm install vls vm/victoria-logs-single -f values.yaml -n NAMESPACE
For OCI repository
helm install vls oci://ghcr.io/victoriametrics/helm-charts/victoria-logs-single -f values.yaml -n NAMESPACE
Get the pods lists by running this commands:
kubectl get pods -A | grep 'vls'
Get the application by running this command:
helm list -f vls -n NAMESPACE
See the history of versions of vls
application with command.
helm history vls -n NAMESPACE
How to uninstall #
Remove application with command.
helm uninstall vls -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-single
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-single/values.yaml
file.
Key | Description |
---|---|
| (object) Dashboard annotations |
| (bool) Create VictoriaLogs dashboards |
| (bool) |
| (bool) |
| (string) |
| (object) Dashboard labels |
| (string) Override default namespace, where to create dashboards |
| (list) Add extra specs dynamically to this chart |
| (string) 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 |
| (object) See |
| (object) PodDisruptionBudget extra labels |
| (bool) Print chart notes |
| (object) Pod affinity |
| (string) Container workdir |
| (object) K8s Deployment specific variables |
| (object) |
| (bool) Enable deployment of server component. Deployed as StatefulSet |
| (list) Additional environment variables (ex.: secret tokens, flags). Details are here |
| (list) Specify alternative source for env variables |
| (object) Extra command line arguments for container of component |
| (list) Extra containers to run in a pod with Victoria Logs container |
| (list) Additional hostPath mounts |
| (object) StatefulSet/Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of server component |
| (string) Image pull policy |
| (string) Image registry |
| (string) Image repository |
| (string) Image tag |
| (string) Image tag suffix, which is appended to |
| (list) Image pull secrets |
| (string) Ingress annotations |
| (bool) Enable deployment of ingress for server 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 Victoria Logs Pod |
| (object) Specify pod lifecycle |
| (string) VictoriaLogs mode: deployment, statefulSet |
| (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 server component. Use empty dir if set to false |
| (string) Existing Claim name. If defined, PVC must be created manually before volume will be bound |
| (object) Bind Persistent Volume by labels. Must match all labels of targeted PV. |
| (string) Mount path. Server data Persistent Volume mount root path. |
| (string) Override Persistent Volume Claim name |
| (string) Size of the volume. Should be calculated based on the logs you send and retention policy you set. |
| (string) StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically |
| (string) Mount subpath |
| (object) Pod’s annotations |
| (object) Pod’s additional labels |
| (object) Pod’s security context. Details are here |
| (string) Name of Priority Class |
| (object) Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its restart policy. If a Container does not provide a liveness probe, the default state is Success. |
| (object) Indicates whether the Container is ready to service requests. If the readiness probe fails, the endpoints controller removes the Pod’s IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container does not provide a readiness probe, the default state is Success. |
| (object) Indicates whether the Container is done with potentially costly initialization. If set it is executed first. If it fails Container is restarted. If it succeeds liveness and readiness probes takes over. |
| (int) Replica count |
| (object) Resource object. Details are here |
| (string) Data retention max capacity. Default unit is GiB. See these docs |
| (int) 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 |
| (string) Use an alternate scheduler, e.g. “stork”. Check details here |
| (object) Security context to be added to server pods |
| (object) Service annotations |
| (string) Service ClusterIP |
| (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) Service Monitor annotations |
| (object) Basic auth params for Service Monitor |
| (bool) Enable deployment of Service Monitor for server component. This is Prometheus operator object |
| (object) Service Monitor labels |
| (list) Service Monitor metricRelabelings |
| (list) Service Monitor relabelings |
| (string) Service Monitor target port |
| (object) K8s StatefulSet specific variables |
| (string) Deploy order policy for StatefulSet pods |
| (object) StatefulSet update strategy. Check here for details. |
| (int) Pod’s termination grace period in seconds |
| (list) Node tolerations for server scheduling to nodes with taints. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) |
| (bool) Enable deployment of VMServiceScrape for server component. This is Victoria Metrics operator object |
| (object) |
| (list) |
| (list) Commented. TLS configuration to use when scraping the endpoint tlsConfig: insecureSkipVerify: true |
| (string) target port |
| (object) ServiceAccount annotations |
| (bool) Mount API token to pod directly |
| (bool) Create service account. |
| (object) ServiceAccount 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) Values for vector helm chart |
| (string) Forces custom configuration creation in a given namespace even if vector.enabled is false |
| (bool) Enable deployment of vector |