You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to KubeDB? Please start here.
Vertical Scaling Milvus
This guide will give an overview on how the KubeDB Ops-manager operator vertically scales a Milvus database.
Before You Begin
- You should be familiar with the following
KubeDBconcepts:
How Vertical Scaling Process Works
Vertical scaling changes the CPU/memory resources of Milvus pods. A MilvusOpsRequest of type VerticalScaling carries the new resources under spec.verticalScaling, keyed by the component you want to scale:
- Standalone: use the
nodekey. - Distributed: use any of
proxy,mixcoord,datanode,querynode,streamingnode(you can scale several at once).
spec:
type: VerticalScaling
verticalScaling:
node: # 'node' for standalone; role names for distributed
resources:
requests:
cpu: "1"
memory: "2Gi"
limits:
cpu: "1"
memory: "2Gi"
The flow is:
- A user creates a
MilvusOpsRequestof typeVerticalScaling. - The operator validates the request and pauses the
Milvusdatabase. - The operator updates the resources in the
Milvusobject’sspec.podTemplateand the corresponding PetSets. - Pods are restarted (evicted and recreated) so they come up with the new resources.
- The operator resumes the database and marks the
MilvusOpsRequestasSuccessful.
Vertical Scaling Modes
KubeDB actuates vertical scaling in one of two modes, selected through the spec.verticalScaling.mode
field of the MilvusOpsRequest:
Restart(default): The operator patches thePetSetwith the new resources and restarts the Pods (one at a time, honoring the database’s failover rules) so they come back with the updated CPU and Memory. This works on every Kubernetes cluster.InPlace: The operator resizes the running containers in place using the Kubernetes in-place Pod resize (pods/resizesubresource) — no Pod restart, so scaling happens without downtime or failover. If a Node cannot accommodate the new resources (the resize is reportedInfeasible), the operator automatically falls back to theRestartbehavior for that Pod.
If spec.verticalScaling.mode is omitted, it defaults to Restart.
Note:
InPlacemode relies on the KubernetesInPlacePodVerticalScalingfeature gate, which is enabled by default from Kubernetes v1.33. On older clusters, or when the feature gate is disabled, useRestartmode.
In the next doc, we will see a step-by-step guide on vertically scaling a Milvus database.































