Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
      • Updating an instance group
      • Updating an instance group based on a YAML specification
      • Enable deletion protection
      • Disabling and enabling availability zones for an instance group
      • Moving an instance group to a different availability zone
      • Moving an instance group with a network load balancer to a different availability zone
      • Moving an instance group with an L7 load balancer to a different availability zone
      • Configuring application health checks on a VM instance
      • Pausing an instance group
      • Resuming an instance group
      • Sequentially restarting instances in a group
      • Sequentially recreating instances in a group
      • Stopping an instance group
      • Starting an instance group
      • Configuring instance group access permissions
      • Removing an instance group from a placement group
      • Deleting an instance group
    • Enabling a software-accelerated network
    • Viewing operations on service resources
    • Viewing metrics in Monitoring
    • NVIDIA driver update guide
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Managing an instance group
  3. Sequentially recreating instances in a group

Sequentially recreating instances in a group

Written by
Yandex Cloud
Updated at June 30, 2026
View in Markdown

You can sequentially recreate group instances based on the parameters specified in the deployment policy.

For example, if the deployment policy specifies a maximum of 1 unavailable instance per group, then only one instance will be down at any given time when sequentially recreating instances.

Warning

With the instance stopping strategy, Instance Groups will restart or recreate a VM instance if at least one of the following conditions is met:

  • The user stops the instance in Compute Cloud.
  • The application or user stops the instance internally.
  • The instance fails the application health check.

To sequentially recreate instances in a group:

CLI
API

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI command for recreating an instance group:

    yc compute instance-group rolling-recreate --help
    
  2. Get a list of folders in the default cloud:

    yc resource-manager folder list
    

    Result:

    +----------------------+--------------------+------------------+--------+
    |          ID          |        NAME        |      LABELS      | STATUS |
    +----------------------+--------------------+------------------+--------+
    | b1gd129pp9ha******** | my-folder          |                  | ACTIVE |
    | b1g66mft1vop******** | default            |                  | ACTIVE |
    +----------------------+--------------------+------------------+--------+
    
  3. Get a list of instance groups in the selected folder by specifying its name:

    yc compute instance-group list \
      --folder-name <folder_name>
    

    Result:

    +----------------------+-----------------------+--------+------+
    |          ID          |         NAME          | STATUS | SIZE |
    +----------------------+-----------------------+--------+------+
    | amc65sbgfqeq******** | first-instance-group  | ACTIVE |    4 |
    +----------------------+-----------------------+--------+------+
    
  4. Recreate VM instances in the instance group:

    yc compute instance-group rolling-recreate --all \
      --name <instance_group_name> \
      --folder-name <folder_name>
    

    Where:

    • --name: Instance group name.
    • --folder-name: Name of the folder the instance group belongs to.

    Instance Groups will start recreating all instances in the group one by one. The recreated instances will change their status to Running.

    Result:

    done (2m43s)
    id: amc65sbgfqeq********
    ...
    status: ACTIVE
    application_load_balancer_state: {}
    

    To recreate individual instances in a group, get a list of instances in that group:

    yc compute instance-group list-instances \
      --name <instance_group_name> \
      --folder-name <folder_name>
    

    Where:

    • --name: Instance group name.
    • --folder-name: Name of the folder the instance group belongs to.

    Result:

    +----------------------+---------------------------+----------------+--------------+------------------------+----------------+
    |     INSTANCE ID      |           NAME            |  EXTERNAL IP   | INTERNAL IP  |         STATUS         | STATUS MESSAGE |
    +----------------------+---------------------------+----------------+--------------+------------------------+----------------+
    | epdl7gdvb69f******** | cl17k72ehu54********-amyk | 130.193.**.*** | 192.168.0.33 | RUNNING_ACTUAL [8m]    |                |
    | epdjtb04efcf******** | cl17k72ehu54********-oper | 84.201.***.*** | 192.168.0.17 | RUNNING_ACTUAL [6m]    |                |
    | epd3anghn4vb******** | cl17k72ehu54********-axec | 84.201.***.*** | 192.168.0.14 | RUNNING_ACTUAL [1m50s] |                |
    | epdbt0c7o6d3******** | cl17k72ehu54********-ihez | 51.250.***.*** | 192.168.0.29 | RUNNING_ACTUAL [1m0s]  |                |
    +----------------------+---------------------------+----------------+--------------+------------------------+----------------+
    

    Recreate the VM instances in question:

    yc compute instance-group rolling-recreate \
      --instance-ids <VM_instance_IDs> \
      --name <instance_group_name> \
      --folder-name <folder_name>
    

    Where:

    • --instance-ids: Comma-separated IDs of instances to recreate. For example, to recreate the first and third instances from those listed, specify --instance-ids epdl7gdvb69f********,epd3anghn4vb********.
    • --name: Instance group name.
    • --folder-name: Name of the folder the instance group belongs to.

    Instance Groups will start recreating the specified instances in the group one by one. The recreated instances will change their status to Running.

For more information about yc compute instance-group rolling-recreate options, see this CLI reference.

Use the rollingRecreate REST API method for the InstanceGroup resource or the InstanceGroupService/RollingRecreate gRPC API call.

Was the article helpful?

Previous
Sequentially restarting instances in a group
Next
Stopping an instance group
© 2026 Direct Cursus Technology L.L.C.