Updating the Elasticsearch version and edition
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.
In the Managed Service for Elasticsearch cluster, you can update the version and update the edition of Elasticsearch.
To learn more about updates within a single version and host maintenance, see Maintenance.
Elasticsearch version upgrade
You can update a Managed Service for Elasticsearch cluster to a newer Elasticsearch version.
Viewing a list of available Elasticsearch versions
- In the management console
, navigate to the folder page and select Managed Service for Elasticsearch. - Select a cluster and click
Edit. - Open the list in the Version field.
Before a version upgrade
Make sure this does not affect your applications:
- See Elasticsearch changelog
for how upgrades may affect your applications. - Try a version upgrade on a test cluster. You can deploy it from a backup of the main cluster.
- Create a backup of the main cluster directly before the version upgrade.
Updating the Elasticsearch version
- In the management console
, navigate to the folder page and select Managed Service for Elasticsearch. - Select a cluster and click
Edit. - In the Version field, select the appropriate Elasticsearch version.
- Click Save.
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.
-
Get a list of your Elasticsearch clusters:
yc managed-elasticsearch cluster list
-
Get information about the cluster you need and check the version in the
config.version
property:yc managed-elasticsearch cluster get <cluster_name_or_ID>
-
Update the version:
yc managed-elasticsearch cluster update <cluster_name_or_ID> --version <Elasticsearch_version>
-
Open the current Terraform configuration file that defines your infrastructure.
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
. -
To the Managed Service for Elasticsearch cluster description, add the
config.version
field or change its value if it is already there:resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" { ... config { version = "<Elasticsearch_version>" } }
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validate
Terraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
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.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply
-
Confirm updating the resources.
-
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 update a version, use the update REST API method for the Cluster resource or the ClusterService/Update 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 Elasticsearch version in the
configSpec.version
parameter. -
List of editable cluster configuration fields in the
updateMask
parameter (in this case,configSpec.version
).
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.
Updating the Elasticsearch edition
Note
As of June 13, 2022, the Gold
edition has been discontinued in Managed Service for Elasticsearch clusters. You cannot switch to it from the Basic
or Platinum
edition. On July 6, 2022, all Gold
edition clusters were automatically upgraded to Platinum
.
You can change the Elasticsearch edition used by the cluster. Before you downgrade the edition, make sure that reduced functionality will not affect your applications.
- In the management console
, navigate to the folder page and select Managed Service for Elasticsearch. - Select a cluster and click
Edit. - In the Edition field, select the Elasticsearch edition you need:
Basic
orPlatinum
. - Click Save.
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.
-
Get a list of your Elasticsearch clusters:
yc managed-elasticsearch cluster list
-
Get information about the cluster you need and check the edition in the
config.edition
property:yc managed-elasticsearch cluster get <cluster_name_or_ID>
-
Update the edition:
yc managed-elasticsearch cluster update <cluster_name_or_ID> \ --edition <Elasticsearch_edition>
Where
--edition
is the Elasticsearch edition,basic
orplatinum
.
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
-
Add the
config.edition
field to the Managed Service for Elasticsearch cluster description or edit it if the field already exists:resource "yandex_mdb_elasticsearch_cluster" "<cluster_name>" { ... config { edition = "<Elasticsearch_edition>" ... } ... }
Where
edition
is the Elasticsearch edition,basic
orplatinum
. -
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validate
Terraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
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.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply
-
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform provider documentation
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 update the Elasticsearch edition, use the update REST API method for the Cluster resource or the ClusterService/Update 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 Elasticsearch edition in the
configSpec.edition
parameter. -
List of editable cluster configuration fields in the
updateMask
parameter (in this case,configSpec.edition
).
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.