Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for OpenSearch
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
        • Managing host groups
        • Migrating host groups to a different availability zone
      • Stopping and starting a cluster
      • Managing backups
      • Configuring access to Object Storage
      • Deleting a cluster
    • User management
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Getting a list of host groups in a cluster
  • Creating a host group
  • Updating a host group configuration
  • Deleting a host group
  • Getting a list of cluster hosts
  1. Step-by-step guides
  2. Clusters
  3. Managing cluster hosts
  4. Managing host groups

Managing OpenSearch host groups

Written by
Yandex Cloud
Updated at May 5, 2025
  • Getting a list of host groups in a cluster
  • Creating a host group
  • Updating a host group configuration
  • Deleting a host group
  • Getting a list of cluster hosts

In a Managed Service for OpenSearch cluster, you can manage host groups:

  • Getting a list of host groups in a cluster.
  • Creating a host group.
  • Updating the configuration of a host group, including adding new hosts to it or removing them.
  • Deleting a host group.

You can also get a list of cluster hosts.

For information about migrating host groups in a Managed Service for OpenSearch cluster to a different availability zone, see this guide.

Getting a list of host groups in a clusterGetting a list of host groups in a cluster

Management console
CLI
REST API
gRPC API
  1. In the management console, go to the folder page and select Managed Service for OpenSearch.
  2. Click the name of the cluster you need and select the  Node groups tab.

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

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To get a list of host groups in a cluster, request information about the OpenSearch cluster:

yc managed-opensearch cluster get <cluster_name_or_ID>

You can find the list of host groups in the config.opensearch.node_groups and config.dashboards.node_groups parameters.

You can request the cluster name and ID with the list of clusters in the folder.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Get method and send the following request, e.g., via cURL:

    curl \
        --request GET \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>'
    

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

    Available host groups are specified in the nodeGroups parameters.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Get call and send the following request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.opensearch.v1.ClusterService.Get
    

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

    Available host groups are specified in the nodeGroups parameters.

Creating a host groupCreating a host group

The following limitations apply when creating host groups:

  • A Managed Service for OpenSearch cluster may contain only one Dashboards host group.
  • If you are adding a group of OpenSearch hosts and assigning the MANAGER role to the hosts, make sure there are at least three hosts with this role.

To create a host group:

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, go to the folder page and select Managed Service for OpenSearch.

  2. Click the name of the cluster you need and select the  Node groups tab.

  3. Click Create node group.

  4. Specify the group parameters:

    • Group type: OpenSearch or Dashboards.

    • Name. It must be unique within the cluster.

    • For a OpenSearch host group, select a host role.

    • Platform, host type, and host class.

      The host class defines the technical characteristics of virtual machines that OpenSearch nodes are deployed on. All available options are listed under Host classes.

    • Disk type and data storage size.

      The selected type determines the increments in which you can change your disk size:

      • Network HDD and SSD storage: In increments of 1 GB.
      • Local SSD storage:
        • For Intel Cascade Lake: In increments of 100 GB.
        • For Intel Ice Lake: In increments of 368 GB.
      • Non-replicated SSD storage: In increments of 93 GB.
    • (Optional) Under Automatic increase of storage size, configure the automatic increase of disk size:

      • In the Increase size field, set the conditions to:

        • Increase the storage size during the next maintenance window if the storage is more than the specified percent (%) full.
        • Increase the storage size right away if the storage is more than the specified percent (%) full.

        You can set both conditions, but the threshold for immediate increase must be higher than that for increase during the maintenance window.

      • In the Maximum storage size field, specify the maximum storage size that can be set when increasing the storage size automatically.

        If the specified threshold is reached, the storage size increases differently depending on disk type:

        • For network HDDs and SSDs, by the higher of the two values: 20 GB or 20% of the current disk size.

        • For non-replicated SSDs, by 93 GB.

        • For local SSDs:

          • Intel Cascade Lake cluster, by 100 GB.
          • Intel Ice Lake cluster, by 368 GB.

        If the threshold is reached again, the storage size will be automatically increased until it reaches the specified maximum. After that, you can specify a new maximum storage size manually.

        Warning

        • You cannot decrease the storage size.
        • While resizing the storage, cluster hosts will be unavailable.

      If you have set up the storage size to increase within the maintenance window, set up a schedule for the maintenance window.

    • Host distribution across availability zones and subnets.

    • Number of hosts to create.

    • Enable Public access if you want to allow connecting to hosts over the internet.

  5. Click Create node group.

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

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To create a host group, run this command:

