Configuring Routes for an OpenSearch Cluster

By default, a CSS OpenSearch cluster cannot access a target service—such as a client program or a Lightweight Directory Access Protocol (LDAP) service—that is located in a different VPC. To enable it, you need to configure a route for the cluster.

  1. Establish a VPC peering connection to connect two VPCs.
  2. On CSS, configure a route for the OpenSearch cluster that points to the client.
  3. Verify network connectivity after starting services.

Configuring routes to enable cluster communication offers the following advantages:

Constraints

Prerequisites

Establishing a VPC Peering Connection

Before configuring routes for a CSS cluster, establish a connection between the CSS cluster's VPC and that of the client, that is, a VPC peering connection.

Set the peer VPC to the VPC where the CSS cluster is located and the local VPC to the VPC where the client is located.

When adding routes for a VPC peering connection, configure the destination addresses based on service requirements.

If the CSS cluster and the client share the same security group, there is no need to configure security group rules for the instances in the VPC at either end of the VPC peering connection.

Configuring a Route for an OpenSearch Cluster

Configure a route for the OpenSearch cluster that points to the client, enabling the cluster to access the client.

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose Clusters > OpenSearch.
  3. In the cluster list, click the name of the target cluster. The cluster information page is displayed.
  4. Click the Overview tab. In the Configuration area, click Add Route next to Cluster Route.
    Figure 1 Adding a route
  5. In the displayed dialog box, configure the route information.
    Table 1 Adding a route

    Parameter

    Description

    IP Address

    Enter the IP address (or a CIDR block) of the client or server that the cluster needs to access, for example, 10.10.1.0.

    Subnet Mask

    Enter the subnet mask used with the IP address.

    The subnet mask must align with the network part of the IP address. That is:
    • The network bits (the 1s) of the subnet mask must encompass those of the IP address.
    • The host bits (the 0s) of the subnet mask must accommodate the IP address's host bits.

    The subnet mask should not cover too wide a range, avoiding unnecessary IP address exposure or waste of the address space. 255.255.255.0 (that is, /24) is recommended, which applies to most internal networking scenarios.

  6. Click OK to add the route.

    After the route is added, click View Route to check the route information. You can click Add Route to add another route; or click Delete Route to delete one—In the Delete Route dialog box, select a route, enter DELETE manually, and then click OK.

Testing Connectivity

Connectivity between the OpenSearch cluster and client cannot be verified right away. After the route is configured, start services. If the search service can be accessed, the route is configured successfully.