3.5. Starting More than One Cluster Within a Namespace


VoltDB Home » Documentation » VoltDB Kubernetes Administrator's Guide

3.5. Starting More than One Cluster Within a Namespace

By default, the Volt Helm charts assume there is only one cluster in each Kubernetes namespace. It is possible to run more than one Volt cluster within a namespace; however, to do so you need to start and stop the clusters and the operator separately. You do this by performing separate helm install operations for the operator and each cluster, using separate release names for each operation and setting the cluster.enabled and operator.enabled properties appropriately in each step.

For example, let's assume we want to start two clusters, rome and venice, in a single namespace, The steps for starting multiple Volt clusters in a single Kubernetes namespace are as follows:

  1. Start the operator separately

    Issue the helm install command setting the operator.enabled property to true and the cluster.enabled to false. Then wait for the operator to reach the ready state:

    $ helm install voltoperator voltdb/voltdb  \
       --values opconfig.yaml                  \
       --set operator.enabled=true             \
       --set cluster.enabled=false

    Note that you can provide additional operator properties, separately or as a YAML file, as part of the install operation. See Section B.7, “Operator Configuration Options” for a list of available operator properties.

  2. Start the first cluster

    Once the operator is ready, you can start the first cluster, reversing the values for operator.enabled and cluster.enabled and providing whatever cluster-specific configuration you need:

    $ helm install rome voltdb/voltdb         \
       --values romeconfig.yaml               \
       --set cluster.clusterSpec.replicas=3   \
       --set operator.enabled=false           \
       --set cluster.enabled=true

    Again, wait for the pods of the cluster to reach the ready state before moving on to the next step.

  3. Start subsequent clusters

    Repeat step #2 for any other clusters you want to run in the namespace waiting after each install command for the pods to reach their ready state. In our example, we only have one other cluster:

    $ helm install venice voltdb/voltdb       \
       --values veniceconfig.yaml             \
       --set cluster.clusterSpec.replicas=3   \
       --set operator.enabled=false           \
       --set cluster.enabled=true

The key point when running multiple clusters within a single namespace is that there is only one Volt Operator and the operator executes one operation at a time. So be sure to wait for each Helm command to complete before issuing a new command. Because of the constraint to sequential processing in the Operator, we recommend limiting the number of simultaneous Volt clusters within any single namespace to three.