Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for Valkey™
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Updating cluster settings
      • Valkey™ version upgrade
      • Working with Valkey™ models
      • Stopping and starting a cluster
      • Managing cluster hosts
      • Migrating hosts to a different availability zone
      • Managing backups
      • Deleting a cluster
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Getting a list of cluster hosts
  • Creating a host
  • Updating a host
  • Deleting a host
  1. Step-by-step guides
  2. Clusters
  3. Managing cluster hosts

Managing Valkey™ cluster hosts

Written by
Yandex Cloud
Updated at February 3, 2026
  • Getting a list of cluster hosts
  • Creating a host
  • Updating a host
  • Deleting a host

You can add and remove cluster hosts, as well as manage their settings. To learn how to move cluster hosts to a different availability zone, see this guide.

Getting a list of cluster hostsGetting a list of cluster hosts

Management console
CLI
REST API
gRPC API
  1. Navigate to the Yandex Managed Service for Valkey™ service.
  2. Click the name of your cluster and select the Hosts tab.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To get a list of cluster hosts, run this command:

yc managed-redis host list \
  --cluster-name=<cluster_name>

Result:

+---------------------------------+----------------------+------------+---------+--------+-------------------+
|              NAME               |      CLUSTER ID      | SHARD NAME |  ROLE   | HEALTH |      ZONE ID      |
+---------------------------------+----------------------+------------+---------+--------+-------------------+
| rc1a-...caf.mdb.yandexcloud.net | c9qb2q230gg1******** | shard1     | MASTER  | ALIVE  | ru-central1-a     |
| rc1b-...bgc.mdb.yandexcloud.net | c9qb2q230gg1******** | shard1     | REPLICA | ALIVE  | ru-central1-b     |
+---------------------------------+----------------------+------------+---------+--------+-------------------+

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

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Cluster.ListHosts method, e.g., via the following cURL request:

    curl \
        --request GET \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>/hosts'
    

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

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the ClusterService.ListHosts method, e.g., via the following gRPCurl request:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>"
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.ListHosts
    

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

  4. Check the server response to make sure your request was successful.

Creating a hostCreating a host

The number of hosts in Yandex Managed Service for Valkey™ clusters is limited by the CPU and RAM quotas allocated to database clusters in your cloud. To check the resources currently in use, open the Quotas page and find Managed Databases.

Note

You can configure public access to hosts only for clusters created with TLS enabled.

Management console
CLI
Terraform
REST API
gRPC API

To create a host:

  1. Navigate to the Yandex Managed Service for Valkey™ service.
  2. Click the cluster name and go to the Hosts tab.
  3. Click Create host.
  4. Specify the following host settings:
    • Availability zone.

    • Subnet (if the required subnet is not on the list, create it).

    • Host priority for promotion to master.

    • Configure public access to the host, if required.

    • If you are adding a host to a sharded cluster, select a shard.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To create a host:

  1. To choose a subnet for your new host, get the list of all cluster subnets:

    yc vpc subnet list
    

    Result:

    +----------------------+-----------+-----------------------+---------------+------------------+
    |          ID          |   NAME    |       NETWORK ID      |     ZONE      |      RANGE       |
    +----------------------+-----------+-----------------------+---------------+------------------+
    | b0cl69a2b4c6******** | default-d | enp6rq72rndgr******** | ru-central1-d | [172.16.0.0/20]  |
    | e2lkj9qwe762******** | default-b | enp6rq72rndgr******** | ru-central1-b | [10.10.0.0/16]   |
    | e9b0ph42bn96******** | a-2       | enp6rq72rndgr******** | ru-central1-a | [172.16.32.0/20] |
    | e9b9v22r88io******** | default-a | enp6rq72rndgr******** | ru-central1-a | [172.16.16.0/20] |
    +----------------------+-----------+-----------------------+---------------+------------------+
    

    If the required subnet is not on the list, create it.

  2. See the description of the CLI command for adding hosts:

    yc managed-redis host add --help
    
  3. Run this command to add a host:

    yc managed-redis host add \
      --cluster-name=<cluster_name> \
      --host zone-id=<availability_zone>,`
        `subnet-id=<subnet_ID>,`
        `assign-public-ip=<public_access>,`
        `replica-priority=<host_priority>,`
        `shard-name=<shard_name>
    

    Where:

    • --cluster-name: Yandex Managed Service for Valkey™ cluster name. You can get it from the list of clusters in the folder.
    • --host: Host settings:
      • zone-id: Availability zone.
      • subnet-id: Subnet ID. You must specify this setting if the selected availability zone has more than one subnet.
      • assign-public-ip: Internet access to the host via a public IP address, true or false.
      • replica-priority: Host priority for assignment as a master if the primary master fails. It is only available for non-sharded clusters.
      • shard-name: Name of the shard to which you are adding the new host if the cluster is sharded.

