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 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:

  • Creating a cluster
  • Examples
  • Creating a single-host cluster
  1. Step-by-step guides
  2. Clusters
  3. Creating a cluster

Creating an Elasticsearch cluster

Written by
Yandex Cloud
Updated at May 13, 2025
  • Creating a cluster
  • Examples
    • Creating a single-host 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.

A Managed Service for Elasticsearch cluster is a group of multiple linked Elasticsearch hosts. A Managed Service for Elasticsearch cluster provides high search performance by distributing search and indexing tasks across all its hosts with the Data node role. For more information about roles in a Managed Service for Elasticsearch cluster, see Host roles.

Note

  • The number of hosts with the Data node role you can create along with an Elasticsearch cluster depends on the selected disk type and host class.
  • Available disk types depend on the selected host class.

Creating a clusterCreating a cluster

Note

As of June 13, 2022, the Gold edition has been discontinued in Managed Service for Elasticsearch clusters. You cannot create a new cluster with this edition.

When creating a Managed Service for Elasticsearch cluster, specify parameters separately for the hosts with the Master node and the Data node roles.

You can use hosts only with the Data node role, without creating dedicated hosts for the Master node role. In this case, hosts with the Data node role combine the two roles.

Management console
CLI
Terraform
API

To create a Managed Service for Elasticsearch cluster:

  1. In the management console, select the folder where you want to create a Managed Service for Elasticsearch cluster.

  2. Select Managed Service for Elasticsearch.

  3. Click Create cluster.

  4. Under Basic parameters:

    1. Enter a name and description for the Managed Service for Elasticsearch cluster. The Managed Service for Elasticsearch cluster name must be unique within the folder.

    2. Select the environment where you want to create the Managed Service for Elasticsearch cluster (you cannot change the environment once the cluster is created):

      • PRODUCTION: For stable versions of your apps.
      • PRESTABLE: For testing purposes. The prestable environment is similar to the production environment and likewise covered by the SLA, but it is the first to get new functionalities, improvements, and bug fixes. In the prestable environment, you can test compatibility of new versions with your application.
    3. Select the Elasticsearch version from the list.

    4. Select the Elasticsearch edition.

    5. Select a service account with the storage.editor role from the drop-down list or create a new one if you plan to use data from an Object Storage bucket with restricted access. For more information about setting up a service account, see Configuring access to Object Storage.

  5. Under Network settings, select the cloud network to host the Managed Service for Elasticsearch cluster and the security group for cluster network traffic. You may need to additionally set up security groups to be able connect to the Managed Service for Elasticsearch cluster.

  6. Under User, specify the admin user password.

    This is a special user that is required for managing clusters and cannot be deleted. It is assigned the superuser role and can perform any operations on clusters.

    Tip

    To perform routine tasks, we recommend creating individual users. For more information, see Managing users.

  7. Configure hosts with the Data node role by opening the Data node tab:

    1. Under Host class, select the platform, host type, and host class.

      The host class defines the technical characteristics of VM instances Elasticsearch nodes are deployed on. All available options are listed under Host classes. When you change the host class for a Managed Service for Elasticsearch cluster, the specifications of all existing instances also change.

    2. Under Storage:

      • Select the disk type.

        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.
      • Select the storage size to use for data.

    3. Under Hosts, select the configuration of the hosts created together with the Managed Service for Elasticsearch cluster:

      1. To add a host, click Add host.

      2. To change the added host, hover over its row and click .

        When changing the host, you can:

        • Select the availability zone and subnet.

        • Enable public access.

          Warning

          You cannot enable public access to a host after creating a Managed Service for Elasticsearch cluster.

          If public access is enabled for an Elasticsearch host with the Data node role, you can connect to this host, or Kibana hosted on it, over the internet. For more information, see Connecting to a cluster.

          Tip

          You can use Kibana even if you can't request public access to the hosts (for example, for security reasons). To do this, proxy the connections via the virtual machine in Yandex Compute Cloud that is hosted in the same network as the cluster. For more information, see Connecting to a cluster.

  8. If necessary, configure the hosts with the Master node role by opening the Master node tab:

    1. Under Host class, select the platform, host type, and host class.

    2. Under Storage, configure storage the same way as for hosts with the Data node role.

    3. Under Hosts, click Add hosts to add three hosts. To change one of the added hosts, hover over its row and click .

      When changing the host, you can:

      • Select the availability zone and subnet.

      • Enable public access.

        Tip

        We do not recommend enabling public access for hosts with the Master node role as it may be unsafe.

  9. Configure additional Managed Service for Elasticsearch cluster settings, if required:

    • Maintenance window: Maintenance window settings:

      • To enable maintenance at any time, select arbitrary (default).
      • To specify the preferred maintenance start time, select by schedule and specify the desired day of the week and UTC hour. For example, you can choose a time when the cluster is least loaded.

      Maintenance operations are carried out both on enabled and disabled clusters. They may include updating the DBMS, applying patches, and so on.

    • Deletion protection: Manages cluster protection against accidental deletion.

      Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

  10. Configure the DBMS settings, if required.

  11. Click Create.

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 create a Managed Service for Elasticsearch cluster:

  1. Check whether the folder has any subnets for the Managed Service for Elasticsearch cluster hosts:

    yc vpc subnet list
    

    If there are no subnets in the folder, create the required subnets in Yandex Virtual Private Cloud.

  2. View the description of the create Managed Service for Elasticsearch cluster CLI command:

    yc managed-elasticsearch cluster create --help
    
  3. Specify the Managed Service for Elasticsearch cluster parameters in the create command (not all parameters are given in the example):

    yc managed-elasticsearch cluster create \
      --name <cluster_name> \
      --environment <environment> \
      --network-name <network_name> \
      --host zone-id=<availability_zone>,subnet-id=<subnet_ID>,assign-public-ip=<public_access>,type=<host_type> \
      --datanode-resource-preset <Data_node_host_class> \
      --datanode-disk-size <storage_size_in_GB> \
      --datanode-disk-type <network-hdd|network-ssd|network-ssd-nonreplicated|local-ssd> \
      --masternode-resource-preset <Master_node_host_class> \
      --masternode-disk-size <Master_node_storage_size_in_GB> \
      --masternode-disk-type <network-ssd> \
      --security-group-ids <list_of_security_group_IDs> \
      --version <Elasticsearch_version> \
      --edition <Elasticsearch_edition> \
      --admin-password <admin_user_password> \
      --plugins=<plugin_1_name>,...,<plugin_N_name> \
      --deletion-protection=<deletion_protection>
    

    Where:

    • --environment: Environment, prestable or production.
    • --host: Host parameters:
      • zone-id: Availability zone.
      • subnet-id: Subnet ID. Specify if two or more subnets are created in the selected availability zone.
      • assign-public-ip: Internet access to the host via a public IP address, true or false.
      • type: Host role: datanode or masternode.
    • --datanode-resource-preset: Host class with the Data node role.
    • --datanode-disk-size: Storage size in GB for hosts with the Data node role.
    • --datanode-disk-type: Storage type for hosts with the Data node role.
    • --masternode-resource-preset: Class of hosts with the Master node role.
    • --masternode-disk-size: Storage size in GB for hosts with the Master node role.
    • --masternode-disk-type: Storage type for hosts with the Master node role.
    • --version (optional): Elasticsearch version, 7.10, 7.11, 7.12, 7.13, 7.14, 7.15, 7.16, or 7.17.
    • --edition (optional): Elasticsearch edition: basic or platinum.
    • --deletion-protection: Cluster deletion protection, true or false.

    Enter the subnet-id if the selected availability zone has more than one subnet.

    Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.

    Note

    When creating a Managed Service for Elasticsearch cluster, the anytime maintenance mode is set by default. You can set a specific maintenance window when updating the Managed Service for Elasticsearch cluster settings.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the documentation on the Terraform website or mirror website.

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

