Disabling and enabling availability zones for a Yandex Compute Cloud instance group
In Compute Cloud, you can temporarily disable one or more availability zones for an instance group. This helps maintain your services available during events affecting the availability zone, such as testing, maintenance, outages, or incidents.
For example, disabling a zone for an instance group prevents gray failures in that zone, i.e., situations where health checks and monitoring tools show no failures, yet a portion of the actual traffic fails to reach your instances there.
Also, a good practice is to temporarily disable a zone during a zonal incident, so you can gradually reintroduce instances from the affected zone in a controlled manner. See Instance group in a temporarily disabled zone during an incident for details.
Warning
You cannot temporary disable zones for instance groups created by a Managed Service for Kubernetes cluster as its node groups.
You can re-enable a group’s availability zone at any time or set a timeout for automatic reactivation.
For more information on instance group behavior when an availability zone is disabled, see this page.
Disabling an availability zone
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the command to disable an availability zone:
yc compute instance-group disable-zones --help -
Get a list of all instance groups in the default folder:
yc compute instance-group listResult:
+----------------------+----------------------+--------+------+ | ID | NAME | STATUS | SIZE | +----------------------+----------------------+--------+------+ | amc65sbgfqeq******** | test-group | ACTIVE | 3 | | cl1cvs4firjj******** | catsf2nfq0mh******** | ACTIVE | 1 | +----------------------+----------------------+--------+------+ -
Disable one or more availability zones for the group:
yc compute instance-group disable-zones \ --id <instance_group_ID> \ --zones=<zone_1_ID>,[<zone_2_ID>] \ --duration=<duration>Where:
--id: Instance group ID.--zones: Availability zone IDs, e.g.,ru-central1-a.--duration: Duration, from1mto72h. No value stands for unlimited duration. If zones are provided as a list, they all will be disabled for the specified period.
Enabling an availability zone
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the command to enable an availability zone:
yc compute instance-group enable-zones --help -
Get a list of all instance groups in the default folder:
yc compute instance-group listResult:
+----------------------+----------------------+--------+------+ | ID | NAME | STATUS | SIZE | +----------------------+----------------------+--------+------+ | amc65sbgfqeq******** | test-group | ACTIVE | 3 | | cl1cvs4firjj******** | catsf2nfq0mh******** | ACTIVE | 1 | +----------------------+----------------------+--------+------+ -
Enable one or more availability zones for the group:
yc compute instance-group enable-zones \ --id <instance_group_ID> \ --zones=<zone_1_ID>,[<zone_2_ID>]Where:
--id: Instance group ID.--zones: Availability zone IDs, e.g.,ru-central1-a.
Viewing the availability zone status and time before activation
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
Run the command below and specify the instance group ID:
yc compute instance-group get \
--id <instance_group_ID>
Result:
id: amc65sbgfqeq********
...
disable_zone_statuses:
- zone_id: ru-central1-a
- zone_id: ru-central1-b
disabled_until: "2025-06-06T04:10:02.679608678Z"
Where disabled_until indicates the availability zone auto-activation time.