RedisClusterSpec defines the desired state of a Redis replication cluster. This page documents all available fields with their types, validation rules, and default values.
Core Fields
Total number of Redis pods (1 primary + N-1 replicas).Validation: Minimum value is 1.Example:
Redis operating mode.Allowed values:
standalone- Standard replication (1 primary, N replicas)sentinel- Automatic failover via Redis Sentinelcluster- Reserved for future use (currently rejected by webhook)
Redis container image. Compatible with Redis 7.2+ and Valkey 7.x/8.x.Example:
Redis Configuration
Key-value pairs for
redis.conf parameters. Applied via CONFIG SET on live instances.Common parameters:maxmemory- Maximum memory (e.g.,2gb)maxmemory-policy- Eviction policy (e.g.,allkeys-lru)save- RDB persistence (e.g.,900 1 300 10)appendonly- Enable AOF (e.g.,yes)
Resource Management
CPU and memory requests/limits for Redis containers.Example:
Replication Settings
Minimum number of synchronous replicas. Controls
min-replicas-to-write.Validation: Minimum value is 0.Example:Maximum number of synchronous replicas. Controls
min-replicas-max-lag.Validation: Minimum value is 0.Example:Update Strategy
Controls whether primary replacement runs automatically or waits for approval during rolling updates.Allowed values:Example:
unsupervised- Primary is automatically replaced after replicas are updatedsupervised- Primary waits for manual approval via annotation
supervised, the operator sets the PrimaryUpdateWaiting condition to True and waits for the user to add the annotation:High Availability
Controls whether a PodDisruptionBudget is created. The PDB ensures at least
(instances - 1) replicas remain during voluntary disruptions.Example:Runtime split-brain prevention for primary pods. See details below.Example:
Secret References
All secret fields useLocalObjectReference with a single name field. Secrets must exist in the same namespace as the RedisCluster. See Secret Management for details.
References a Secret containing the Redis password in key
password.If not set, the operator auto-generates a secret named <cluster-name>-auth.Example:References a Secret containing ACL rules in key Secret contents:
acl.Example:References a Secret containing
tls.crt and tls.key for TLS encryption.Example:References a Secret containing
ca.crt for TLS client certificate verification.Example:References a Secret containing object storage credentials for backups.Required keys depend on the backup destination:
- S3:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - GCS:
GOOGLE_APPLICATION_CREDENTIALS(JSON key)
Scheduling
See Scheduling Configuration for detailed examples.Constrains pods to nodes with matching labels.Example:
Pod affinity/anti-affinity scheduling rules.Example:
Allow scheduling onto tainted nodes.Example:
Control how pods are spread across topology domains.Example:
Bootstrap and Disaster Recovery
Defines how to initialize the cluster from a backup. Only applied during initial cluster creation.Example:
Configures full-cluster external replication for disaster recovery. See Replica Mode for details.Example:
Maintenance
Controls planned node maintenance behavior.Example: