New to KubeDB? Please start here.
Weaviate Compute Resource Autoscaling
This guide will give you an overview of how KubeDB autoscales the compute resources (CPU and Memory) of a Weaviate cluster using a WeaviateAutoscaler.
Before You Begin
- You should be familiar with the following
KubeDBconcepts:
How Compute Autoscaling Works
KubeDB provides a WeaviateAutoscaler CRD to automatically scale the compute resources of a Weaviate cluster. It is backed by a VerticalPodAutoscaler (VPA) that observes the actual resource usage of the Weaviate pods (requires metrics-server).
The compute autoscaling process consists of the following steps:
The user creates a
WeaviateAutoscalerCR with aspec.compute.weaviateblock describing the trigger, the min/max allowed resources, and the controlled resources.The
KubeDBAutoscaler operator creates aVerticalPodAutoscalerfor the cluster and watches the recommendations it produces.When the recommended resources differ from the current resources by more than
resourceDiffPercentage(and the pods are older thanpodLifeTimeThreshold), the Autoscaler operator creates aWeaviateOpsRequestof typeVerticalScaling.The
KubeDBOps Manager applies theVerticalScalingops request, updating the pod resources within theminAllowed/maxAllowedbounds.
The relevant fields under spec.compute.weaviate are:
trigger—OnorOff, enables/disables compute autoscaling.podLifeTimeThreshold— the minimum age of a Pod before a recommendation can be applied.resourceDiffPercentage— the minimum percentage change required before a new recommendation is applied.minAllowed/maxAllowed— the lower and upper bounds for the autoscaled resources.controlledResources— the resource types to autoscale (e.g.cpu,memory).containerControlledValues— whether to controlRequestsAndLimitsor justRequests.
In the next doc, we are going to show a step-by-step guide on autoscaling the compute resources of a Weaviate cluster.































