Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • 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 ClickHouse®
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
      • Updating cluster settings
      • Maintenance
      • Getting the ClickHouse® patch version
      • ClickHouse® version update
      • Stopping and restarting a cluster
        • Managing ClickHouse® hosts
        • Managing ZooKeeper hosts
        • Managing ClickHouse® Keeper hosts
        • Changing a coordination service
        • Migrating hosts to a different availability zone
      • Managing backups
      • Managing cluster access
      • Deleting a cluster
  • Access management
  • Inspections and recommendations
  • Pricing policy
  • Yandex Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  1. Step-by-step guides
  2. Clusters
  3. Managing hosts
  4. Changing a coordination service

Changing the coordination service from embedded ClickHouse® Keeper to ClickHouse® Keeper on separate hosts

Written by
Yandex Cloud
View in Markdown

If using embedded ClickHouse® Keeper as a coordination service, you can change it to ClickHouse® Keeper on separate hosts. Once you enable ClickHouse® Keeper on separate hosts, you cannot disable it or switch back to embedded ClickHouse® Keeper.

Warning

ClickHouse® Keeper hosts are counted towards the cloud resource quota and the cluster cost.

CLI
REST API
gRPC API

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

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.

If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To change the coordination service:

  1. View the command description:

    yc managed-clickhouse cluster add-zookeeper --help
    
  2. In the command, specify the following host parameters:

    yc managed-clickhouse cluster add-zookeeper \
      --name <cluster_name> \
      --resource-preset <host_class> \
      --disk-type <disk_type> \
      --disk-size <storage_size> \
      --host type=keeper,`
            `zone-id=<availability_zone>,`
            `subnet-id=<subnet_ID> \
      --convert-tables-to-replicated <convert_tables>
    

    Where:

    • --resource-preset: Host class.

    • --disk-type: Disk type.

    • --disk-size: Storage size, in bytes.

    • --host: Host settings:

      • type: Host type, keeper.

      • zone-id: Availability zone.

      • subnet-id: Subnet ID. Specify if the selected availability zone has two or more subnets.

      You can add multiple hosts at once. Specify a separate --host flag for each host.

    • --convert-tables-to-replicated: Convert non-replicated tables to replicated ones.

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

To change the coordination service:

  1. Get an IAM token for API authentication and put it into an environment variable:

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

    1. Create a file named body.json and paste the following code into it:

      {
        "resources": {
          "resourcePresetId": "<host_class>",
          "diskSize": "<storage_size>",
          "diskTypeId": "<disk_type>"
        },
        "hostSpecs": [
          {
            "zoneId": "<availability_zone>",
            "type": "KEEPER",
            "subnetId": "<subnet_ID>"
          }
        ],
        "convertTablesToReplicated": <convert_tables>
      }
      

      Where:

      • resources: Host configuration:

        • resourcePresetId: Host class ID. You can get the list of available host classes with their IDs using the ResourcePreset.list method.
        • diskSize: Storage size, in bytes.
        • diskTypeId: Disk type.
      • hostSpecs: Host settings as an array of elements, one per host. Each element has the following structure:

        • zoneId: Availability zone.

        • type: Host type, KEEPER.

        • subnetId: Subnet ID.

      • convertTablesToReplicated: Convert non-replicated tables to replicated ones.

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

    2. Run this request:

      curl \
        --request POST \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-clickhouse/v1/clusters/<cluster_ID>:addZookeeper' \
        --data '@body.json'
      
  3. View the server response to make sure your request was successful.

To change the coordination service:

  1. Get an IAM token for API authentication and put it into 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.AddZookeeper method, e.g., via the following gRPCurl request:

    1. Create a file named body.json and paste the following code into it:

      {
        "cluster_id": "<cluster_ID>",
        "resources": {
          "resource_preset_id": "<host_class>",
          "disk_size": "<storage_size>",
          "disk_type_id": "<disk_type>"
        },
        "host_specs": [
          {
            "zone_id": "<availability_zone>",
            "type": "KEEPER",
            "subnet_id": "<subnet_ID>",
          }
        ],
        "convert_tables_to_replicated": <convert_tables>
      }
      

      Where:

      • resources: Host configuration:

        • resource_preset_id: Host class ID. You can get the list of available host classes with their IDs using the ResourcePresetService.List method.
        • disk_size: Storage size, in bytes.
        • disk_type_id: Disk type.
      • host_specs: Host settings as an array of elements, one per host. Each element has the following structure:

        • zone_id: Availability zone.

        • type: Host type, KEEPER.

        • subnet_id: Subnet ID.

      • convertTablesToReplicated: Convert non-replicated tables to replicated ones.

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

    2. Run this request:

      grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/clickhouse/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d @ \
        mdb.api.cloud.yandex.net:443 \
        yandex.cloud.mdb.clickhouse.v1.ClusterService.addZookeeper \
        < body.json
      
  4. Check the server response to make sure your request was successful.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Managing ClickHouse® Keeper hosts
Next
Migrating hosts to a different availability zone
© 2026 Direct Cursus Technology L.L.C.