To create a Managed Service for Elasticsearch cluster:

  1. In the configuration file, define the parameters of the resources you want to create:

    • Database cluster: Description of the Managed Service for Elasticsearch cluster and its hosts.

    • Network: Description of the cloud network where a cluster will be located. If you already have a suitable network, you don't have to describe it again.

    • Subnets: Description of the subnets to connect the cluster hosts to. If you already have suitable subnets, you don't have to describe them again.

    Here is an example of the configuration file structure:

    resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" {
      name                = "<cluster_name>"
      environment         = "<environment>"
      network_id          = "<network_ID>"
      deletion_protection = "<deletion_protection>"
    
      config {
        version = "<Elasticsearch_version>"
        edition = "<Elasticsearch_edition>"
    
        admin_password = "<admin_user_password>"
    
        data_node {
          resources {
            resource_preset_id = "<host_class>"
            disk_type_id       = "<disk_type>"
            disk_size          = <storage_size_in_GB>
          }
        }
    
        master_node {
          resources {
            resource_preset_id = "<host_class>"
            disk_type_id       = "<disk_type>"
            disk_size          = <storage_size_in_GB>
          }
        }
    
        plugins = [ "<list_of_plugin_names>" ]
    
      }
    
      security_group_ids = [ "<list_of_security_group_IDs>" ]
    
      host {
        name             = "<host_name>"
        zone             = "<availability_zone>"
        type             = "<host_role>"
        assign_public_ip = <public_access>
        subnet_id        = "<subnet_ID>"
      }
    }
    
    resource "yandex_vpc_network" "<network_name>" { name = "<network_name>" }
    
    resource "yandex_vpc_subnet" "<subnet_name>" {
      name           = "<subnet_name>"
      zone           = "<availability_zone>"
      network_id     = "<network_ID>"
      v4_cidr_blocks = ["<range>"]
    }
    

    Where:

    • environment: Environment, PRESTABLE or PRODUCTION.
    • deletion_protection: Deletion protection, true or false.
    • version (optional): Elasticsearch version, 7.10, 7.11, 7.12, 7.13, 7.14, 7.15, 7.16, or 7.17.
    • edition (optional): Elasticsearch edition, basic or platinum.
    • host: Host parameters:
      • name: Host name.
      • zone: Availability zone.
      • type: Host role: DATA_NODE or MASTER_NODE.
      • assign_public_ip: Public access to the host, true or false.
      • subnet-id: Subnet ID. Specify if two or more subnets are created in the selected availability zone.

    If the Managed Service for Elasticsearch cluster deletion protection is activated, this does not protect the DB contents.

    1. To set up the maintenance window (for disabled clusters as well), add the maintenance_window block to the cluster description:

      resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" {
        ...
        maintenance_window {
          type = <maintenance_type>
          day  = <day_of_week>
          hour = <hour>
        }
        ...
      }
      

      Where:

      • type: Maintenance type. The possible values include:
        • anytime: Anytime.
        • weekly: By schedule.
      • day: Day of the week for the weekly type in DDD format, e.g., MON.
      • hour: Hour of the day for the weekly type in the HH format, e.g., 21.

    For more information about the resources you can create with Terraform, see the Terraform provider documentation.

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

  3. Create a Managed Service for Elasticsearch cluster.

    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 create a Managed Service for Elasticsearch cluster, use the create REST API method for the Cluster resource or the ClusterService/Create gRPC API call and provide the following in the request:

  • ID of the folder to host the Managed Service for Elasticsearch cluster, in the folderId parameter.

  • Managed Service for Elasticsearch cluster name in the name parameter.

  • Elasticsearch version in the configSpec.version parameter.

  • Elasticsearch edition in the configSpec.edition parameter.

  • Managed Service for Elasticsearch cluster configuration in the configSpec parameter, including:

    • Class of hosts with the Master node role in the configSpec.elasticsearchSpec.masterNode.resources parameter. If you do not want to create dedicated hosts with the Master node role, do not set values for the group of configSpec.elasticsearchSpec.masterNode parameters.
    • Class of hosts with the Data node role in the configSpec.elasticsearchSpec.dataNode.resources parameter.
  • Configuration of the Managed Service for Elasticsearch cluster hosts in one or more hostSpecs parameters.

  • Network ID in the networkId parameter.

  • Security group IDs in the securityGroupIds parameter.

  • List of plugins in the configSpec.elasticsearchSpec.plugins parameter.

  • Maintenance window settings (including for disabled Managed Service for Elasticsearch clusters) in the maintenanceWindow parameter.

  • Settings for access from Yandex Data Transfer in the configSpec.access.dataTransfer parameter.

