Overview
Each Redis data pod runs an instance manager process that exposes an HTTP API on port8080. The operator communicates with instance managers via pod IP directly (never through Services) for precise targeting.
Base URL: http://<pod-ip>:8080
Authentication: None (internal cluster communication)
Health Endpoints
GET /healthz
Liveness probe endpoint with runtime primary isolation detection. Response:200 OK- Process is alive and healthy503 Service Unavailable- Process not running or primary is isolated
spec.primaryIsolation.enabled=true:
- Check if redis-server process is running
- Query Redis
INFO replicationto confirm role ismaster - Attempt to reach Kubernetes API server (timeout:
spec.primaryIsolation.apiServerTimeout) - If API unreachable, attempt to reach at least one peer instance manager (timeout:
spec.primaryIsolation.peerTimeout) - Return
503if both API and all peers are unreachable (primary is isolated)
GET /readyz
Readiness probe endpoint. Response:200 OK- Redis responds to PING503 Service Unavailable- Redis not ready
Replication Endpoints
GET /v1/status
Returns current replication status for the operator’s status collection. Method:GET
Response Schema:
master or slave from Redis INFO replicationCurrent replication offset (
master_repl_offset for primary, slave_repl_offset for replica)Number of connected replicas (primary only, otherwise
0)up or down (replicas only, omitted for primary)Always
true (if endpoint responds)POST /v1/promote
Promotes a replica to primary by issuingREPLICAOF NO ONE.
Method: POST
Request Body: None
Response:
200 OK- Promotion succeeded500 Internal Server Error- Promotion failed
POST /v1/demote
Demotes an instance to replica by issuingREPLICAOF <primaryIP> <port>.
Method: POST
Query Parameters:
IP address of the primary instance
Port of the primary instance
200 OK- Demotion succeeded400 Bad Request- Missing or invalid parameters500 Internal Server Error- Demotion failed
Backup Endpoint
POST /v1/backup
Executes a backup and uploads to object storage. Method:POST
Request Schema:
Name of the RedisBackup resource (used for object key generation)
Backup methodEnum values:
rdb- BGSAVEaof- BGREWRITEAOF
Object storage destination
Format of uploaded artifactValues:
rdb- RDB fileaof-archive- AOF directory as.tar.gz
Full S3 URI of uploaded backupExample:
s3://my-bucket/backups/my-backup.rdbObject key within bucketExample:
backups/my-backup.rdbSize of uploaded artifact in bytes
SHA256 checksum of uploaded artifact
RDB Method
- Issue
BGSAVEto Redis - Poll
INFO persistenceevery 250ms untilrdb_bgsave_in_progress=0 - Verify
rdb_last_bgsave_status=ok - Read
/data/dump.rdb - Upload to S3 with computed SHA256
- Return response
AOF Method
- Issue
BGREWRITEAOFto Redis - Poll
INFO persistenceevery 250ms untilaof_rewrite_in_progress=0 - Verify
aof_last_bgrewrite_status=ok - Create
.tar.gzarchive of/data/appendonlydir/ - Upload to S3 with computed SHA256
- Delete temporary archive file
- Return response
/backup-credentials mount (see RedisBackup credentials)
Metrics Endpoint
GET /metrics
Prometheus metrics endpoint exposing Redis metrics scraped fromINFO command.
Method: GET
Response Format: Prometheus text format
Example:
cluster- RedisCluster namenamespace- Kubernetes namespacepod- Pod name
Sentinel Endpoints
Sentinel pods expose a minimal HTTP API:GET /healthz- Process liveness (checks redis-sentinel process)GET /readyz- Redis Sentinel PING check
/v1/* or /metrics endpoints.