Getting started with Managed Service for Elasticsearch
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.
To get started with the service:
Getting started
-
Log in to the management console
or sign up if you do not have an account yet. -
If you do not have a folder yet, create one:
-
In the management console
, select the appropriate cloud from the list on the left. -
At the top right, click Create folder.
-
Enter the folder name. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
(Optional) Enter a description of the folder.
-
Select Create a default network. This will create a network with subnets in each availability zone. Within this network, a default security group will be created, inside which all network traffic is allowed.
-
Click Create.
-
-
You can connect to an Elasticsearch cluster from both inside and outside Yandex Cloud:
-
To connect from inside Yandex Cloud, create a Linux virtual machine in the same network as the cluster.
-
To connect to a cluster from the internet, when creating a cluster, request public access to hosts with the Data node role.
-
Note
These instructions assume that you are connecting to the cluster from the internet.
Create a cluster
-
In the management console
, select the folder where you want to create a cluster. -
Select Managed Service for Elasticsearch.
-
Click Create cluster. For more information, see Creating clusters.
-
Set the cluster parameters.
To access the Kibana web interface, request public access:
- Under Hosts, change the settings of the host with the Data node role by clicking
for the host. - Select Public access.
- Click Save.
Public access can be requested for one or more hosts with the role Data node. After creating the cluster, you can connect to Kibana on those hosts. You may need to additionally set up security groups to be able connect to the 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.
- Under Hosts, change the settings of the host with the Data node role by clicking
-
Click Create.
-
Wait until the cluster is ready: its status on the Managed Service for Elasticsearch dashboard changes to Creating and then to Alive. This may take some time.
Configure security groups
Configure security groups for the cloud network to enable all the relevant traffic between the cluster and the connecting host.
Connect to the cluster
It is assumed that all the steps below are performed on Linux.
To connect to a cluster:
-
Install an SSL certificate:
Linux (Bash)/macOS (Zsh)Windows (PowerShell)mkdir -p ~/.elasticsearch && \ wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" \ --output-document ~/.elasticsearch/root.crt && \ chmod 0600 ~/.elasticsearch/root.crt
The certificate is saved to the
~/.elasticsearch/root.crt
file.mkdir $HOME\.elasticsearch; curl.exe -o $HOME\.elasticsearch\root.crt https://storage.yandexcloud.net/cloud-certs/CA.pem
The certificate is saved to the
$HOME\.elasticsearch\root.crt
file. -
Connect to the cluster using cURL
:curl \ --user <username>:<password> \ --cacert ~/.elasticsearch/root.crt \ --request GET 'https://c-<Elasticsearch_cluster_ID>.rw.mdb.yandexcloud.net:9200/'
To connect, enter the username and password used when creating a cluster.
A message like this is displayed if the connection is successful:
{ "name" : "....mdb.yandexcloud.net", "cluster_name" : "...", "cluster_uuid" : "...", ... "tagline" : "You Know, for Search" }
Connect to Kibana
-
Use your browser to connect to the Kibana
web interface.To connect:
-
Install the SSL certificate
in your browser's trusted root certificate store (instructions for Mozilla Firefox). -
In your browser, go to
https://<FQDN_of_publicly_available_Elasticsearch_host_with_Data_node_role>
.To learn how to get a host FQDN, see this guide.
-
Enter the username and password that you set when creating a cluster.
-
-
Upload one or more test datasets to Elasticsearch using Kibana:
- On the Kibana welcome screen, click Try our sample data.
- Add data from one or more datasets by clicking Add data for the selected dataset.
-
Explore the data with Kibana and Elasticsearch by clicking View data for a dataset.
Learn more about working with Kibana, in the Elasticsearch documentation
What's next
- Read about service concepts.
- Learn more about creating a cluster and connecting to a cluster.