Warning

If you specified security group IDs when creating a Managed Service for Elasticsearch cluster, you may also need to set up security groups to connect to the cluster.

ExamplesExamples

Creating a single-host clusterCreating a single-host cluster

CLI
Terraform

To create a Managed Service for Elasticsearch cluster with a single host, provide a single --host parameter.

Create a Managed Service for Elasticsearch cluster with the following test specifications:

  • Name: my-es-clstr.

  • Version: 7.17.

  • Edition: Platinum.

  • Environment: PRODUCTION.

  • Network: default.

  • Security group ID: enpp2s8l3irh********.

  • With a single publicly available s2.micro class host with the Data node role in the b0rcctk2rvtr8efcch64 subnet, in the ru-central1-a availability zone.

  • Network SSD storage (network-ssd): 20 GB.

  • User: admin; password: esadminpwd.

  • Protection against accidental Managed Service for Elasticsearch cluster deletion: Enabled.

Run the following command:

yc managed-elasticsearch cluster create \
  --name my-es-clstr \
  --environment production \
  --network-name default \
  --host zone-id=ru-central1-a,assign-public-ip=true,type=datanode \
  --datanode-resource-preset s2.micro \
  --datanode-disk-type=network-ssd \
  --datanode-disk-size=20 \
  --admin-password=esadminpwd \
  --security-group-ids enpp2s8l3irh******** \
  --version 7.17 \
  --edition platinum \
  --deletion-protection=true

