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

Replicas Downscale supports GitOps workflows through the DownscaleConfiguration custom resource. When DownscaleConfiguration resources exist, they take precedence over the UI configuration, and UI mutations are blocked.

In order to define replicas downscale configurations via GitOps, create DownscaleConfiguration custom resources in the scaleops-system namespace.

GitOps Support for Workload Schedule Attachment

Schedule policy assignment and automation can also 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 named schedule policy to this workload

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: # ...

Configuration Fields

FieldTypeRequiredDescription
namestringYesUnique policy name identifier
replicasintNo (default: 1)Specifies the target replica count for non-HPA workloads
minReplicasintNo (default: 1)Defines the target minReplicas for HPA-managed workloads. The minimum allowed value is 1
sleepboolNo (default: false)A toggle equivalent to setting replicas: 0 for non-HPA workloads, intended for UI visibility
nonHpaEnabledboolNo (default: true)Controls whether this policy applies to workloads without an HPA
hpaEnabledboolNo (default: true)Controls whether this policy applies to workloads with an HPA
includedWorkloadsobject[]NoDeprecated since 1.30.8 — Previously used to target workloads via namespace, label, annotation, or name rules. Replaced by attaching policies directly to workloads or namespaces. Existing configurations remain functional.
scheduleobject[]NoSpecifies time windows for when the downscaling should be active (see below)

includedWorkloads Object (deprecated since 1.30.8)

FieldTypeRequiredDescription
namespacesstring[]NoA list of specific namespaces to include in the downscaling
labelsobject[]NoA list of label selector requirements used to match workloads (see below)
annotationsobject[]NoA list of annotation selector requirements used to match workloads (see below)
namesstring[]NoA list detailing the namespace/kind/name of specific workloads to include

Label and Annotation object (used within deprecated includedWorkloads)

Same selector object for both labels and annotations fields:

FieldTypeRequiredDescription
keystringYesThe label or annotation key to match
operatorstringYesThe selector logic, one of In (matches specific values) or Exists (checks if key exists)
valuesstring[]NoThe values to search for with In operators

Schedule Object

FieldTypeRequiredDescription
daysint[]YesList of days (0 is Sunday, 6 is Saturday)
beginTimestringYesStart time in HH:MM format (24-hour)
endTimestringYesEnd time in HH:MM format (24-hour)

Example:

apiVersion: analysis.scaleops.sh/v1alpha1 kind: DownscaleConfiguration metadata: name: off-hours-downscale namespace: scaleops-system spec: name: "off-hours-downscale" replicas: 1 minReplicas: 1 sleep: false nonHpaEnabled: true hpaEnabled: true schedule: - days: [0, 6] # Sunday and Saturday beginTime: "00:00" endTime: "23:59" - days: [1, 2, 3, 4, 5] # Monday to Friday beginTime: "22:00" endTime: "06:00" --- apiVersion: analysis.scaleops.sh/v1alpha1 kind: DownscaleConfiguration metadata: name: weekend-shutdown namespace: scaleops-system spec: name: "weekend-shutdown" replicas: 0 nonHpaEnabled: true hpaEnabled: false schedule: - days: [0, 6] # Weekends beginTime: "00:00" endTime: "23:59"

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

  • Only Deployment workload types are supported
    • 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