yc managed-opensearch node-group add --cluster-name <cluster_name> \
   --opensearch-node-group name=<OpenSearch_host_group_name>,`
                          `resource-preset-id=<host_class>,`
                          `disk-size=<disk_size_in_bytes>,`
                          `disk-type-id=<disk_type>,`
                          `hosts-count=<number_of_hosts_in_group>,`
                          `zone-ids=<availability_zones>,`
                          `subnet-names=<subnet_names>,`
                          `assign-public-ip=<assign_public_address:_true_or_false>,`
                          `roles=<host_roles> \
   --dashboards-node-group name=<Dashboards_host_group_name>,`
                          `resource-preset-id=<host_class>,`
                          `disk-size=<disk_size_in_bytes>,`
                          `disk-type-id=<disk_type>,`
                          `hosts-count=<number_of_hosts_in_group>,`
                          `zone-ids=<availability_zones>,`
                          `subnet-names=<subnet_names>,`
                          `assign-public-ip=<assign_public_address:_true_or_false>

Specify the required parameters in the command depending on what type of host group you want to create:

  • --opensearch-node-group: OpenSearch host group configuration, where:

    • resource-preset-id: Host class that defines the configuration of virtual machines the OpenSearch nodes will be deployed on. All available options are listed under Host classes.

    • disk-size: Disk size in bytes. The minimum and maximum values depend on the selected host class.

    • disk-type-id: Disk type.

    • zone-ids: Availability zones Separate zones with commas and enclose them in square brackets. Here is an example:

      zone-ids=[ru-central1-a,ru-central1-b,ru-central1-d]
      
    • subnet-names: Name of the subnets in the specified availability zones. Separate subnets with commas and enclose them in square brackets. Here is an example:

      subnet-names=[default-ru-central1-a,default-ru-central1-b,default-ru-central1-d]
      

      You can specify the subnet-ids parameter with network IDs instead of subnet-names. Separate IDs with commas and enclosed them in square brackets. Here is an example:

      subnet-ids=[e9bp8qmchqh2********,e2l963gkhobo********,fl8klaabecc3********]
      
    • roles: Host roles. The possible values are as follows:

      • data: Assigns the DATA role only.
      • manager: Assigns the MANAGER role only.
      • data+manager or manager+data: Assigns both roles.

      Tip

      For security reasons, we do not recommend enabling public access to hosts with the MANAGER role.

  • --dashboards-node-group: Dashboards host group configuration. It is configured in the same way as the OpenSearch host group, except for the host roles. You do not need to configure any roles for the Dashboards group.

  1. Open the current Terraform configuration file with an infrastructure plan.

    For more information about creating this file, see Creating clusters.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. To create a group of OpenSearch hosts, add the node_groups section to opensearch:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
      ...
      config {
        opensearch {
          ...
          node_groups {
            name             = "<virtual_host_group_name>"
            assign_public_ip = <public_access>
            hosts_count      = <number_of_hosts>
            zone_ids         = ["<list_of_availability_zones>"]
            subnet_ids       = ["<list_of_subnet_IDs>"]
            roles            = ["<role_list>"]
            resources {
              resource_preset_id = "<host_class>"
              disk_size          = <storage_size_in_bytes>
              disk_type_id       = "<disk_type>"
            }
          }
        }
        ...
      }
    }
    

    Where:

    • assign_public_ip: Public access to the host, true or false.
    • roles: DATA and MANAGER host roles.
  3. To create a group of Dashboards hosts, add the dashboards section to config:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
      ...
      config {
        ...
        dashboards {
          node_groups {
           name             = "<virtual_host_group_name>"
            assign_public_ip = <public_access>
            hosts_count      = <number_of_hosts>
            zone_ids         = ["<list_of_availability_zones>"]
            subnet_ids       = ["<list_of_subnet_IDs>"]
            resources {
              resource_preset_id = "<host_class>"
              disk_size          = <storage_size_in_bytes>
              disk_type_id       = "<disk_type>"
            }
          }
        }
      }
    }
    

    Where assign_public_ip is public access to the host, true or false.

    A cluster may contain only one Dashboards host group.

  4. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  5. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

    Timeouts

    The Terraform provider sets the following timeouts for Managed Service for OpenSearch cluster operations:

    • Creating a cluster, including restoring from a backup: 30 minutes.
    • Editing a cluster: 60 minutes.
    • Deleting a cluster: 15 minutes.

    Operations exceeding the set timeout are interrupted.

    How do I change these limits?

    Add the timeouts block to the cluster description, for example:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
      ...
      timeouts {
        create = "1h30m" # 1 hour 30 minutes
        update = "2h"    # 2 hours
        delete = "30m"   # 30 minutes
      }
    }
    
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Create a file named body.json and add the following contents to it:

    {
        "nodeGroupSpec": {
            "name": "<host_group_name>",
            "resources": {
                "resourcePresetId": "<host_class>",
                "diskSize": "<storage_size_in_bytes>",
                "diskTypeId": "<disk_type>"
            },
            "roles": ["<role_1>","<role_2>"],
            "hostsCount": "<number_of_hosts>",
            "zoneIds": [
                "<availability_zone_1>",
                "<availability_zone_2>",
                "<availability_zone_3>"
            ],
            "subnetIds": [
                "<subnet_1_ID>",
                "<subnet_2_ID>",
                "<subnet_3_ID>"
            ],
            "assignPublicIp": <public_host_address:_true_or_false>,
            "diskSizeAutoscaling": {
                "plannedUsageThreshold": "<scheduled_increase_percentage>",
                "emergencyUsageThreshold": "<immediate_increase_percentage>",
                "diskSizeLimit": "<maximum_storage_size_in_bytes>"
            }
        }
    }
    

    Where nodeGroups represent the host settings:

    • name: Host group name.

    • resources: Cluster resources:

      • resourcePresetId: Host class.
      • diskSize: Disk size in bytes.
      • diskTypeId: Disk type.
    • roles (OpenSearch hosts only): List of host roles, DATA or MANAGER. You can assign one or both roles for a group.

    • hostsCount: Number of hosts per group. Minimum number of DATA and Dashboards hosts: one; minimum number of MANAGER hosts: three.

    • zoneIds: List of availability zones the cluster hosts are located in.

    • subnetIds: List of subnet IDs.

    • assignPublicIp: Permission to connect to the host from the internet.

    • diskSizeAutoscaling: Automatic storage size increase settings:

      • plannedUsageThreshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

        Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled).

        If you have set this parameter, configure the maintenance window schedule before creating a host group.

      • emergencyUsageThreshold: Storage utilization percentage to trigger an immediate storage increase.

        Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled). This parameter value must be greater than or equal to plannedUsageThreshold.

      • diskSizeLimit: Maximum storage size, in bytes, that can be set when utilization reaches one of the specified percentages.

  3. To create an OpenSearch host group:

    1. Use the Cluster.AddOpenSearchNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request POST \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --header "Content-Type: application/json" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/opensearch/node_groups' \
          --data "@body.json"
      

      You can request the cluster ID with the list of clusters in the folder.

    2. View the server response to make sure the request was successful.

  4. To create a Dashboards host group:

    1. Use the Cluster.AddDashboardsNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request POST \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --header "Content-Type: application/json" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/dashboards/node_groups' \
          --data "@body.json"
      

      You can request the cluster ID with the list of clusters in the folder.

    2. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Create a file named body.json and add the following contents to it:

    {
        "node_group_spec": {
            "name": "<host_group_name>",
            "resources": {
                "resource_preset_id": "<host_class>",
                "disk_size": "<storage_size_in_bytes>",
                "disk_type_id": "<disk_type>"
            },
            "roles": ["<role_1>","<role_2>"],
            "hosts_count": "<number_of_hosts>",
            "zone_ids": [
                "<availability_zone_1>",
                "<availability_zone_2>",
                "<availability_zone_3>"
            ],
            "subnet_ids": [
                "<subnet_1_ID>",
                "<subnet_2_ID>",
                "<subnet_3_ID>"
            ],
            "assign_public_ip": <public_host_address:_true_or_false>,
            "disk_size_autoscaling": {
                "planned_usage_threshold": "<scheduled_increase_percentage>",
                "emergency_usage_threshold": "<immediate_increase_percentage>",
                "disk_size_limit": "<maximum_storage_size_in_bytes>"
            }
        }
    }
    

    Where node_groups represent the host settings:

    • name: Host group name.

    • resources: Cluster resources:

      • resource_preset_id: Host class.
      • disk_size: Disk size in bytes.
      • disk_type_id: Disk type.
    • roles (OpenSearch hosts only): List of host roles, DATA or MANAGER. You can assign one or both roles for a group.

    • hosts_count: Number of hosts per group. Minimum number of DATA and Dashboards hosts: one; minimum number of MANAGER hosts: three.

    • zone_ids: List of availability zones the cluster hosts are located in.

    • subnet_ids: List of subnet IDs.

    • assign_public_ip: Permission to connect to the host from the internet.

    • disk_size_autoscaling: Automatic storage size increase settings:

      • planned_usage_threshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

        Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled).

        If you have set this parameter, configure the maintenance window schedule before creating a host group.

      • emergency_usage_threshold: Storage utilization percentage to trigger an immediate storage increase.

        Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled). This parameter value must be greater than or equal to planned_usage_threshold.

      • disk_size_limit: Maximum storage size, in bytes, that can be set when utilization reaches one of the specified percentages.

  4. To create an OpenSearch host group:

    1. Use the ClusterService.AddOpenSearchNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d @ \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.AddOpenSearchNodeGroup \
          < body.json
      
    2. View the server response to make sure the request was successful.

  5. To create a Dashboards host group:

    1. Use the ClusterService.AddDashboardsNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d @ \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.AddDashboardsNodeGroup \
          < body.json
      
    2. View the server response to make sure the request was successful.

