A golang based redis operator that will make/oversee Redis standalone/cluster/replication/sentinel mode setup on top of the Kubernetes.
Go to file
yangw 9280c02f22
fix: improve kubeClientQPS type consistency in operator chart (#1485)
* fix: improve kubeClientQPS type consistency in operator chart

  - Use explicit float comparison (0.0) in deployment template
  - Update values.yaml kubeClientQPS default from 0 to 0.0 for type consistency
  - Ensures proper float64 type handling in Helm template condition

Signed-off-by: yangw <wuyangmuc@gmail.com>

* update docs

Signed-off-by: yangw <wuyangmuc@gmail.com>

* remove condition

Signed-off-by: yangw <wuyangmuc@gmail.com>

* update test config

Signed-off-by: yangw <wuyangmuc@gmail.com>

* fix lint

Signed-off-by: yangw <wuyangmuc@gmail.com>

---------

Signed-off-by: yangw <wuyangmuc@gmail.com>
2025-08-29 16:46:57 +08:00
.github fix: improve kubeClientQPS type consistency in operator chart (#1485) 2025-08-29 16:46:57 +08:00
api docs: Rename Size to ClusterSize in RedisClusterSpec and update related comments (#1475) 2025-08-07 19:43:43 +08:00
charts fix: improve kubeClientQPS type consistency in operator chart (#1485) 2025-08-29 16:46:57 +08:00
cmd refactor: reorganiz manager agent cmd package (#1383) 2025-06-01 08:17:52 +08:00
config docs: Rename Size to ClusterSize in RedisClusterSpec and update related comments (#1475) 2025-08-07 19:43:43 +08:00
dashboards docs: Add controller metrics guide and Grafana dashboard for Redis Operator (#1438) 2025-07-07 22:04:30 +08:00
docs docs: Rename Size to ClusterSize in RedisClusterSpec and update related comments (#1475) 2025-08-07 19:43:43 +08:00
example/v1beta2 feat: Add PersistentVolumeClaimRetentionPolicy support (#1448) 2025-07-24 18:04:47 +08:00
hack fix: missing generate common types in api reference (#1460) 2025-07-27 21:15:42 +08:00
internal fix: do not remove default config volume when providing additional config (#1480) 2025-08-21 21:15:30 +08:00
mocks chore(deps): bump golangci/golangci-lint-action from 6 to 8 (#1311) 2025-07-18 17:04:25 +08:00
scripts [Fix] : Fix the backup and restore script and manifest (#624) 2023-09-15 15:16:12 +05:30
static Revamped documentation for better knowledge base (#370) 2022-11-03 01:35:38 +05:30
tests fix: improve kubeClientQPS type consistency in operator chart (#1485) 2025-08-29 16:46:57 +08:00
.dockerignore [Development][Update] Updated operator version and fixed alot of issues (#26) 2020-12-31 23:41:14 +05:30
.gitignore refactor: introduce common constants and finalizer utilities for Redis controllers (#1428) 2025-07-03 11:46:48 +08:00
.golangci.yml chore(deps): bump golangci/golangci-lint-action from 6 to 8 (#1311) 2025-07-18 17:04:25 +08:00
.travis.yml fix: update references from master to main in docs and workflow files (#1288) 2025-03-19 16:02:09 +05:30
.yamllint.yml fix: tls connection broken in replication with sentinel (#1472) 2025-08-06 11:40:18 +08:00
CHANGELOG.md docs: Update CHANGELOG.md with latest information (#1454) 2025-07-25 16:00:11 +08:00
CODEOWNERS Update CODEOWNERS 2024-10-29 11:04:59 +08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2022-11-10 17:03:02 +05:30
CONTRIBUTING.md fix: update references from master to main in docs and workflow files (#1288) 2025-03-19 16:02:09 +05:30
Dockerfile chore: migrate kubebuilder go.kubebuilder.io/v3 to go.kubebuilder.io/v4 (#1340) 2025-05-03 13:23:50 +05:30
LICENSE Updated LICENSE today 2024-12-10 18:55:01 +05:30
Makefile feat: Add API doc generation tools and update Makefile (#1459) 2025-07-27 20:23:42 +08:00
PROJECT refactor: reorganize API structure and update paths (#1363) 2025-05-19 17:53:37 +08:00
README.md feat: Add SecurityContext to init-config when behind GenerateConfigInInitContainer feature flag 2025-08-14 16:35:10 +08:00
ROADMAP.md Create ROADMAP.md 2025-03-18 15:44:36 +05:30
SECURITY.md [Development][Update]Updated information for v0.13.0 (#374) 2022-11-10 18:04:17 +05:30
USED_BY_ORGANIZATIONS.md Added markdown file for organization logo 2022-09-28 18:05:48 +05:30
ct.yaml fix: update references from master to main in docs and workflow files (#1288) 2025-03-19 16:02:09 +05:30
go.mod feat: Add kubeClientQPS and kubeClientTimeout configuration options (#1473) 2025-08-06 22:25:09 +08:00
go.sum feat: Add kubeClientQPS and kubeClientTimeout configuration options (#1473) 2025-08-06 22:25:09 +08:00

README.md

CI Pipeline GoReportCard GitHub go.mod Go version (subdirectory of monorepo) made-with-Go Docker License

A Golang-based Redis operator that will make/oversee Redis standalone and cluster mode setup on top of Kubernetes. It can create a Redis cluster setup with best practices on Cloud as well as the bare metal environment. Also, it provides an in-built monitoring capability using redis-exporter.

For documentation, please refer to https://redis-operator.opstree.dev/

Organizations that are using Redis Operator to manage their Redis workload can be found here. If your organization is also using Redis Operator, please feel free to add by creating a pull request

This operator only supports versions of Redis >=6.

Architecture

Purpose

There are multiple problems that people face while setting up Redis setup on Kubernetes, especially cluster type setup. The purpose of creating this operator is to provide an easy and production-ready interface for Redis setup that includes best-practices, security controls, monitoring, and management.

Supported Features

Here are the features which are supported by this operator:

  • Redis cluster and standalone mode setup
  • Redis cluster failover and recovery
  • Inbuilt monitoring with redis exporter
  • Password and password-less setup of Redis
  • TLS support for additional security layer
  • IPv4 and IPv6 support for Redis setup
  • Detailed monitoring Grafana dashboard

Prerequisites

Redis Operator requires a Kubernetes cluster of version >=1.18.0. If you have just started with Operators, it's highly recommended using the latest version of Kubernetes.

Image Compatibility

The following table shows the compatibility between the Operator Version, Redis Image, Sentinel Image, and Exporter Image:

Operator Version Redis Image Sentinel Image Exporter Image
v0.19.x > v7.0.12, >=v6.2.14 > v7.0.12, >= v6.2.14 v1.44.0
v0.18.x v7.0.12 v7.0.12 v1.44.0
v0.17.0 v7.0.12 v7.0.12 v1.44.0
v0.16.0 v7.0.12 v7.0.12 v1.44.0
v0.15.1 v7.0.12 v7.0.12 v1.44.0
v0.15.0 v7.0.11 v7.0.11 v1.44.0
v0.14.0 v7.0.7 v7.0.7 v1.44.0
v0.13.0 v6.2.5 nil v1.44.0

Quickstart

The setup can be done by using Helm. If you want to see more examples, please go through the example folder.

But you can simply use the Helm chart for installation.

# Add the Helm chart
$ helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/
# Deploy the Redis operator
$ helm upgrade redis-operator ot-helm/redis-operator \
  --install --create-namespace --namespace ot-operators

After deployment, verify the installation of the operator

helm test redis-operator --namespace ot-operators

Creating Redis cluster, standalone, replication and sentinel setup.

# Create Redis cluster setup
$ helm upgrade redis-cluster ot-helm/redis-cluster \
  --set redisCluster.clusterSize=3 --install \
  --namespace ot-operators
# Create Redis standalone setup
$ helm upgrade redis ot-helm/redis \
  --install --namespace ot-operators
# Create Redis replication setup
$ helm upgrade redis-replication ot-helm/replication \
  --install --namespace ot-operators
# Create Redis sentinel setup
$ helm upgrade redis-sentinel ot-helm/sentinel \
  --install --namespace ot-operators

If you want to customize the values file by yourself while initializing the Helm command, the values files for reference are present here.

Monitoring with Prometheus

To monitor Redis performance we will be using Prometheus. In any case, extra Prometheus configuration will not be required because we will be using the Prometheus service discovery pattern. For that we already have set these annotations:

  annotations:
    redis.opstreelabs.in: "true"
    prometheus.io/scrape: "true"
    prometheus.io/port: "9121"

Contribution

Please see our CONTRIBUTING.md for details.

Release History

Please see our CHANGELOG.md for details.

Contact Information

This project is managed by OpsTree Solutions. For any queries or suggestions, you can reach out to us at opensource@opstree.com.

Join our Slack Channel: #redis-operator.