Restarting and recreating instances in a group one by one
Instances in a group can be automatically restarted or recreated one by one based on the parameters specified in the instance group deployment policy. These actions can apply both to all instances in the group and to specified instances only.
For example, if the maximum number of unhealthy instances per group set in the deployment policy is 1
, then, when restarting or recreating instances one by one, only one instance will be unavailable at any given time and each next instance will be restarted or recreated only after the status of the previous instance changes to Running
.
Restarting group instances one by one may be useful, for example, when updating the VM software. This feature allows performing automatic software updates with no downtime of the instance group resources for end users.
Recreating group instances one by one may be useful, for example, when migrating an instance group to a different availability zone. This feature allows recreating instances in a group automatically with no downtime of the instance group resources for end users.
Warning
With the manual instance stopping strategy, Instance Groups will restart or recreate an instance if at least one of the following conditions is met:
- User stops the instance in Compute Cloud.
- Application or user stops the instance internally.
- Instance fails the application health check.
To restart or recreate instances in a group one by one, use the Yandex Cloud CLI or make an API request.