Updating a host group configurationUpdating a host group configuration

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, go to the folder page and select Managed Service for OpenSearch.

  2. Click the name of the cluster you need and select the  Node groups tab.

  3. Click in the row with the appropriate group and select Edit.

  4. Change host group settings:

    • Host roles (for OpenSearch host groups only).

    • Platform, host type, and host class.

      The host class defines the technical characteristics of virtual machines that OpenSearch nodes are deployed on. All available options are listed under Host classes.

    • Disk size.

      Disk resizing increments depend on disk type:

      • Network HDD and SSD storage: In increments of 1 GB.

      • Local SSD storage:

        • For Intel Cascade Lake: In increments of 100 GB.
        • For Intel Ice Lake: In increments of 368 GB.
      • Non-replicated SSD storage: In increments of 93 GB.

    • (Optional) Under Automatic increase of storage size, configure the automatic increase of disk size:

      • In the Increase size field, set the conditions to:

        • Increase the storage size during the next maintenance window if the storage is more than the specified percent (%) full.
        • Increase the storage size right away if the storage is more than the specified percent (%) full.

        You can set both conditions, but the threshold for immediate increase must be higher than that for increase during the maintenance window.

      • In the Maximum storage size field, specify the maximum storage size that can be set when increasing the storage size automatically.

        If the specified threshold is reached, the storage size increases differently depending on disk type:

        • For network HDDs and SSDs, by the higher of the two values: 20 GB or 20% of the current disk size.

        • For non-replicated SSDs, by 93 GB.

        • For local SSDs:

          • Intel Cascade Lake cluster, by 100 GB.
          • Intel Ice Lake cluster, by 368 GB.

        If the threshold is reached again, the storage size will be automatically increased until it reaches the specified maximum. After that, you can specify a new maximum storage size manually.

        Warning

        • You cannot decrease the storage size.
        • While resizing the storage, cluster hosts will be unavailable.

      If you have set up the storage size to increase within the maintenance window, set up a schedule for the maintenance window.

    • Host distribution across availability zones and subnets.

    • Number of hosts.

    • Public access to hosts.

  5. Click Save.

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

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To change the configuration of a host group, run the command:

