Skip to main content

Public IP address in PostgreSQL TimescaleDB cluster

Last update:

A public IP address is a static public IP address that is assigned to a node to set up access to the node on the private network from the Internet. External traffic goes through the public IP address and is handled by the cloud router, which acts as a 1:1 NAT. The address is a floating IP because it can automatically switch when the role changes from replica to master and back again. It will not change or be removed from the panel.

The private subnet on which you can assign a public IP address must meet the requirements - prepare the subnet before adding a public IP address.

A public IP address can be added:

The number of public IP addresses in the cluster can be less than the number of nodes in the group, but cannot exceed it. If necessary, you can disable the public IP address.

Private subnet requirements

  • The subnet must have a cloud router with internet connectivity;
  • The IP address of the cloud router should be the default gateway on the subnet.

If the subnet does not meet the requirements, prepare it to connect a public IP address.

Prepare a private subnet to connect a public IP address

  1. Create a cloud router with an internet connection.
  2. Connect the private network to the cloud router.

1. Create a cloud router with internet connection

A cloud router allows you to route traffic between private networks.

You can use the router to configure access to the Internet from a private network or to access a device on a private subnet from the Internet using a public IP address.

  1. In the dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkCloud routers tab.
  3. Click Create router.
  4. Select the pool where the cloud router will be created.
  5. Enter the name of the router.
  6. Check the box Connect router to the Internet - an external IP address will be assigned to the router.
  7. Click Create.

2. Connect a private network to the cloud router

  1. In the Dashboard, on the top menu, click Products and select Cloud Servers.
  2. Go to NetworkCloud routers tab.
  3. Open the router card.
  4. Click Add Subnet.
  5. Select a private subnet.
  6. Optional: Enter the IP address of the router. If you do not specify an IP address, it will be automatically selected from free subnet addresses. The IP address of the cloud router must match the default gateway of the private subnet. You can view the gateway in the control panel: in the top menu, click ProductsCloud ServersNetworkPrivate Networks tab → Network page → Subnets tab → Subnet card → Automatic Network Settings block → Subnet Gateway field.
  7. Click Add Subnet.

Connect a public IP address

  1. Ensure that the cluster is on a private subnet that meets the requirements.
  2. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  3. Open the Active tab.
  4. Open the Database Cluster page → Settings tab.
  5. In the Node Addresses and Statuses block, in the row with the desired node, click Connect Public IP.
  6. Click Connect.

Disable public IP address

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the Database Cluster page → Settings tab.
  4. In the Node Addresses and Statuses block, in the row with the desired node, click .
  5. Click Delete.