{
  "id": "persistent-volumes",
  "title": "Use persistent volumes in Redis Enterprise clusters",
  "url": "https://redis.io/docs/latest/operate/kubernetes/7.8.4/recommendations/persistent-volumes/",
  "summary": "This section covers details about how persistent volumes are sized and specified for Redis Enterprise cluster deployments.",
  "content": "## Storage types\n\nRedis Enterprise for Kubernetes can only use storage classes supported by block storage. Block storage is mounted at the Kubernetes node level and utilizes EXT4 or XFS file systems. It can be sourced from enterprise-grade SANs or cloud environments such as EBS, Azure Managed Disks, or GCP persistent disks.\n\n\nNFS, NFS-like, and multi-read-write/shared storage options are not supported. These types of storage are often slow and can cause locking behaviors that are incompatible with the requirements of database storage.\n\n\n## REC `persistentSpec` field \nTo deploy a Redis Enterprise cluster with Redis Enterprise operator the\nspec should include a *persistentSpec* section, in the\n*redis-enterprise-cluster.yaml* file:\n\n    spec:\n      nodes: 3\n      persistentSpec:\n       enabled: true\n       storageClassName: \"standard\"\n       volumeSize: \"23Gi\" #optional\n\nPersistence storage is a requirement for production deployments.\n\n\nFor **production deployments** of Redis Enterprise Cluster on Kubernetes,\nthe Redis Enterprise Cluster (REC) must be deployed with persistence enabled.\nThe REC deployment files in the [Kubernetes documentation](https://github.com/RedisLabs/redis-enterprise-k8s-docs) contain this declaration by default.\n\n\n## Volume size\n\n*volumeSize* is an optional definition. By default, if the definition is\nomitted, operator allocates five times (5x) the amount of memory (RAM)\ndefined for nodes (see example below), which is the recommended\npersistent storage size as described in the [Hardware\nrequirements]() article.\n\nTo explicitly specify the persistent storage size, use the *volumeSize*\nproperty as described in the example above.\n\nPersistent volume claims can be expanded, but not reduced after creation. See [Expand PersistentVolumeClaim (PVC)]() for details.\n\n\nWe recommend that you omit the volumeSize definition from the REC declaration\nso that the Redis Enterprise Cluster deployment on Kubernetes use the default volume size.\n\n\n## Storage class name\n\n*storageClassName* determines the Storage Class resource, which is\ndefined by the Kubernetes cluster administrator, to be used for\npersistent storage.\n\nDifferent Kubernetes distributions and different deployments use\ndifferent Storage Class resources.\n\nIn order to determine the Storage Class resources available for your K8s\ndeployment, use the following command:\n\n    kubectl get StorageClass\n\nTypically, AWS provides \"gp2\" as the Storage Class name while GKE uses \"standard.\"\nAzure provides two Storage Classes: \"default\" using HDDs, and \"managed-premium\" using SSDs.\n\nBelow is an example of a response to the command.\n\n|                         |                                                         |\n| ----------------------- | ------------------------------------------------------- |\n| *Name:*                 | *gp2*                                                   |\n| *IsDefaultClass:*       | *Yes*                                                   |\n| *Annotations:*          | *storageclass.beta.kubernetes.io/is-default-class=true* |\n| *Provisioner:*          | *kubernetes.io/aws-ebs*                                 |\n| *Parameters:*           | *encrypted=false,kmsKeyId=,type=gp2*                    |\n| *AllowVolumeExpansion:* | *\\\u003cunset\\\u003e*                                             |\n| *MountOptions:*         | *\\\u003cnone\\\u003e*                                              |\n| *ReclaimPolicy:*        | *Delete*                                                |\n| *VolumeBindingMode:*    | *Immediate*                                             |\n| *Events:*               | *\\\u003cnone\\\u003e*                                              |\n\n\nstorageClassName must be specified for this deployment type.\n\n\n\nThe storage class cannot be changed after deployment. Trying to change this value after deployment could result in unexpected and potentially damaging behavior.\n\n\nExample of the redisEnterpriseNodeResources definition:\n\n    redisEnterpriseNodeResources:\n      limits:\n        cpu: \"4000m\"\n        memory: 4Gi\n      requests:\n        cpu: \"4000m\"\n        memory: 4Gi\n",
  "tags": ["docs","operate","kubernetes"],
  "last_updated": "2026-04-08T12:21:52-07:00"
}

