Skip to Content

Replicas Downscale
Available in v1.26.29+

The Replicas Downscale feature enables scheduled reduction of workload replicas during defined time periods (e.g., off-hours, weekends). This feature helps organizations reduce costs by automatically scaling down non-critical workloads when they are not needed and restoring them when the schedule ends.

Key Capabilities

  • Per-workload and namespace-level automation: Enable downscaler automation on individual workloads or across an entire namespace. A namespace-level default policy assigns it to all new workloads in that namespace.
  • Flexible schedule attachment: Attach the desired downscale schedule directly to each workload or namespace, giving full control over when each specific workload or namespace is downscaled.
  • HPA integration: For workloads with HPA, the downscaler adjusts minReplicas instead of directly modifying replicas
  • Automatic restoration: When the schedule ends, workloads are automatically restored to their original replica counts
  • Multi-configuration support: Create multiple downscale policies with different schedules and attach them to different workloads or namespaces as needed
  • Real-time metrics: Track CPU, memory, and cost savings from downscaling activities

How to Use

Replicas Downscaler

Accessing the Downscaler

Navigate to the Downscaler page under the Replicas Optimization menu.

Creating a Downscale Policy

Replicas Downscaler Config

  • Click “Create Schedule Policy” button
  • Fill in the policy form:

General Section

  • Name: Unique identifier for this policy
  • Scale down non-HPA workloads: Set target number of replicas for non-HPA workloads
  • Scale down HPA workloads: Set the target minimum replicas for workloads with HPA
Included Workloads Section
ℹ️

Deprecated since version 1.30.8. The Included Workloads section has been deprecated. Workload targeting is now done by attaching a schedule policy directly to individual workloads or namespaces (see below). Existing configurations using Included Workloads will continue to work but should be migrated to the new attachment model.

Define which workloads should be affected using inclusion rules:

  • Namespaces: List of namespaces (OR logic - workload matches if in ANY listed namespace)
  • Labels: Label selector requirements (AND logic - ALL requirements must match)
  • Annotations: Annotation selector requirements (AND logic - ALL requirements must match)
  • Names: Specific workload names (OR logic - workload matches if name is in list)

Important Notes:

  • Multiple inclusion rules are combined with OR logic - workload is included if ANY rule matches
  • Within a rule, Namespaces + Labels + Annotations use AND logic between these groups
  • Names are exclusive - cannot be combined with Namespaces, Labels, or Annotations in the same rule
  • If no rules are specified, all workloads (Deployments) are included

Schedule Section

Define when the downscaling should be active:

  • Days: Select which days of the week
  • Start Time and End Time: The period in which the downscaling will be active

You can add multiple schedule periods to cover different time windows.

Default Schedules

ScaleOps ships three built-in schedule policies for convenience. All three default to EST (America/New_York) timezone but can be adjusted to your needs:

PolicySchedule
NightsEvery night, 11 PM – 7 AM
WeekendsAll day Saturday and Sunday
Nights and WeekendsCombination of both of the above

The Nights policy is automatically assigned as the default schedule for workloads.

To change the timezone applied to all default schedules, set the following Helm value:

defaultTimezone: "America/New_York" # default; accepts any IANA timezone string

Attaching a Policy to Workloads or Namespaces

Once a policy is created, attach it directly to the desired targets:

  • Individual workload: Select a workload from the workloads table and assign it a policy. The attached schedule controls exactly when that workload is downscaled.
  • Namespace: Assign a policy to a namespace to apply it as the default for all workloads in that namespace. Any new workload created in that namespace automatically inherits the namespace-level policy.

Managing Replicas Downscale with GitOps

Schedule policies are DownscalerPolicy custom resources. Create them in the ScaleOps namespace (scaleops-system by default) and attach them to workloads or namespaces by name. For the rules shared by all policy kinds, see GitOps Policies.

⚠️

The DownscaleConfiguration custom resource is deprecated. Define schedule policies as DownscalerPolicy resources.

Attaching a Schedule Policy

Schedule policy assignment and automation can be managed directly on workload manifests using annotations:

AnnotationDescription
scaleops.sh/default-downscaler-auto: "true"Enable downscaler automation for this workload
scaleops.sh/default-downscaler-schedule: "<schedule_name>"Attach a DownscalerPolicy to this workload, by its metadata.name

Example:

apiVersion: apps/v1 kind: Deployment metadata: name: my-app namespace: production annotations: scaleops.sh/default-downscaler-auto: "true" scaleops.sh/default-downscaler-schedule: "nights" spec: # ...

To attach a schedule to every workload in a namespace, use the defaultDownscalerSchedule field of the AutomatedNamespace CRD or the same annotations on the Namespace object.

DownscalerPolicy YAML Reference

This example is the built-in Nights schedule, as ScaleOps creates it with the default America/New_York time zone, saved under a new name:

