Get started with Flex on Kubernetes

Configure Flex on your Redis Enterprise cluster for Kubernetes.

Redis Enterprise for Kubernetes
Note:
This page applies to Redis database version 7.4 and earlier using Auto Tiering. If you use version 8.0 or later, see Redis Flex.

Flex extends your database capacity by combining RAM and flash (SSD) storage. This tiered architecture keeps frequently accessed (hot) data in RAM for sub-millisecond latency while storing less active (warm) data on flash to reduce costs and increase capacity.

Prerequisites

Before you begin, verify that you have:

  • Redis Enterprise for Kubernetes version 8.0.2-2 or later installed
  • A running RedisEnterpriseCluster (REC) resource
  • Redis database version 7.4 or later
  • Locally attached NVMe SSDs on your worker nodes
  • A StorageClass configured for flash storage with a unique name

For hardware requirements and sizing guidelines, see Plan your deployment.

Configure the REC for Flex

To enable Flex, configure your RedisEnterpriseCluster (REC) resource with flash storage settings. Add the redisOnFlashSpec section to your REC specification.

Key fields in redisOnFlashSpec:

Field Description
enabled Set to true to enable Flex.
flashStorageClassName Name of the StorageClass for flash storage.
flashDiskSize Size of the flash storage per node.
storageEngine Storage engine. Set to speedb for Flex.

For all available fields, see the REC API reference.

Warning:
PVC expansion is not supported when using Flex. Do not enable enablePersistentVolumeResize in the REC persistentSpec if you are using redisOnFlashSpec as this will result in conflicts.
  1. Create a REC specification file with flash storage settings similar to the following example:

    apiVersion: app.redislabs.com/v1
    kind: RedisEnterpriseCluster
    metadata:
      name: rec
    spec:
      nodes: 3
      redisOnFlashSpec:
        enabled: true
        flashStorageClassName: local-flash
        flashDiskSize: 100Gi
        storageEngine: speedb
    
  2. Apply the REC configuration:

    kubectl apply -f rec.yaml
    
  3. Verify that the cluster is ready:

    kubectl get rec
    

Create a Flex database

After you configure the cluster, create a RedisEnterpriseDatabase (REDB) resource with Flex enabled.

Key fields in the REDB:

Field Description
memorySize Total database size (RAM + flash).
isRof Set to true to enable Flex for this database.
rofRamSize Amount of RAM allocated to the database.

For all available fields, see the REDB API reference.

  1. Create a database specification file with isRof set to true similar to the following example:

    apiVersion: app.redislabs.com/v1alpha1
    kind: RedisEnterpriseDatabase
    metadata:
      name: flex-db
    spec:
      memorySize: 10Gi
      isRof: true
      rofRamSize: 2Gi
    
  2. Apply the REDB:

    kubectl apply -f redb.yaml
    
  3. Verify the database status:

    kubectl get redb
    

Verify Flex is active

To confirm that Flex is working:

  1. Check the database status:

    kubectl get redb <database-name> -o yaml
    
  2. Look for isRof: true in the status section.

  3. Connect to the database and verify that data operations work correctly.

Next steps

RATE THIS PAGE
Back to top ↑