6.4. Configuring XDCR in Local Namespaces

Documentation

VoltDB Home » Documentation » VoltDB Kubernetes Administrator's Guide

6.4. Configuring XDCR in Local Namespaces

The easiest way to configure XDCR clusters is when the VoltDB clusters are within the same Kubernetes namespace or cluster. In this case, the cluster IP addresses are all locally visible and so do not need any additional network setup. The only special XDCR configuration necessary is providing the address of a replication port from one node of the remote cluster as the source property.

In Kubernetes the cluster nodes are assigned unique host names based on the initial Helm release name (that is, the name you assigned the cluster when you installed it). The VoltDB Operator also creates services that abstract the individual server addresses and provide a single entry point for specific ports on the database cluster. The two services of interest are DR and client, which will direct traffic to the corresponding port (5555 or 21212 by default) on an arbitrary node of the cluster. If the two database instances are within the same Kubernetes cluster, you can use the DR service to make the initial connection between the database systems, as shown in the following YAML configuration file.

If the databases are running in different namespaces, you will need to specify the fully qualified service name as the connection source in the configuration, which includes the namespace. So, for example, if the manhattan database is in namespace ny1 and brooklyn is in ny2, the YAML configuration files related to XDCR for the two clusters would be the following.

Manhattan Cluster

cluster:
  config:
    deployment:
      dr:
        id: 1
        role: xdcr
        connection:
          enabled: true
          source: "brooklyn-voltdb-cluster-​dr.ny2.svc.cluster.local:5555"

Brooklyn Cluster

cluster:
  config:
    deployment:
      dr:
        id: 2
        role: xdcr
        connection:
          enabled: true
          source: "manhattan-voltdb-cluster-​dr.ny1.svc.cluster.local:5555"