Public IP address in an OpenSearch cluster
Public IP addresses are static IP addresses that can be attached to cluster nodes in a private network to configure access to them from the internet. Addresses are attached to all nodes in the group simultaneously, with a dedicated public IP address for each node. If you add a node to a group where all nodes already have IP addresses, the new node will also be assigned a public IP address.
To connect a public IP address, a cloud router with internet access is used. The public IP address is associated with the private IP address of the cluster node. Incoming traffic is processed by the cloud router — the router performs 1:1 NAT via an external IP address allocated when connecting the router to the internet. Incoming traffic can be filtered using a cloud firewall or security group.
You can attach a public IP address:
-
when creating a cluster in an existing private subnet, if the subnet meets the requirements. If the subnet does not meet the requirements, prepare it for connecting a public IP address before creating the cluster or connect the public IP address after creating the cluster;
-
or in an existing cluster, even if the private subnet does not meet the requirements.
If necessary, you can disconnect the public IP address for the entire node group.
Private subnet requirements for attaching a public IP address
- the subnet must have a cloud router connected to the internet;
- The IP address of the cloud router must be the default gateway in the cluster subnet.
If the router is already connected to the cluster subnet, but its IP address does not match the gateway, you will not be able to connect a public IP address. In this case, disconnect the subnet from the cloud router, and then connect it again and specify the subnet gateway address.
Prepare a private subnet for attaching a public IP address
1. Create a cloud router with an internet connection
- In the control panel, in the top menu, click Products and select Cloud Servers.
- Go to Network → Cloud Routers.
- Click Create router.
- Select the location where the cloud router will be created.
- Select the router type.
- Enter the router name.
- Select the Connect router to the internet checkbox — a public IP address will be allocated for the router.
- Click Create.
2. Connect a private subnet to the cloud router
- In the control panel, in the top menu, click Products and select Cloud Servers.
- Go to Network → Cloud Routers.
- Open the router card.
- Click Connect subnet.
- Select a private subnet.
- Optional: enter the router IP address. If you do not specify an IP address, it will be automatically selected from the available subnet addresses. The cloud router IP address must match the default gateway of the private subnet. You can view the gateway in the control panel: in the top menu, click Products → Cloud Servers → Network → Private Networks tab → network page → Subnets tab → subnet card → Automatic network settings section → Subnet gateway.
- Click Connect.
Attach a public IP address
-
In the control panel, in the top menu, click Products and select Managed Databases.
-
Open the Active tab.
-
Open the database cluster page → Settings tab.
-
In the node group card, in the Public access line, click .
-
If the cluster subnet meets the requirements, click Connect.
-
If the cluster subnet does not meet the requirements:
6.1. Select an existing cloud router or create a new one. The cluster subnet will be connected to the router. If you select an existing router without internet access or a new router, it will be automatically connected to the internet.
6.2. Click Connect router and address.
Public IP addresses will be attached to all nodes in the node group simultaneously, with a dedicated public IP address for each node.
Detach a public IP address
- In the control panel, in the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Settings tab.
- In the node group card, in the Public access line, click .
- Click Disconnect. Public IP addresses will be disconnected from all nodes in the node group simultaneously.