Stopping an instance group
If you do not need instances in a group for now, stop the group. All VM instances in the group will be stopped. If an instance group is very large and creating that many VM instances is time-consuming, it is more efficient to stop the group rather than deleting it or scaling it down to zero.
Note
If you stop a single VM instance in a group rather than the entire group, Instance Groups will automatically restart that instance.
For stopped instances, only disks are billable. If you do not want to pay for disk usage, scale down the instance group to zero or delete the group. To avoid losing data, make snapshots of the disks.
- In the management console
, open the folder containing the instance group in question. - Select Compute Cloud.
- In the left-hand panel, select
Instance groups. - In the line with the instance group, click
and select Stop group and VM. - In the window that opens, click Stop.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder through the --folder-name
or --folder-id
parameter.
-
See the description of the CLI command for stopping 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
ID
orNAME
of the group in question, e.g.,first-instance-group
. -
Stop the instance group in the default folder:
yc compute instance-group stop first-instance-group
Instance Groups will initiate stopping VM instances in the group. When all instances are stopped, the group will get the
STOPPED
status.
To stop an instance group, use the stop REST API method for the InstanceGroup resource or the InstanceGroupService/Stop gRPC API call.
To request a list of available instance groups, use the listInstances REST API method or the InstanceGroupService/ListInstances gRPC API call.