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
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for Elasticsearch
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Stopping and starting a cluster
      • Managing hosts
      • Migrating hosts to a different availability zone
      • Managing backups
      • Configuring access to Object Storage
      • Deleting a cluster
    • User management
  • Access management
  • Pricing policy
  • CLI reference
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Getting a list of cluster hosts
  • Adding hosts to a cluster
  • Deleting hosts from a cluster
  1. Step-by-step guides
  2. Clusters
  3. Managing hosts

Managing hosts

Written by
Yandex Cloud
Updated at May 13, 2025
  • Getting a list of cluster hosts
  • Adding hosts to a cluster
  • Deleting hosts from a cluster

Warning

Yandex Managed Service for Elasticsearch is unavailable as of April 11, 2024.

You can create an OpenSearch cluster in Yandex Cloud as an alternative to Elasticsearch.

You can get a list of Elasticsearch cluster hosts and add or delete them. To learn how to move your cluster hosts to a different availability zone, see this guide.

Note

You can only add or delete hosts with the Data node role.

Getting a list of cluster hostsGetting a list of cluster hosts

Management console
CLI
API
  1. In the management console, go to the folder page and select Managed Service for Elasticsearch.
  2. Click the name of the cluster you need and select the Hosts tab.

If you do not have the Yandex Cloud (CLI) command line interface 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 cluster hosts, run the command:

yc managed-elasticsearch host list --cluster-name <cluster_name>

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

To get a list of cluster hosts, use the listHosts REST API method for the Cluster resource or the ClusterService/ListHosts gRPC API call and provide the cluster ID in the clusterId request parameter.

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

Adding hosts to a clusterAdding hosts to a cluster

Warning

You cannot enable public access to a host once it is created.

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

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

  3. Click Create host.

  4. Specify the host parameters:

    • Availability zone.
    • Subnet (if the necessary subnet is not in the list, create it).
    • Select Public access if the host must be accessible from outside Yandex Cloud. You cannot change this setting after you create a host.

If you do not have the Yandex Cloud (CLI) command line interface 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 add hosts to a cluster, run the command:

yc managed-elasticsearch host add \
   --cluster-name <cluster_name> \
   --host zone-id=<availability_zone>,`
          `subnet-name=<subnet_name>,`
          `assign-public-ip=<public_access>,`
          `type=<host_role>

Where:

  • assign-public-ip: Public access to the host, true or false.
  • type: Host role: datanode or masternode.

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

To add a host to the 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 Elasticsearch cluster configuration fields, see the Terraform provider documentation.

  2. Add a host section to the Managed Service for Elasticsearch cluster description:

    resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" {
      ...
      host {
        name             = "<host_name>"
        zone             = "<availability_zone>"
        type             = "<host_role>"
        assign_public_ip = <public_access>
        subnet_id        = "<subnet_ID>"
      }
    }
    

    Where:

    • type: Host role: DATA_NODE or MASTER_NODE.
    • assign_public_ip: Public access to the host, true or false.
  3. 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.

  4. 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
      }
    }
    

To add hosts to a cluster, use the addHosts REST API method for the Cluster resource or the ClusterService/AddHosts gRPC API call and provide the following in the request:

  • Cluster ID in the clusterId parameter.

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

  • New host settings in one or more hostSpecs parameters.

Warning

If you cannot connect to the host you added, check that the cluster security group is configured correctly for the host's subnet.

Deleting hosts from a clusterDeleting hosts from a cluster

The following restrictions apply when deleting hosts:

  • You cannot delete a single host with the Data node role.
  • If a cluster consists of multiple hosts with the Data node role, you cannot delete the last two hosts.
Management console
CLI
Terraform
API
  1. In the management console, go to the folder page and select Managed Service for Elasticsearch.
  2. Click the name of the cluster you need and select the Hosts tab.
  3. Click in the host's row and select Delete.

If you do not have the Yandex Cloud (CLI) command line interface 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 remove a host from the cluster, run:

yc managed-elasticsearch host delete <host_name> --cluster-name <cluster_name>

You can request the host name with a list of cluster hosts, and the cluster name, with a list of clusters in the folder.

To remove a host 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 Elasticsearch cluster configuration fields, see the Terraform provider documentation.

  2. Delete the corresponding host block from the Managed Service for Elasticsearch cluster description.

  3. 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.

  4. 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
      }
    }
    

To delete a host, use the deleteHosts REST API method for the Cluster resource or the ClusterService/DeleteHosts gRPC API call and provide the following in the request:

  • Cluster ID in the clusterId parameter.

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

  • Name or array of names of hosts to delete in the hostNames parameter.

Was the article helpful?

Previous
Stopping and starting a cluster
Next
Migrating hosts to a different availability zone
© 2025 Direct Cursus Technology L.L.C.