How-to: Manage scaling policies

Once you've created your scaling policies, ongoing management involves assigning workloads, modifying policy configurations, and maintaining your optimization strategy as your infrastructure evolves. This guide covers the key management tasks for keeping your scaling policies effective and up-to-date.

Workload assignment and reassignment

Managing which workloads are assigned to specific scaling policies is a core aspect of workload optimization. You can control assignments through assignment rules or manual assignment methods.

View policy assignments

You can view policy assignments and workload distributions in several ways:

From the scaling policies table:

  • Navigate to Workload autoscaler > Scaling policies
  • The Workloads column shows the number of workloads assigned to each policy
  • Click on the workload count to see a detailed list of assigned workloads in the drawer that opens

From the workloads list:

  • Navigate to Workload autoscaler > Optimization
  • The Scaling policy column shows which policy is assigned to each workload
  • Use the Scaling policy filter dropdown to view workloads assigned to specific policies

From the workload details page:

  1. Navigate to the workload details page by clicking on a workload
  2. In the Rightsizing settings section, locate Vertical scaling policy
  3. Use the dropdown to select a different policy
  4. Save the changes

Assign workloads in bulk

To assign multiple workloads to a scaling policy:

  1. Navigate to Workload autoscaler > Optimization
  2. Use the checkboxes to select multiple workloads from the list
  3. Click on Assing vertical scaling policy
  4. Select the target scaling policy from the available options
  5. Confirm the assignment

You can filter workloads before bulk assignment using the plethora of different options to narrow down your selection.

Move workloads between policies

The process of moving workloads between policies is exactly the same as the process of assigning them to a policy for the first time. Therefore, reference the workload assignment and reassignment section above.

Impact of policy changes:

  • New policy settings take effect immediately
  • Recommendations are recalculated based on the new policy configuration

Manage unassigned workloads

Workloads that don't match any assignment rules are automatically assigned to the default policy. For this reason, the default policy typically shows the highest workload count for clusters without extensive assignment rules.

For better, more targeted workload optimization:

  1. Review workloads assigned to the default policy
  2. Create appropriate assignment rules to automatically capture these workloads and assign them to appropriate pre-defined system policies offered by Cast or custom policies that you have configured, or manually reassign individual workloads to more specific policies.

Assignment rule management

Assignment rules automatically assign workloads to policies based on their characteristics. You can manage these rules from the policy view.

Add a new assignment rule

For detailed information on the configuration options of assignment rules, refer to our guide on creating a scaling policy.

To add assignment rules to an existing policy, follow these steps:

  1. Navigate to the scaling policy details page
  2. Go to the Assignment rules tab
  3. Click Add rule to create additional assignment criteria
  4. Configure namespace, workload type, and label filters
  5. Save the policy to activate the new rules

Modify or delete a assignment rule

To modify an existing assignment rule,

  1. Navigate to the scaling policy details page
  2. Go to the Assignment rules tab
  3. Use the Filters applied panel to review current rule settings
  4. Configure namespace, workload type, and label filters
  5. Optionally, remove individual filters using the X button next to each filter

To remove a assignment rule:

  1. Use the Delete assignment rule option in the rule configuration menu
  2. Confirm the deletion to remove the rule permanently

Workloads previously matched by the deleted rule will be reassigned based on remaining rules or moved to the default policy.

Policy modification and updates

Scaling policies need to evolve as your workloads and optimization requirements change. Understanding how to modify policies and their impact on assigned workloads is crucial.

Edit policy settings

You can modify scaling policy settings at any time:

Accessing policy settings:

  1. Navigate to Workload autoscaler > Scaling policies
  2. Click on the policy name to open the policy details view
  3. Use the Settings tab to modify optimization parameters

Refer to our guide on creating a scaling policy for detailed instructions or our reference document on available settings for all available configuration options.

Impact on assigned workloads:

  • Settings changes apply immediately to all workloads assigned to the policy
  • New resource request recommendations are generated based on updated policy parameters

Policy lifecycle management

Managing the lifecycle of scaling policies includes enabling, disabling, and removing policies while ensuring workload continuity.

Enable and disable automated optimization

You can temporarily disable the automated resource optimization aspect of policies without deleting them, as well as re-enable it later when your requirements change. To do so, follow these steps:

  1. Toggle the policy switch to the on/off position in the scaling policies table

Impact on assigned workloads:

  • Workloads remain assigned to disabled policies, but optimization is paused
  • Assignment rules for disabled policies continue to match new workloads
  • Recommendations can still be viewed, but won't be applied automatically
  • Workloads continue running with their current resource allocations

Delete a policy

Deleting policies is irreversible and requires careful consideration:

Prerequisites before deletion:

  • Review all workloads assigned to the policy
  • Decide whether to reassign workloads to other policies or let them be reassigned by assignment rules of other policies

Deletion process:

  1. Navigate to Workload autoscaler > Scaling policies
  2. Click on the policy name to open the policy details view
  3. Use the policy actions menu (three dots) to select Delete policy
  4. Confirm the deletion in the dialog box
  5. The policy is permanently removed from the system

Workloads from deleted policies are automatically moved to the next-in-line scaling policy whose assignment rules match them or to the default policy.

Next steps