Stay organized with collections Save and categorize content based on your preferences.
gcloud compute instance-groups managed set-autoscaling
NAME
--max-num-replicas
=MAX_NUM_REPLICAS
[--cool-down-period
=COOL_DOWN_PERIOD
] [--cpu-utilization-predictive-method
=CPU_UTILIZATION_PREDICTIVE_METHOD
] [--custom-metric-utilization
=[metric
=METRIC
],[utilization-target
=UTILIZATION-TARGET
],[utilization-target-type
=UTILIZATION-TARGET-TYPE
]] [--description
=DESCRIPTION
] [--min-num-replicas
=MIN_NUM_REPLICAS
] [--mode
=MODE
] [--remove-stackdriver-metric
=METRIC
] [--scale-based-on-cpu
] [--scale-based-on-load-balancing
] [--scale-in-control
=[max-scaled-in-replicas
=MAX-SCALED-IN-REPLICAS
],[max-scaled-in-replicas-percent
=MAX-SCALED-IN-REPLICAS-PERCENT
],[time-window
=TIME-WINDOW
]] [--set-schedule
=SCHEDULE_NAME
] [--stackdriver-metric-filter
=FILTER
] [--stackdriver-metric-single-instance-assignment
=ASSIGNMENT
] [--stackdriver-metric-utilization-target
=TARGET
] [--stackdriver-metric-utilization-target-type
=TARGET_TYPE
] [--target-cpu-utilization
=TARGET_CPU_UTILIZATION
] [--target-load-balancing-utilization
=TARGET_LOAD_BALANCING_UTILIZATION
] [--update-stackdriver-metric
=METRIC
] [--region
=REGION
| --zone
=ZONE
] [--schedule-cron
=CRON_EXPRESSION
--schedule-description
=DESCRIPTION
--schedule-duration-sec
=DURATION
--schedule-min-required-replicas
=MIN_REQUIRED_REPLICAS
--schedule-time-zone
=TIME_ZONE
] [GCLOUD_WIDE_FLAG …
]
gcloud compute instance-groups managed set-autoscaling
sets autoscaling parameters of specified managed instance group.
Autoscalers can use one or more autoscaling signals. Information on using multiple autoscaling signals can be found here: https://cloud.google.com/compute/docs/autoscaler/multiple-signals
NAME
--max-num-replicas
=MAX_NUM_REPLICAS
--cool-down-period
=COOL_DOWN_PERIOD
--cpu-utilization-predictive-method
=CPU_UTILIZATION_PREDICTIVE_METHOD
CPU_UTILIZATION_PREDICTIVE_METHOD
must be one of:
none
optimize-availability
--custom-metric-utilization
=[metric
=METRIC
],[utilization-target
=UTILIZATION-TARGET
],[utilization-target-type
=UTILIZATION-TARGET-TYPE
]
metric
utilization-target
utilization-target-type
Mutually exclusive with --update-stackdriver-metric
.
--description
=DESCRIPTION
--min-num-replicas
=MIN_NUM_REPLICAS
--mode
=MODE
You can turn off or restrict a group's autoscaler activities without affecting your autoscaler configuration. The autoscaler configuration persists while the activities are turned off or restricted, and the activities resume when the autoscaler is turned on again or when the restrictions are lifted.
MODE
must be one of:
off
on
only-scale-out
only-up
Value only-up
is deprecated. Use --mode only-scale-out
instead.
--remove-stackdriver-metric
=METRIC
--scale-based-on-cpu
--scale-based-on-load-balancing
--scale-in-control
=[max-scaled-in-replicas
=MAX-SCALED-IN-REPLICAS
],[max-scaled-in-replicas-percent
=MAX-SCALED-IN-REPLICAS-PERCENT
],[time-window
=TIME-WINDOW
]
max-scaled-in-replicas
max-scaled-in-replicas-percent
time-window
--set-schedule
=SCHEDULE_NAME
--stackdriver-metric-filter
=FILTER
--stackdriver-metric-single-instance-assignment
=ASSIGNMENT
-stackdriver-metric-utilization-target-type
, -stackdriver-metric-utilization-target-type
, and --custom-metric-utilization
.
--stackdriver-metric-utilization-target
=TARGET
--stackdriver-metric-utilization-target-type
. Mutually exclusive with --stackdriver-metric-single-instance-assignment
and --custom-metric-utilization
.
--stackdriver-metric-utilization-target-type
=TARGET_TYPE
--stackdriver-metric-utilization-target
. Mutually exclusive with --stackdriver-metric-single-instance-assignment
and --custom-metric-utilization
. TARGET_TYPE
must be one of: delta-per-minute
, delta-per-second
, gauge
.
--target-cpu-utilization
=TARGET_CPU_UTILIZATION
--target-load-balancing-utilization
=TARGET_LOAD_BALANCING_UTILIZATION
--update-stackdriver-metric
=METRIC
--stackdriver-metric-single-instance-assignment
or --stackdriver-metric-utilization-target
and --stackdriver-metric-utilization-target-type
. Mutually exclusive with --custom-metric-utilization
.
--region
=REGION
A list of regions can be fetched by running:
gcloud compute regions list
Overrides the default compute/region
property value for this command invocation.
--zone
=ZONE
A list of zones can be fetched by running:
gcloud compute zones list
Overrides the default compute/zone
property value for this command invocation.
--schedule-cron
=CRON_EXPRESSION
This is when the autoscaler starts creating new VMs, if the group's current size is less than the minimum required instances. Set the start time to allow enough time for new VMs to boot and initialize. For example if your workload takes 10 minutes from VM creation to start serving then set the start time 10 minutes earlier than the time you need VMs to be ready.
--schedule-description
=DESCRIPTION
--schedule-duration-sec
=DURATION
Minimum duration is 5 minutes. A scaling schedule is active from its start time and for its configured duration. During this time, the autoscaler scales the group to have at least as many VMs as defined by the minimum required instances. After the configured duration, if there is no need to maintain capacity, the autoscaler starts removing instances after the usual stabilization period and after scale-in controls (if configured). For more information, see Delays in scaling in and Scale-in controls. This ensures you don't accidentally lose capacity immediately after the scaling schedule ends.
--schedule-min-required-replicas
=MIN_REQUIRED_REPLICAS
Autoscaler provides at least this number of instances when the scaling schedule is active. A managed instance group can have more VMs if there are other scaling schedules active with more required instances or if another signal (for example, scaling based on CPU) requires more instances to meet its target.
This configuration does not change autoscaling minimum and maximum instance limits which are always in effect. Autoscaler does not create more than the maximum number of instances configured for a group.
--schedule-time-zone
=TIME_ZONE
It should be provided as a name from the IANA tz database (for example Europe/Paris or UTC). It automatically adjusts for daylight savings time (DST). If no time zone is provided, UTC is used as a default.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list of valid timezones.
--access-token-file
, --account
, --billing-project
, --configuration
, --flags-file
, --flatten
, --format
, --help
, --impersonate-service-account
, --log-http
, --project
, --quiet
, --trace-token
, --user-output-enabled
, --verbosity
.
Run $ gcloud help
for details.
gcloud alpha compute instance-groups managed set-autoscaling
gcloud beta compute instance-groups managed set-autoscaling
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4