Getting started with Managed Service for Redis
To get started with the service:
Getting started
-
Go to the management console
and log in to Nebius AI or create an account if you do not have one yet. -
If no public access is set up for a cluster, it can only be connected to from inside Nebius AI. To connect to a cluster, create a VM in the same cloud network as the Redis cluster (with Linux).
-
Connect to the VM via SSH.
-
Install the redis-cli
utility on the VM. For example (for Ubuntu 20.04 LTS):sudo apt install redis-tools
Create a cluster
- In the management console, select the folder where you want to create a cluster Redis.
- Select Managed Service for Redis.
- Click Create cluster.
- Set the cluster parameters and click Create cluster. This process is described in detail in Creating Redis clusters.
- Wait until the cluster is ready: its status on the Managed Service for Redis dashboard changes to Running and its state to Alive. This may take some time.
Connect to the cluster
-
If TLS support is enabled in your cluster, get an SSL certificate:
Linux (Bash) and macOS (Zsh)Windows (PowerShell)mkdir -p ~/.redis && \ wget "https://storage.nemax.nebius.cloud/certs/CA.pem" \ --output-document ~/.redis/NebiusAICA.crt && \ chmod 0655 ~/.redis/NebiusAICA.crt
The certificate is saved to the
~/.redis/NebiusAICA.crt
file.mkdir $HOME\.redis; curl.exe -o $HOME\.redis\NebiusAICA.crt https://storage.nemax.nebius.cloud/certs/CA.pem
The certificate is saved to the
$HOME\.redis\NebiusAICA.crt
file. -
Connect to the cluster using
redis-cli
.Note
To connect to an SSL-enabled cluster, download
an archive with the utility's source code and build a version of the utility with TLS support using themake BUILD_TLS=yes
command.To view an example of the command with the host FQDN filled in, open the cluster page in the management console
and click Connect.To connect using Sentinel
(without SSL):-
Get the address of the master host by using Sentinel and any Redis host:
redis-cli -h <FQDN of any Redis host> \ -p 26379 \ sentinel get-master-addr-by-name <Redis cluster name> | head -n 1
-
Connect to the host with this address:
redis-cli \ -h c-<cluster ID>.rw.mdb.nemax.nebius.cloud \ -a <password> \ -p 6380 \ --tls \ --cacert ~/.redis/NebiusAICA.crt
To connect directly to the master (without SSL):
redis-cli -h c-<cluster ID>.rw.mdb.nemax.nebius.cloud \ -p 6379 \ -a <Redis password>
To connect directly to the master (with SSL):
redis-cli -h c-<cluster ID>.rw.mdb.nemax.nebius.cloud \ -p 6380 \ -a <Redis password> \ --tls \ --cacert ~/.redis/NebiusAICA.crt
-
-
Once connected, send the
PING
command. Redis should returnPONG
in response.
What's next
- Read about service concepts.
- Learn more about creating a cluster and connecting to a cluster.
- Read questions and answers.