yc managed-opensearch node-group update --cluster-name <cluster_name> \
   --node-group-name <host_group_name> \
   --resource-preset-id <host_class> \
   --disk-size <disk_size_in_bytes> \
   --hosts-count <number_of_hosts_in_group> \
   --roles <host_roles>

Specify the required parameters in the command depending on what type of host group configuration you need:

  • --node-group-name: Name of the host group you need to update.

  • --resource-preset-id: New host class. that defines the configuration of virtual machines the OpenSearch nodes will be deployed on. All available options are listed under Host classes.

  • --disk-size: New disk size in bytes. Minimum and maximum values depend on the selected host class.

  • --hosts-count: New number of hosts in the group.

  • --roles: New host roles. The possible values are:

    • data: Assigns the DATA role only.
    • manager: Assigns the MANAGER role only.
    • data+manager or manager+data: Assigns both roles.
  1. Open the current Terraform configuration file with an infrastructure plan.

    For more information about creating this file, see Creating clusters.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. To update the configuration of an OpenSearch host group, edit the parameters of the required node_groups section in the opensearch section:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
      ...
      opensearch {
        ...
        node_groups {
          name             = "<virtual_host_group_name>"
          assign_public_ip = <public_access>
          hosts_count      = <number_of_hosts>
          roles            = ["<role_list>"]
          resources {
            resource_preset_id = "<host_class>"
            disk_size          = <storage_size_in_bytes>
            disk_type_id       = "<disk_type>"
          }
        }
        ...
      }
    }
    

    Where:

    • assign_public_ip: Public access to the host, true or false.
    • roles: DATA and MANAGER host roles.
  3. To update the configuration of a Dashboards host group, edit the dashboards section parameters:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
      ...
      dashboards {
        node_groups {
          name             = "<virtual_host_group_name>"
          assign_public_ip = <public_access>
          hosts_count      = <number_of_hosts>
          resources {
            resource_preset_id = "<host_class>"
            disk_size          = <storage_size_in_bytes>
            disk_type_id       = "<disk_type>"
          }
        }
      }
    }
    

    Where assign_public_ip is public access to the host, true or false.

  4. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  5. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

    Time limits

    A Terraform provider sets the timeout for Managed Service for Elasticsearch cluster operations:

    • Creating a cluster, including by restoring one from a backup: 30 minutes.
    • Editing a cluster: 60 minutes.
    • Deleting a cluster: 15 minutes.

    Operations exceeding the set timeout are interrupted.

    How do I change these limits?

    Add the timeouts block to the cluster description, for example:

    resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" {
      ...
      timeouts {
        create = "1h30m" # 1 hour 30 minutes
        update = "2h"    # 2 hours
        delete = "30m"   # 30 minutes
      }
    }
    
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Create a file named body.json and add the following contents to it:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    {
        "updateMask": "resources,hostsCount,zoneIds,subnetIds,assignPublicIp,diskSizeAutoscaling",
        "nodeGroupSpec": {
            "resources": {
                "resourcePresetId": "<host_class>",
                "diskSize": "<storage_size_in_bytes>",
                "diskTypeId": "<disk_type>"
            },
            "hostsCount": "<number_of_hosts>",
            "zoneIds": [
                "<availability_zone_1>",
                "<availability_zone_2>",
                "<availability_zone_3>"
            ],
            "subnetIds": [
                "<subnet_1_ID>",
                "<subnet_2_ID>",
                "<subnet_3_ID>"
            ],
            "assignPublicIp": <public_host_address:_true_or_false>,
            "diskSizeAutoscaling": {
                "plannedUsageThreshold": "<scheduled_increase_percentage>",
                "emergencyUsageThreshold": "<immediate_increase_percentage>",
                "diskSizeLimit": "<maximum_storage_size_in_bytes>"
            }
        }
    }
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

    • nodeGroups: Host settings:

      • resources: Cluster resources:

        • resourcePresetId: Host class.
        • diskSize: Disk size in bytes.
        • diskTypeId: Disk type.
      • hostsCount: Number of hosts per group. Minimum number of DATA and Dashboards hosts: one; minimum number of MANAGER hosts: three.

      • zoneIds: List of availability zones the cluster hosts are located in.

      • subnetIds: List of subnet IDs.

      • assignPublicIp: Permission to connect to the host from the internet.

      • diskSizeAutoscaling: Automatic storage size increase settings:

        • plannedUsageThreshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

          Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled).

          If you have set this parameter, configure the maintenance window schedule before creating a host group.

        • emergencyUsageThreshold: Storage utilization percentage to trigger an immediate storage increase.

          Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled). This parameter value must be greater than or equal to plannedUsageThreshold.

        • diskSizeLimit: Maximum storage size, in bytes, that can be set when utilization reaches one of the specified percentages.

  3. To update an OpenSearch host group configuration:

    1. Use the Cluster.UpdateOpenSearchNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request PATCH \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --header "Content-Type: application/json" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/opensearch/node_groups/<host_group_name>' \
          --data "@body.json"
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  4. To update a Dashboards host group configuration:

    1. Use the Cluster.UpdateDashboardsNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request PATCH \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --header "Content-Type: application/json" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/dashboards/node_groups/<host_group_name>' \
          --data "@body.json"
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Create a file named body.json and add the following contents to it:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    {
        "cluster_id": "<cluster_ID>",
        "name": "<host_group_name>",
        "update_mask": {
            "paths": [
                "resources",
                "hosts_count",
                "zone_ids",
                "subnet_ids",
                "assign_public_ip"
            ]
        },
        "node_group_spec": {
            "resources": {
                "resource_preset_id": "<host_class>",
                "disk_size": "<storage_size_in_bytes>",
                "disk_type_id": "<disk_type>"
            },
            "hosts_count": "<number_of_hosts>",
            "zone_ids": [
                "<availability_zone_1>",
                "<availability_zone_2>",
                "<availability_zone_3>"
            ],
            "subnet_ids": [
                "<subnet_1_ID>",
                "<subnet_2_ID>",
                "<subnet_3_ID>"
            ],
            "assign_public_ip": <public_host_address:_true_or_false>,
            "disk_size_autoscaling": {
                "planned_usage_threshold": "<scheduled_increase_percentage>",
                "emergency_usage_threshold": "<immediate_increase_percentage>",
                "disk_size_limit": "<maximum_storage_size_in_bytes>"
            }
        }
    }
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

    • node_groups: Host settings:

      • resources: Cluster resources:

        • resource_preset_id: Host class.
        • disk_size: Disk size in bytes.
        • disk_type_id: Disk type.
      • hosts_count: Number of hosts per group. Minimum number of DATA and Dashboards hosts: one; minimum number of MANAGER hosts: three.

      • zone_ids: List of availability zones the cluster hosts are located in.

      • subnet_ids: List of subnet IDs.

      • assign_public_ip: Permission to connect to the host from the internet.

      • disk_size_autoscaling: Automatic storage size increase settings:

        • planned_usage_threshold: Storage utilization percentage to trigger a storage increase during the next maintenance window.

          Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled).

          If you have set this parameter, configure the maintenance window schedule before creating a host group.

        • emergency_usage_threshold: Storage utilization percentage to trigger an immediate storage increase.

          Use a percentage value between 0 and 100. The default value is 0 (automatic increase is disabled). This parameter value must be greater than or equal to planned_usage_threshold.

        • disk_size_limit: Maximum storage size, in bytes, that can be set when utilization reaches one of the specified percentages.

  4. To update an OpenSearch host group configuration:

    1. Use the ClusterService.UpdateOpenSearchNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d @ \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.UpdateOpenSearchNodeGroup \
          < body.json
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  5. To update a Dashboards host group configuration:

    1. Use the ClusterService.UpdateDashboardsNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d @ \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.UpdateDashboardsNodeGroup \
          < body.json
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

