Stop an instance group
If you do not need instances in a group for a while, stop the group. All instances in the group will be stopped. If the instance group is very large and it would take a long time to create that many instances afterwards, stopping a group is more effective than deleting it or reducing its size to zero.
Note
If you stop a single instance in a group instead of the whole group, Instance Groups automatically restarts the VM.
Only disks are billable for stopped instances. If you do not want to pay for disk usage, reduce the instance group size to 0 or delete the group. To avoid losing data, make snapshots of the disks.
- In the management console
, open the folder with the appropriate instance group. - Select Compute Cloud.
- In the left-hand panel, select
Instance groups. - In the line with the appropriate instance group, click
and select Stop group. - In the window that opens, click Stop.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the CLI command to stop an instance group:
yc compute instance-group stop --help
-
Get a list of instance groups in the default folder:
yc compute instance-group list
Result:
+----------------------+-----------------------+------+ | ID | NAME | SIZE | +----------------------+-----------------------+------+ | amc65sbgfqeq******** | first-instance-group | 2 | +----------------------+-----------------------+------+
-
Select the group
ID
orNAME
(for example,first-instance-group
). -
Stop the instance group in the default folder:
yc compute instance-group stop first-instance-group
Instance Groups will begin stopping instances in the group. When all instances are stopped, the group switches to the
STOPPED
status.
You can stop an instance group by using the stop REST API method for the InstanceGroup resource or the InstanceGroupService/Stop gRPC API call.
To request the list of available instance groups, use the listInstances REST API method or the InstanceGroupService/ListInstances gRPC API call.