apiVersion: analysis.scaleops.sh/v1alpha1 kind: DownscalerPolicy metadata: name: my-nights namespace: scaleops-system spec: name: my-nights replicas: 1 minReplicas: 1 schedule: - weeklyConfig: days: [0, 1, 2, 3, 4, 5, 6] beginTime: "04:00" # 23:00 in America/New_York (standard time) endTime: "12:00" # 07:00 in America/New_York (standard time)

Schedule times are in UTC. The defaultTimezone Helm value only sets the time zone ScaleOps converts the built-in schedules from; it does not apply to schedules you define. The built-in schedules are converted using standard time, so during daylight saving time they start and end an hour off local time.

FieldTypeDescription
namestringRequired. Set it to the same value as metadata.name, as the built-in schedules do.
replicasinteger (0 or more)Target replica count for workloads without an HPA while the schedule is active. Required for those workloads unless sleep is true; without it, ScaleOps blocks their downscaling and records a DownscaleBlocked event.
minReplicasinteger (1 or more)Target HPA minReplicas for workloads with an HPA while the schedule is active. Required for those workloads; without it, ScaleOps blocks their downscaling and records a DownscaleBlocked event.
sleepbooleanScale workloads without an HPA to zero replicas while the schedule is active.
nonHpaEnabledbooleanWhether the policy applies to workloads without an HPA.
hpaEnabledbooleanWhether the policy applies to workloads with an HPA.
schedulearrayTime windows when the downscaling is active. Each entry holds one weeklyConfig.

schedule[].weeklyConfig takes:

FieldTypeDescription
daysinteger[]Days of the week, from 0 (Sunday) to 6 (Saturday).
beginTimestringStart time in UTC, HH:MM (24-hour).
endTimestringEnd time in UTC, HH:MM (24-hour). A window can cross midnight, for example 22:00 to 06:00.

Downscaling Overview Page

The Downscaler page provides a full overview of schedule policies, their impact on the cluster, and the automation status of each workload.

Top Metrics

  • Monthly Cost: Estimated monthly cost of downscaled resources
  • CPU Request: Average monthly CPU saved by the feature
  • Memory Request: Average monthly GB of memory saved by the feature
  • GPU Request: Average monthly GPU saved by the feature
  • Wasted Spend: Percentage of resources that can still be saved by automating more workloads
  • Active Workloads: Number of workloads currently being downscaled
  • Scheduled: Number of workloads that are automated for scheduling

Graphs (7-day and 30-day views)

  • CPU Over Time: Tracks Optimized request, Request, and Allocatable CPU over the selected period
  • Memory Over Time: Tracks Optimized request, Request, and Allocatable memory over the selected period

Schedule Policies

Displays all configured schedule policies as cards. Each card shows:

  • Policy name and an ACTIVE NOW badge when the schedule is currently in effect
  • Attached workloads count — number of workloads using this policy
  • HPA setting — the target minReplicas applied to HPA-managed workloads during the schedule window
  • Non-HPA setting — the target replica count applied to non-HPA workloads during the schedule window
  • Weekly schedule bar chart — visual representation of which days and hours the policy is active, with a legend for Scheduled, No schedule, and Current time

Use the New Schedule Policy button to create a new policy, and the Show in UTC toggle to display schedule times in UTC.

Workloads Table

Lists all workloads tracked by the downscaler. Switch between the Workloads and Aggregation tabs to view individual workloads or aggregated data.

Filters: automated, unautomated, savings, schedule policies, currently downscaled, namespaces

Columns:

ColumnDescription
WorkloadNamespace and workload name
Savings AvailableEstimated weekly savings if the workload is downscaled
GPU RequestCurrent vs optimized GPU request
CPU RequestCurrent vs optimized CPU request
Memory RequestCurrent vs optimized memory request
ReplicasCurrent replica count vs desired
Schedule PolicyThe schedule policy currently attached to this workload
AutomatedToggle to enable or disable downscaler automation for this workload

Use the Downscaler Actions button to apply bulk operations (assign policy, enable/disable automation) across selected workloads.

Prerequisites & Limitations

  • Deployment and Argo Rollout workload types are supported Available in v1.32.13+ (Argo Rollout support)
    • They can optionally have an HPA - in this case, the downscaler adjusts minReplicas instead of directly modifying replicas. When using KEDA, the downscaler will modify .spec.minReplicaCount.
    • Deployments can be managed by Argo CD - the downscaler handles Argo-managed workloads without conflicts. Read more about integration with ArgoCD in the Documentation.
  • Flux managed deployments are not supported
  • Workloads in ignored namespaces or exclusion lists will not be downscaled
Helm 4 uses server-side apply by default. ScaleOps detects this and handles it automatically, preventing conflicts on helm upgrade. Available in v1.34.2+

Replicas Downscaler
Replicas Downscaler Config