To create a host:

  1. Open the current Terraform configuration file describing your infrastructure.

    To learn how to create this file, see Creating a cluster.

  2. Add a host section to the Yandex Managed Service for Valkey™ cluster description:

    resource "yandex_mdb_redis_cluster_v2" "<cluster_name>" {
      ...
      host {
        zone             = "<availability_zone>"
        subnet_id        = "<subnet_ID>"
        assign_public_ip = <public_access>
        replica_priority = <host_priority>
        shard_name       = "<shard_name>"
      }
    }
    

    Where assign_public_ip is public access to the host, true or false.

  3. Validate your configuration.

    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.

For more information, see this Terraform provider guide.

Timeouts

The Terraform provider sets the following timeouts for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring it from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the timeout are aborted.

How do I change these limits?

Add the timeouts section to your cluster description, such as the following:

resource "yandex_mdb_redis_cluster_v2" "<cluster_name>" {
  ...
  timeouts {
    create = "1h30m" # 1 hour 30 minutes
    update = "2h"    # 2 hours
    delete = "30m"   # 30 minutes
  }
}
  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Cluster.AddHosts method, e.g., via the following cURL request:

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>/hosts:batchCreate' \
        --data '{
                  "hostSpecs": [
                    {
                      "zoneId": "<availability_zone>",
                      "subnetId": "<subnet_ID>",
                      "shardName": "<shard_name>",
                      "replicaPriority": "<host_priority>",
                      "assignPublicIp": <allow_public_access_to_host>
                    }
                  ]
                }'
    

    Where hostSpecs sets the host parameters:

    • zoneId: Availability zone.
    • subnetId: Subnet ID. Specify it if the selected availability zone has two or more subnets.
    • shardName: Shard name for the host. Only used if cluster sharding is enabled.
    • replicaPriority: Host priority for master promotion during failover.
    • assignPublicIp: Internet access to the host via a public IP address, true or false. You can only enable public access if your cluster supports TLS.

    You can get the cluster ID from the list of clusters in your folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the ClusterService.AddHosts method, e.g., via the following gRPCurl request:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "host_specs": [
                {
                  "zone_id": "<availability_zone>",
                  "subnet_id": "<subnet_ID>",
                  "shard_name": "<shard_name>",
                  "replica_priority": "<host_priority>",
                  "assign_public_ip": <allow_public_access_to_host>
                }
              ] 
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.AddHosts
    

    Where host_specs sets the host parameters:

    • zone_id: Availability zone.
    • subnet_id: Subnet ID. Specify it if the selected availability zone has two or more subnets.
    • shard_name: Shard name for the host. Only used if cluster sharding is enabled.
    • replica_priority: Host priority for master promotion during failover.
    • assign_public_ip: Internet access to the host via a public IP address, true or false. You can only enable public access if your cluster supports TLS.

    You can get the cluster ID from the list of clusters in your folder.

  4. Check the server response to make sure your request was successful.

Warning

If you cannot connect to the host you added, check that the cluster security group is properly configured for the subnet containing your host.

Updating a hostUpdating a host

Note

Hosts are only accessible from the internet via public IP addresses if you created the cluster with TLS support enabled.

Management console
CLI
Terraform
REST API
gRPC API

To change the cluster host settings:

  1. Navigate to the Yandex Managed Service for Valkey™ service.

  2. Click the name of your cluster and select the Hosts tab.

  3. Click in the host row and select Edit.

  4. Specify new host settings:

    1. Enable Public access to make the host accessible from outside Yandex Cloud, if required.
    2. Specify host priority for promotion to master.
  5. Click Save.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To change the host settings, run this command:

yc managed-redis host update <host_name> \
  --cluster-name=<cluster_name> \
  --assign-public-ip=<public_access> \
  --replica-priority=<host_priority>

Where --assign-public-ip is public access to the host, true or false.

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

To change the cluster host settings:

  1. Open the current Terraform configuration file describing your infrastructure.

    To learn how to create this file, see Creating a cluster.

  2. In the Yandex Managed Service for Valkey™ cluster description, change the attributes of the host section referring to the host you want to update.

    resource "yandex_mdb_redis_cluster_v2" "<cluster_name>" {
      ...
      host {
        zone             = "<availability_zone>"
        subnet_id        = "<subnet_ID>"
        assign_public_ip = <public_access>
        replica_priority = <host_priority>
        shard_name       = "<shard_name>"
      }
    }
    

    Where assign_public_ip is public access to the host, true or false.

  3. Validate your configuration.

    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.