Create a Managed Service for Elasticsearch cluster. The configuration file for the Managed Service for Elasticsearch cluster is as follows:

resource "yandex_mdb_elasticsearch_cluster" "my-es-clstr" {
  name                = "my-es-clstr"
  environment         = "PRODUCTION"
  network_id          = yandex_vpc_network.mynet.id
  deletion_protection = "true"

  config {
    edition = "basic"
    version = "7.17"

    admin_password = "esadminpwd"

    data_node {
      resources {
        resource_preset_id = "s2.micro"
        disk_type_id       = "network-ssd"
        disk_size          = 20
      }
    }

  }

  security_group_ids = [ yandex_vpc_security_group.es-sg.id ]

  host {
    name             = "node"
    zone             = "ru-central1-a"
    type             = "DATA_NODE"
    assign_public_ip = true
    subnet_id        = yandex_vpc_subnet.mysubnet.id
  }

}

resource "yandex_vpc_network" "mynet" {
  name = "mynet"
}

resource "yandex_vpc_subnet" "mysubnet" {
  name           = "mysubnet"
  zone           = "ru-central1-a"
  network_id     = yandex_vpc_network.mynet.id
  v4_cidr_blocks = ["10.5.0.0/24"]
}

resource "yandex_vpc_security_group" "es-sg" {
  name       = "es-sg"
  network_id = yandex_vpc_network.mynet.id

  ingress {
    description    = "Kibana"
    port           = 443
    protocol       = "TCP"
    v4_cidr_blocks = [ "0.0.0.0/0" ]
  }

  ingress {
    description    = "Elasticsearch"
    port           = 9200
    protocol       = "TCP"
    v4_cidr_blocks = [ "0.0.0.0/0" ]
  }
}

Where the following test configuration is used:

  • Name: my-es-clstr.

  • Version: 7.17.

  • Edition: Basic.

  • Environment: PRODUCTION.

  • --deletion-protection: Managed Service for Elasticsearch cluster deletion protection. You cannot delete a Managed Service for Elasticsearch cluster with this option enabled.

  • Cloud ID: b1gq90dgh25bebiu75o.

  • Folder ID: b1gia87mbaomkfvsleds.

  • New mynet network.

  • Security group: New es-sg security group allowing connections from the internet to the Managed Service for Elasticsearch cluster on ports 443 (Kibana) and 9200 (Elasticsearch).

  • Hosts: One publicly available s2.micro host with the Data node role, subnet: mysubnet, availability zone: ru-central1-a. Range for mysubnet: 10.5.0.0/24.

  • Network SSD storage (network-ssd): 20 GB.

  • esadminpwd password for the admin user.

Was the article helpful?

Previous
Information about existing clusters
Next
Connecting to a cluster
Yandex project
© 2025 Yandex.Cloud LLC