The VictoriaTraces cluster Helm chart deploys VictoriaTraces cluster database in Kubernetes.
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:
Quick start #
The chart deploys VictoriaTraces cluster database. It deploys the following components according to VictoriaTraces cluster architecture :
vtstorage
stores the ingested traces to the configured persistent volumesvtinsert
receives incoming traces and spreads them evenly acrossvtstorage
nodesvtselect
provides API for querying the ingested traces
The default chart setup is shown below:
graph LR Collector["Log Collector"] --> VTI1["vtinsert-1"] Collector --> VTI2["vtinsert-2"] subgraph "VictoriaTraces Cluster" VTI1 --> VTS1["vtstorage-1"] VTI1 --> VTS2["vtstorage-2"] VTI2 --> VTS1 VTI2 --> VTS2 VTS1 <--> VTQ1["vtselect-1"] VTS1 <--> VTQ2["vtselect-2"] VTS2 <--> VTQ1 VTS2 <--> VTQ2 end VTQ2 <--> Users
For a quick start, install victoria-traces-cluster
using the following commands,
making sure to replace the environment variables with your own values:
export RETENTION=30d
export PVC_SIZE=10Gi
export VTSTORAGE_REPLICAS=2
export NAMESPACE=traces
# Install victoria-traces-cluster chart
helm install vtc vm/victoria-traces-cluster --namespace $NAMESPACE --wait \
--set "vtstorage.retentionPeriod=$RETENTION" --set "vtstorage.persistentVolume.size=$PVC_SIZE" \
--set vmauth.enabled=true \
--set vtstorage.replicaCount=$VTSTORAGE_REPLICAS
In the example above, two `vtstorage` instances are deployed, each with a 30-day retention period and a 10 Gi PVC.
To access the data within the cluster, use the vmauth address: `http://vtc-victoria-traces-cluster-vmauth.logging.svc.cluster.local:8427`.
You can use this address as Data Source URL in Grafana.
The vmui interface is available at: `http://vtc-victoria-traces-cluster-vmauth.logging.svc.cluster.local:8427/select/vmui/`.
To uninstall these charts, run: `helm uninstall vts`.
Note that this *will not* remove the PVCs, so you will need to delete them manually if no longer needed.
For finer control and easier maintenance, it is recommended to set these
values in a separate `values` file and use it during installation.
See [how to install victoria-traces-single](https://docs.victoriametrics.com/helm/victoria-traces-single/#install-victoria-traces-single-chart) for an example.
You can do this later if you want to configure more settings than shown in the default example.
## Chart configuration
### vmauth
When you enable `vmauth` with:
```yaml
vmauth:
enabled: true
The chart launches an
vmauth
service
for proxying and load-balancing incoming data ingestion requests to vtinsert
nodes and for proxying and load-balancing incoming queries to vtselect
nodes.
So, the chart can now be thought of as:
graph LR Collector["Traces Collector"] --> VTI1["vtinsert-1"] Collector --> VTI2["vtinsert-2"] subgraph "VictoriaTraces Cluster" VTI1 --> VTS1["vtstorage-1"] VTI1 --> VTS2["vtstorage-2"] VTI2 --> VTS1 VTI2 --> VTS2 VTS1 <--> VTQ1["vtselect-1"] VTS1 <--> VTQ2["vtselect-2"] VTS2 <--> VTQ1 VTS2 <--> VTQ2 end VTQ1 <--> Users["vmauth"] VTQ2 <--> Users
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-traces-cluster
chart available to installation:
helm search repo vm/victoria-traces-cluster -l
Install victoria-traces-cluster
chart
#
Export default values of victoria-traces-cluster
chart to file values.yaml
:
For HTTPS repository
helm show values vm/victoria-traces-cluster > values.yaml
For OCI repository
helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-traces-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 vtc
to avoid hitting resource name limits of 63 characters
Test the installation with command:
For HTTPS repository
helm install vtc vm/victoria-traces-cluster -f values.yaml -n NAMESPACE --debug
For OCI repository
helm install vtc oci://ghcr.io/victoriametrics/helm-charts/victoria-traces-cluster -f values.yaml -n NAMESPACE --debug
Install chart with command:
For HTTPS repository
helm install vtc vm/victoria-traces-cluster -f values.yaml -n NAMESPACE
For OCI repository
helm install vtc oci://ghcr.io/victoriametrics/helm-charts/victoria-traces-cluster -f values.yaml -n NAMESPACE
Get the pods lists by running this commands:
kubectl get pods -A | grep 'vtc'
Get the application by running this command:
helm list -f vtc -n NAMESPACE
See the history of versions of vtc
application with command.
helm history vtc -n NAMESPACE
How to uninstall #
Remove application with command.
helm uninstall vtc -n NAMESPACE
Documentation of Helm Chart #
Install helm-docs
following the instructions on this
tutorial
.
Generate docs with helm-docs
command.
cd charts/victoria-traces-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-traces-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) 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 vtinsert and vtselect 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 vtraces 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 |
| (object) Pod affinity |
| (object) Deployment annotations |
| (string) Container workdir |
| (bool) Enable deployment of vtinsert component. |
| (list) Additional environment variables (ex.: secret tokens, flags). Check here for details. |
| (list) Specify alternative source for env variables |
| (list) IDs of vtstorage nodes to exclude from writing |
| (object) Extra command line arguments for vtinsert component |
| (list) Extra containers to run in a pod with vtinsert |
| (object) Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vtinsert component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vtinsert component |
| (int) Maximum replicas for HPA to use to to scale the vtinsert component |
| (list) Metric for HPA to use to scale the vtinsert component |
| (int) Minimum replicas for HPA to use to scale the vtinsert 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 vtinsert 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 vtinsert |
| (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) vtinsert http port name |
| (string) Name of Priority Class |
| (object) Readiness & Liveness probes |
| (object) vtinsert liveness probe |
| (object) vtinsert readiness probe |
| (object) vtinsert startup probe |
| (int) Count of vtinsert pods |
| (object) Resource object. Details are here |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) Create vtinsert 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) vtinsert strategy |
| (bool) Suppress rendering |
| (int) |
| (list) Array of tolerations object. Details are here |
| (list) Pod topologySpreadConstraints |
| (object) VMServiceScrape annotations |
| (bool) Enable VMServiceScrape for vtinsert 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 vtselect 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 vtselect component |
| (list) Extra containers to run in a pod with vtselect |
| (object) Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vtselect component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vtselect component |
| (int) Maximum replicas for HPA to use to to scale the vtselect component |
| (list) Metric for HPA to use to scale the vtselect component |
| (int) Minimum replicas for HPA to use to scale the vtselect 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 vtselect 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 vtselect |
| (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) vtselect http port name |
| (string) Name of Priority Class |
| (object) Readiness & Liveness probes |
| (object) vtselect liveness probe |
| (object) vtselect readiness probe |
| (object) vtselect startup probe |
| (int) Count of vtselect pods |
| (object) Resource object. Details are here |
| (object) Check here for details. |
| (object) Service annotations |
| (string) Service ClusterIP |
| (bool) Create vtselect 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 vtselect 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 vtstorage 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 vtstorage container arguments. Extra command line arguments for vtstorage component |
| (list) Extra containers to run in a pod with vtstorage |
| (object) StatefulSet/Deployment additional labels |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Overrides the full name of vtstorage component |
| (object) Behavior settings for scaling by the HPA |
| (bool) Use HPA for vtstorage component |
| (int) Maximum replicas for HPA to use to to scale the vtstorage component |
| (list) Metric for HPA to use to scale the vtstorage component |
| (int) Minimum replicas for HPA to use to scale the vtstorage 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 vtstorage |
| (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 vtstorage component. Empty dir if false. If true, vtstorage will create/use a Persistent Volume Claim |
| (string) Existing Claim name. Requires vtstorage.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound |
| (object) Persistent volume labels |
| (string) Data root path. vtstorage 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) vtstorage http port name |
| (string) Name of Priority Class |
| (object) Readiness probes |
| (object) vtstorage readiness probe |
| (object) vtstorage startup probe |
| (int) Count of vtstorage 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 vtstorage 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 |