Basic deployment examples
YAML examples for basic Redis Enterprise deployment including RBAC, cluster, and database configurations.
Redis Enterprise for Kubernetes |
---|
This page provides complete YAML examples for a basic Redis Enterprise deployment on Kubernetes. These examples include all the essential components you need to deploy a Redis Enterprise cluster and create a database.
For complete deployment instructions, see Deploy on Kubernetes.
Service account
The service account provides an identity for the Redis Enterprise operator.
Service account configuration:
name
: The service account name used by the operatorlabels
: Standard labels for Redis Enterprise resources
Role
The Role defines the permissions needed by the Redis Enterprise operator within the namespace.
Role configuration:
name
: Must match the role name referenced in the role bindingrules
: Comprehensive permissions for managing Redis Enterprise resourcesapiGroups
: Includes core Kubernetes APIs and Redis Enterprise custom resources
Key permissions:
app.redislabs.com
: Full access to Redis Enterprise custom resourcessecrets
: Manage TLS certificates and database credentialsservices
: Create and manage service endpointspods
: Monitor and manage Redis Enterprise podspersistentvolumeclaims
: Manage persistent storage
Role binding
The RoleBinding connects the service account to the role, granting the necessary permissions.
Role binding configuration:
subjects.name
: Must match the service account nameroleRef.name
: Must match the role namenamespace
: Apply in the same namespace as other resources
Redis Enterprise cluster
The RedisEnterpriseCluster (REC) custom resource defines the cluster specification.
Cluster configuration:
metadata.name
: Cluster name (cannot be changed after creation)spec.nodes
: Number of Redis Enterprise nodes (minimum 3)persistentSpec.volumeSize
: Storage size per noderedisEnterpriseNodeResources
: CPU and memory allocation per node
Edit the values in the downloaded YAML file based on your requirements, such as increasing the number of nodes, adjusting storage size, or modifying resource allocation.
Redis Enterprise database
The RedisEnterpriseDatabase (REDB) custom resource defines the database specification.
Database configuration:
metadata.name
: Database namespec.memorySize
: Memory allocation for the databasespec.shardCount
: Number of shards (affects performance and scalability)spec.replication
: Enable/disable database replication
Edit the values in the downloaded YAML file based on your requirements, such as increasing memory for larger datasets, adding more shards for better performance, enabling replication for high availability, or adding Redis modules.
Apply the configuration
To deploy these YAML files, follow Deploy on Kubernetes, which provides step-by-step instructions for creating namespaces, deploying the operator, and applying these configuration files.