Replacing a Static Node FQDN
Warning
This article is dedicated to YDB clusters that use configuration V2. This configuration method is currently experimental and is only available for YDB versions starting from v25.1. For production use, we recommend choosing configuration V1 — it is the main method and is officially supported for all YDB clusters.
The fully qualified domain name (FQDN) of a static node is specified by the host parameter in the hosts section. To change the FQDN without replacing the server or its disks, follow these steps.
Create a DNS record for the new FQDN that points to the same server. The new FQDN must be resolvable from every cluster node. Keep the old DNS record until the procedure is complete. If the cluster uses TLS, prepare a node certificate that contains the new FQDN.
-
Fetch the current cluster configuration using the ydb admin cluster config fetch command:
ydb [global options...] admin cluster config fetch > config.yaml -
In
config.yaml, locate the existinghostslist entry for the target node and change only itshostvalue. Do not delete the node entry and create a new one elsewhere — this would change the node's position in the configuration and break the update.For example, for node
1, replacenode-1.example.comwithnode-1-new.example.com:config: hosts: - host: node-1-new.example.com node_id: 1 -
Apply the updated configuration using the ydb admin cluster config replace command:
ydb [global options...] admin cluster config replace -f config.yaml -
Wait until the new FQDN appears in the local copy of
config.yamlon the target node. -
Prepare the target node for restart:
- If the cluster uses TLS, install the prepared certificate.
- If the node starts with
--node static, make sure that the newhostvalue matches the output of eitherhostnameorhostname -f. If the values do not match, configure the operating system so thathostname -freturns the newhostvalue before restarting.
-
Obtain permission to stop the process, then restart the static node process. For example, when using
systemd:sudo systemctl restart ydbd-storageThe service name may differ depending on the deployment method.
-
On the Nodes tab of the cluster monitoring page, make sure the node has reconnected with its original ID and the new FQDN. You can then remove the old DNS record.