Active-Active examples

YAML examples for Active-Active Redis Enterprise databases across multiple Kubernetes clusters.

Redis Enterprise for Kubernetes

This page provides YAML examples for deploying Active-Active Redis Enterprise databases across multiple Kubernetes clusters. Active-Active databases provide multi-master replication with conflict resolution, enabling global distribution and local read/write access.

To learn more, see Active-Active databases.

Architecture

This example shows a two-cluster Active-Active setup:

  • Cluster 1: rec-chicago in namespace ns-chicago
  • Cluster 2: rec-boston in namespace ns-boston

For complete deployment instructions, see Active-Active databases.

RERC for Chicago cluster

Create a RedisEnterpriseRemoteCluster (RERC) resource on each participating cluster that points to the other clusters.

apiVersion: app.redislabs.com/v1alpha1
kind: RedisEnterpriseRemoteCluster
metadata:
  name: new-york-1
  labels:
    app: redis-enterprise
spec:
  # The name of the REC that the RERC is pointing at.
  recName: rec

  # The namespace of the REC that the RERC is pointing at.
  recNamespace: ns1

  # The URL of the cluster, will be used for the active-active database URL.
  apiFqdnUrl: testapi-new-york-1-ns1.redislabs.com

  # The database URL suffix, will be used for the active-active
  # database replication endpoint and replication endpoint SNI.
  dbFqdnSuffix: -example-new-york-1-ns1.redislabs.com

  # The name of the secret containing cluster credentials.
  # Needs to be formatted as: "redis-enterprise-<RERC name>"
  secretName: redis-enterprise-new-york-1

RERC configuration:

  • metadata.name: Unique name for this remote cluster reference
  • spec.recName: Name of the remote REC
  • spec.recNamespace: Namespace of the remote REC
  • spec.apiFqdnUrl: API endpoint URL for the remote cluster
  • spec.dbFqdnSuffix: Database hostname suffix for the remote cluster
  • spec.secretName: Secret containing authentication credentials

Edit the values in the downloaded YAML file for your specific setup, updating the remote cluster details, API endpoints, and secret names to match your actual environment.

Active-Active database

The RedisEnterpriseActiveActiveDatabase (REAADB) resource defines the Active-Active database.

apiVersion: app.redislabs.com/v1alpha1
kind: RedisEnterpriseActiveActiveDatabase
metadata:
  name: reaadb
  labels:
    app: redis-enterprise
spec:
  participatingClusters:
    # Participating cluster pointing to RERC named: 'new-york-1'.
    - name: new-york-1

    # Participating cluster pointing to RERC named: 'boston-1'.
    - name: boston-1

REAADB configuration:

  • metadata.name: Active-Active database name
  • spec.participatingClusters: List of RERC names that participate in this database
  • spec.globalConfigurations: Database settings applied to all participating clusters

Edit the downloaded YAML file to add global database settings such as memory allocation, shard count, replication settings, database secrets, Redis modules, and database-specific Redis configuration.

Applying the configuration

To deploy Active-Active databases using these YAML files, follow Create Active-Active database (REAADB), which provides detailed instructions for preparing clusters, creating RERC resources, and deploying REAADB configurations.

RATE THIS PAGE
Back to top ↑