Deleting a host groupDeleting a host group

When deleting a host group, the following limitation applies: you cannot delete a single host group with the DATA role.

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, go to the folder page and select Managed Service for OpenSearch.
  2. Click the name of the cluster you need and select the  Node groups tab.
  3. Click in the row with the appropriate group and select Delete.

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

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To delete a host group, run the command:

yc managed-opensearch node-group delete --cluster-name <cluster_name> \
   --node-group-name <host_group_name>

In the command, specify the host group you want to delete.

To remove a host group from a cluster:

  1. Open the current Terraform configuration file with an infrastructure plan.

    For more information about creating this file, see Creating clusters.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. To delete an OpenSearch host group, remove the corresponding node_groups section from the opensearch section.

  3. To delete a Dashboards host group, remove the dashboards section.

  4. Make sure the settings are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  5. Confirm the deletion of resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

    Time limits

    A Terraform provider sets the timeout for Managed Service for Elasticsearch cluster operations:

    • Creating a cluster, including by restoring one from a backup: 30 minutes.
    • Editing a cluster: 60 minutes.
    • Deleting a cluster: 15 minutes.

    Operations exceeding the set timeout are interrupted.

    How do I change these limits?

    Add the timeouts block to the cluster description, for example:

    resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" {
      ...
      timeouts {
        create = "1h30m" # 1 hour 30 minutes
        update = "2h"    # 2 hours
        delete = "30m"   # 30 minutes
      }
    }
    
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. To delete an OpenSearch host group:

    1. Use the Cluster.DeleteOpenSearchNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request DELETE \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/opensearch/node_groups/<host_group_name>'
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  3. To delete a Dashboards host group:

    1. Use the Cluster.DeleteDashboardsNodeGroup method and make a request, e.g., via cURL:

      curl \
          --request DELETE \
          --header "Authorization: Bearer $IAM_TOKEN" \
          --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/dashboards/node_groups/<host_group_name>'
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. To delete an OpenSearch host group:

    1. Use the ClusterService.DeleteOpenSearchNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d '{
                  "cluster_id": "<cluster_ID>",
                  "name": "<host_group_name>"
              }' \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.DeleteOpenSearchNodeGroup
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

  4. To delete a Dashboards host group:

    1. Use the ClusterService.DeleteDashboardsNodeGroup call and make a request, e.g., via gRPCurl:

      grpcurl \
          -format json \
          -import-path ~/cloudapi/ \
          -import-path ~/cloudapi/third_party/googleapis/ \
          -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
          -rpc-header "Authorization: Bearer $IAM_TOKEN" \
          -d '{
                  "cluster_id": "<cluster_ID>",
                  "name": "<host_group_name>"
              }' \
          mdb.api.cloud.yandex.net:443 \
          yandex.cloud.mdb.opensearch.v1.ClusterService.DeleteDashboardsNodeGroup
      

      You can request the cluster ID with the list of clusters in the folder. You can request the name of the host group with cluster details.

    2. View the server response to make sure the request was successful.

Getting a list of cluster hostsGetting a list of cluster hosts

Management console
REST API
gRPC API
  1. Go to the folder page and select Managed Service for OpenSearch.
  2. Click the cluster name and select the Hosts tab.
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.ListHosts method and send the following request, e.g., via cURL:

    curl \
        --request GET \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>/hosts'
    

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.ListHosts call and send the following request, e.g., via gRPCurl:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.opensearch.v1.ClusterService.ListHosts
    

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Was the article helpful?

Previous
Managing plugins
Next
Migrating host groups to a different availability zone
Yandex project
© 2025 Yandex.Cloud LLC