Scaling Guidelines#
The method for scaling KOF depends on the type of expansion:
Increase volumes size#
Don't use this method if your storage class doesn't have allowVolumeExpansion.
With allowVolumeExpansion you can increase the storage size for:
vmcluster
kof-regional: # or kof-mothership if you have it installed on mothership cluster
values:
victoriametrics:
vmcluster:
spec:
vmstorage:
storage:
volumeClaimTemplate:
spec:
resources:
requests:
storage: <new size>
victoria-logs-cluster
victoria-logs-cluster:
vlstorage:
persistentVolume:
size: <new size>
victoria-traces-cluster:
vtstorage:
persistentVolume:
size: <new size>
For vmcluster you can just run helm upgrade with new values, VictoriaMetrics operator will handle volume expansion automatically.
helm upgrade -i --reset-values --wait \
--create-namespace -n kof kof \
-f kof-values.yaml \
oci://ghcr.io/k0rdent/kof/charts/kof \
--version 1.8.0
For victoria-logs-cluster and victoria-traces-cluster you need to delete the stateful set and expand PVCs manually before running helm upgrade:
victoria-logs-cluster volumes expansion
-
If you have installed the kof-storage chart on the mothership cluster via kof-umbrella helm chart, suspend the flux helmrelease firstly
kubectl patch helmrelease kof-storage \ -n kof \ --type=merge \ -p '{"spec":{"suspend": true}}' -
Delete the current stateful set:
# --cascade=orphan keeps the Pods and PVCs alive while removing the StatefulSet object kubectl delete statefulset kof-storage-victoria-logs-cluster-vlstorage \ -n kof --cascade=orphan -
Expand the size for each PVC from 0 to the number of replicas
kubectl patch pvc vlstorage-volume-kof-storage-victoria-logs-cluster-vlstorage-0 \ -n kof \ --type=merge \ -p '{"spec":{"resources":{"requests":{"storage":"<new size>"}}}}' -
Verify that PVCs are expanded
kubectl get pvc -n kof -w -
Run helm upgrade with values set to the new size
Regional Expansion#
- Deploy a regional cluster in the new region.
- Configure child clusters in this region to point to this regional cluster.
Adding a New Child Cluster#
- Apply templates, as in the child cluster section.
- Verify the data flow.
- Configure any custom dashboards.
You Must Construct Additional Pylons#
- Change the
replicaCountof components likevictoria-logs-clusteras documented in the regional cluster section. - Change the
replicasnumber of components likeopencostas documented in the child cluster section.