Updating volumes in YTsaurus services
This document explains how to change volume settings for YTsaurus services in Kubernetes.
Important considerations
When updating volumes:
- The operator doesn’t apply updates automatically — it ignores changes to volume configurations. Changing the resource specification alone won’t trigger an update.
- PVCs remain after deleting pods or StatefulSets, blocking new volume settings.
Warning
Updating volumes this way causes data loss because the system re‑creates them. Don’t apply this procedure to stateful components (e.g., masters and data nodes) — their volumes store cluster data that must be migrated beforehand. Otherwise, data will be permanently lost.
Procedure
To update volume settings:
Step 1. Disable the operator
Set isManaged: false in the YTsaurus resource specification to stop the operator from interfering with manual changes:
spec:
isManaged: false
Apply the change to the cluster.
Step 2. Delete the StatefulSet
Delete the StatefulSet for the service whose volumes you’re updating:
kubectl delete statefulset <statefulset-name> -n <namespace>
Step 3. Delete Persistent Volume Claims
If your StatefulSet has multiple replicas, delete each associated PVC. To find relevant PVCs, run:
kubectl get pvc -n <namespace>
Then delete them:
kubectl delete pvc <pvc-name> -n <namespace>
Step 4. Enable the operator
Set isManaged: true in the YTsaurus resource specification:
spec:
isManaged: true
Apply the change. The operator re‑creates the StatefulSet and PVCs with the new volume settings.
Example: Increasing space for scheduler logs
Suppose you need to increase scheduler log storage from 10 GB to 50 GB.
- To specify the new volume size, update the YTsaurus resource specification:
spec:
schedulers:
volumeClaimTemplates:
- spec:
resources:
requests:
storage: 50Gi # increased from 10Gi
- Complete the update by:
- Setting
isManaged: false. - Deleting the StatefulSet and PVCs.
- Setting
isManaged: trueagain.
- Setting
Warning
This operation deletes current logs because old PVCs are removed and new ones are created. Back up your logs before starting the update.