For more information, see this Terraform provider guide.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Cluster.UpdateHosts method, e.g., via the following cURL request:

    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.

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>/hosts:batchUpdate' \
        --data '{
                  "updateHostSpecs": [
                    {
                      "hostName": "<host_name>",
                      "replicaPriority": "<host_priority>",
                      "assignPublicIp": <public_access_to_cluster_host>,
                      "updateMask": "replicaPriority,assignPublicIp"
                    }
                  ]
                }'
    

    Where updateHostSpecs sets the host parameters:

    • hostName: Name of the host you need to update. To find out the name, get the list of hosts in the cluster.
    • replicaPriority: Host priority for master promotion during failover.
    • assignPublicIp: Internet access to the host via a public IP address, true or false. You can only enable public access if your cluster supports TLS.
    • updateMask: Comma-separated list of settings you want to update.

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

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the ClusterService.UpdateHosts method, e.g., via the following gRPCurl request:

    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 update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "update_host_specs": [
                {
                  "host_name": "<host_name>",
                  "replica_priority": "<host_priority>",
                  "assign_public_ip": <public_access_to_cluster_host>,
                  "update_mask": {
                    "paths": ["replica_priority", "assign_public_ip"]
                  }
                }
              ] 
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.UpdateHosts
    

    Where update_host_specs sets the host parameters:

    • host_name: Name of the host you need to update. To find out the name, get the list of hosts in the cluster.
    • replica_priority: Host priority for master promotion during failover.
    • assign_public_ip: Internet access to the host via a public IP address, true or false. You can only enable public access if your cluster supports TLS.
    • update_mask: List of parameters to update as an array of strings (paths[]).

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

  4. Check the server response to make sure your request was successful.

Warning

If you cannot connect to the host you added, check that the cluster security group is properly configured for the subnet containing your host.

Deleting a hostDeleting a host

You can delete a host from a Valkey™ cluster as long as it is not the only host in the cluster. To replace the only host, first create a new host and then delete the old one.

If you are deleting the master host, Managed Service for MySQL® will automatically promote another replica to master.

You cannot delete a host if the number of hosts in the cluster or shard is equal to the minimum allowed. For more information, see Quotas and limits.

Management console
CLI
Terraform
REST API
gRPC API

To delete a host from a cluster:

  1. Navigate to the Yandex Managed Service for Valkey™ service.
  2. Click the name of your cluster and select the Hosts tab.
  3. In the cluster row, click and select Delete.
  4. In the window that opens, enable Delete host and click Confirm.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To delete a host from a cluster, run this command:

yc managed-redis host delete <host_name> \
  --cluster-name=<cluster_name>

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

To delete a host from a cluster:

  1. Open the current Terraform configuration file describing your infrastructure.

    To learn how to create this file, see Creating a cluster.

  2. Delete the host section from the Yandex Managed Service for Valkey™ cluster description.

  3. Validate your configuration.

    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. Type yes and press Enter.

    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.

For more information, see this Terraform provider guide.

Timeouts

The Terraform provider sets the following timeouts for Yandex Managed Service for Valkey™ cluster operations:

  • Creating a cluster, including by restoring it from a backup: 15 minutes.
  • Editing a cluster: 60 minutes.
  • Deleting a cluster: 15 minutes.

Operations exceeding the timeout are aborted.

How do I change these limits?

Add the timeouts section to your cluster description, such as the following:

resource "yandex_mdb_redis_cluster_v2" "<cluster_name>" {
  ...
  timeouts {
    create = "1h30m" # 1 hour 30 minutes
    update = "2h"    # 2 hours
    delete = "30m"   # 30 minutes
  }
}
  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Cluster.DeleteHosts method, e.g., via the following cURL request:

    curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-redis/v1/clusters/<cluster_ID>/hosts:batchDelete' \
        --data '{
                  "hostNames": [ "<host_name>" ]
                }'
    

    Where hostNames is the name of the host to delete. To find out the name, get the list of hosts in the cluster.

    You can get the cluster ID from the list of clusters in your folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the ClusterService.DeleteHosts method, e.g., via the following gRPCurl request:

    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/redis/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
              "cluster_id": "<cluster_ID>",
              "host_names": [ "<host_name>" ]
            }' \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.redis.v1.ClusterService.DeleteHosts
    

    Where host_names is the name of the host to delete. To find out the name, get the list of hosts in the cluster.

    You can get the cluster ID from the list of clusters in your folder.

  4. Check the server response to make sure your request was successful.

Was the article helpful?

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