Configuring AIScaleTargets
To enable Thoras to manage or recommend scaling for your workload, you must
register an AIScaleTarget
Custom Resource (CRD) in your Kubernetes cluster.
This guide will walk you through doing this by applying an AIScaleTarget
resource with kubectl
.
Prerequisites
- A running Kubernetes cluster with Kubernetes metrics server installed
- Thoras installed and running (see quickstart guide)
0. (Optional) Auto-configure AIScaleTarget
s using the dashboard
On a fresh installation, Thoras can auto-discover workloads and make suggestions
to auto-populate AIScaleTarget
s in the cluster. This enables metric collection
and resource recommendations for the selected workloads (see
quickstart guide).
Eventually you will probably want to integrate your AIScaleTarget
configurations into your delivery pipelines, but the auto-populate feature is a
particularly useful way to try out the product without having to manage any
configuration.
1. Define Initial AIScaleTarget
Custom Resource
Create a new file named my-ast.yaml
metadata.name
: The name for yourAIScaleTarget
resource (should match your workload name for clarity).metadata.namespace
: The namespace where your workload is running.spec.scaleTargetRef
: Points to the Kubernetes resource (usually a Deployment) you want to scale.spec.model.forecast_blocks
: How far into the future to forecastspec.model.forecast_cron
: How often to make a forecast.
2. Apply the AIScaleTarget
Using the CLI
Use kubectl apply
to register the AIScaleTarget
with your cluster:
You should see output like:
3. Verify the AIScaleTarget
Check that your AIScaleTarget
was created:
To see details:
Note: An existing AIScaleTarget
can be exported to a YAML for version control
or editing with: