Get started with Flex on Kubernetes
Configure Flex on your Redis Enterprise cluster for Kubernetes.
| Redis Enterprise for Kubernetes |
|---|
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.
enablePersistentVolumeResize in the REC persistentSpec if you are using redisOnFlashSpec as this will result in conflicts.-
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 -
Apply the REC configuration:
kubectl apply -f rec.yaml -
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.
-
Create a database specification file with
isRofset totruesimilar to the following example:apiVersion: app.redislabs.com/v1alpha1 kind: RedisEnterpriseDatabase metadata: name: flex-db spec: memorySize: 10Gi isRof: true rofRamSize: 2Gi -
Apply the REDB:
kubectl apply -f redb.yaml -
Verify the database status:
kubectl get redb
Verify Flex is active
To confirm that Flex is working:
-
Check the database status:
kubectl get redb <database-name> -o yaml -
Look for
isRof: truein the status section. -
Connect to the database and verify that data operations work correctly.
Next steps
- Scale your deployment: Learn how to scale volume, throughput, and infrastructure.
- Plan your deployment: Review sizing guidelines and best practices.