New to KubeDB? Please start here.
Milvus Volume Expansion
This guide will give an overview on how the KubeDB Ops-manager operator expands the persistent volumes of a Milvus database.
Before You Begin
- You should be familiar with the following
KubeDBconcepts:
How Volume Expansion Process Works
Volume expansion grows the persistent volumes backing Milvus. A MilvusOpsRequest of type VolumeExpansion carries the new size and an expansion mode:
spec:
type: VolumeExpansion
volumeExpansion:
mode: Online # Online or Offline
node: 4Gi # standalone target
# streamingnode: 4Gi # distributed target
Which key you set depends on the topology, because only certain workloads carry persistent storage:
- Standalone: use
node— the standalone workload’sspec.storage. - Distributed: use
streamingnode— among the distributed roles, onlystreamingnodecarries a persistent volume (spec.topology.distributed.streamingnode.storage). The other roles (mixcoord,datanode,querynode,proxy) are stateless and are not the focus of volume operations.
mode selects how the expansion is performed:
Online— the volume is expanded without taking the pod down (where the storage class/CSI driver supports online resize).Offline— the pod is taken down, the volume is resized, and the pod is brought back up.
Storage class requirement: the underlying
StorageClassmust haveallowVolumeExpansion: true. The base examples uselocal-path, which does not support expansion. Use an expansion-capable class (for examplelonghorn-custom) for volume expansion.
The flow is:
- A user creates a
MilvusOpsRequestof typeVolumeExpansion. - The operator validates the request and pauses the
Milvusdatabase. - The operator patches the PVCs to the new size and waits for the CSI driver to complete the resize.
- The new size is reflected in
spec.storage(standalone) orspec.topology.distributed.streamingnode.storage(distributed). - The operator resumes the database and marks the
MilvusOpsRequestasSuccessful.
In the next doc, we will see a step-by-step guide on expanding the volume of a Milvus database.































