Skip to main content
Version: v1.2.x

Create and Manage Scaling Policies

This guide describes how to create and manage Scaling Policies. A Scaling Policy defines autoscaling behavior for a Compute Pool by configuring CPU and GPU utilization thresholds, scaling durations, resource bounds, and cooldown periods.

When a Compute Pool references a Scaling Policy, PaletteAI continuously monitors resource utilization and automatically adds or removes nodes to match workload demand.

You can create Scaling Policies using the PaletteAI UI or using YAML Kubernetes manifests.

Prerequisites

Before you create a Scaling Policy, confirm that you have the following resources available.

  • The spectrocloud.com/scalingpolicies:create permission. If the Create Scaling Policy button is not displayed, your role does not include the required permission.

  • A Compute Pool in Running status to enable autoscaling on.

  • Prometheus running and accessible from the hub cluster. The ScalingPolicy controller queries Prometheus for CPU and GPU utilization metrics. Refer to Configure Prometheus Agent Monitoring to configure global.metrics, spoke-side Prometheus agents, and GPU metric collection prerequisites.

Create a Scaling Policy

A Scaling Policy must include at least one CPU or GPU scaling configuration.

  1. Log in to the PaletteAI console.

  2. Select the Project in which you want to create the Scaling Policy.

  3. From the left main menu, select Settings, and then select the Autoscaling Policies tab.

  4. Select Create Scaling Policy. The Create Auto-Scaling Policy dialog appears.

  5. Enter a Scaling Policy Name.

  6. In the Metrics section, select Add Metric. Choose the metric to scale on, either CPU or a GPU variant, and configure the Scale Up Threshold, Scale Up Duration, Scale Down Threshold, and Scale Down Duration values. Repeat this step for each metric you want the policy to evaluate.

  7. (Optional) In the Resource Bounds section, select Add Resource Bound and set the minimum and maximum CPU or GPU counts the policy may scale between.

  8. (Optional) Adjust the Cool Down Duration and Timeout Duration values.

  9. Select Create. The new policy appears in the Autoscaling Policies table.

info

Tenant administrators can also manage Scaling Policies for all Projects from the Tenant Settings > Autoscaling Policies menu, which provides Tenant and Projects tabs.

Reference a Scaling Policy from a Compute Pool

A Compute Pool opts in to autoscaling by referencing a Scaling Policy.

To attach a Scaling Policy while creating a Compute Pool:

  1. On the Node config page, select Scaling Policy in the left panel under Autoscaling.

  2. Turn on Auto-Scaling Policy.

  3. Select the Scaling Policy, and continue the creation workflow.

To attach or change the Scaling Policy on an existing Compute Pool:

  1. From the left main menu, select Compute Pools, and then select the Compute Pool.

  2. In the top-right, select Settings > Compute Pool Settings.

  3. Turn on Auto-Scaling Policy, select the Scaling Policy, and Save your changes.

After the reference is applied, PaletteAI begins evaluating metrics and the Scaling Policy status reflects the associated Compute Pool.

Validate

  1. From the left main menu, select Settings, and then select the Autoscaling Policies tab. Confirm the policy appears in the table along with its associated Compute Pools.

  2. From the left main menu, select Compute Pools, and then select the Compute Pool that references the policy. On the Overview tab, confirm the Auto-Scaling field displays the policy name.

Update a Scaling Policy

You can update a Scaling Policy you created or cloned in your project namespace at any time. Changes take effect on the next reconciliation cycle. Pre-defined policies (aggressive, balanced, conservative) in the platform namespace (mural-system) cannot be modified by users. To change their behavior, clone one to your project namespace and update the clone.

  1. From the left main menu, select Settings, and then select the Autoscaling Policies tab.

  2. Beside the policy, select the three-dot menu, and choose Edit. To customize a pre-defined policy, choose Clone instead, and then edit the clone.

  3. Adjust the metrics, resource bounds, and durations as needed, and Save your changes. A warning is displayed when the policy is in use, because editing it impacts all associated Compute Pools.

info

Updating a Scaling Policy does not interrupt active scaling operations. The new configuration applies after the current scaling action completes.

Delete a Scaling Policy

Before you delete a Scaling Policy, remove the reference from all Compute Pools that use it. PaletteAI prevents deletion of a Scaling Policy that is still referenced by active Compute Pools.

  1. For each Compute Pool that references the policy, open the Compute Pool, select Settings > Compute Pool Settings, turn off Auto-Scaling Policy, and Save your changes.

  2. From the left main menu, select Settings, and then select the Autoscaling Policies tab.

  3. Beside the policy, select the three-dot menu, and choose Delete.

  4. In the confirmation dialog, select Delete.

Next Steps