Skip to main content
Version: 3.0.0-alpha (Diátaxis)

Concepts — Redis

Architecture

Redis on Hikube is a managed service based on the Spotahome Redis Operator. Each instance deployed via the Redis resource creates a master-replica cluster with Redis Sentinel for automatic failover.


Terminology

TermDescription
RedisKubernetes resource (apps.cozystack.io/v1alpha1) representing a managed Redis cluster.
MasterPrimary instance that accepts reads and writes.
ReplicaRead-only instance, synchronized from the master.
SentinelMonitoring process that detects master failures and orchestrates automatic failover.
Spotahome Redis OperatorKubernetes operator that manages the deployment and lifecycle of Redis clusters.
authEnabledEnables password authentication (requirepass).
resourcesPresetPredefined resource profile (nano to 2xlarge).

High availability with Sentinel

Redis Sentinel ensures high availability by:

  1. Continuously monitoring the master and replicas
  2. Detecting master failure by consensus (quorum among Sentinels)
  3. Automatically promoting a replica to become the new master
  4. Reconfiguring the other replicas to follow the new master
tip

Configure replicas: 3 minimum to guarantee Sentinel quorum and enable automatic failover.


Persistence

Redis on Hikube supports persistent storage:

ParameterDescription
sizePersistent volume size (e.g., 10Gi)
storageClasslocal (performance) or replicated (high availability)

Redis data is written to disk via native Redis mechanisms (RDB/AOF), ensuring durability even in case of restart.

warning

For production, always use storageClass: replicated to protect data against node failure.


Authentication

Redis supports optional authentication:

  • authEnabled: true — a password is generated and stored in the Secret <instance>-credentials
  • authEnabled: false — passwordless access (avoid in production)

Resource presets

PresetCPUMemory
nano250m128Mi
micro500m256Mi
small1512Mi
medium11Gi
large22Gi
xlarge44Gi
2xlarge88Gi
warning

If the resources field (explicit CPU/memory) is set, resourcesPreset is ignored.


Limits and quotas

ParameterValue
Max replicasDepending on tenant quota
Storage size (size)Variable (in Gi)
Redis databasesSingle database (db 0 by default)

Further reading