By default, this set of scripts will set up a fully functioning Redis Active-Active database distributed over 2 Redis clusters running on seperate vanilla/community k8s clusters deployed in kind (Kubernetes in Docker).
A single Linux - Debian 12 or Ubuntu 24 - x86 host with enough resources (see at the bottom for validated configurations). Some tools and OS tuning is required. Run the prereqs/install-fresh script and Reboot.
- Run the create-all.sh script.
- Wait 5-10 mins depending on the hardware.
Run the delete-all.sh script.
Basics:
- A configurable number (default = 2) k8s clusters in Kind
- Deploy Redis Enterprise (operator) in all clusters.
- Create Redis clusters in all k8s clusters.
- Create a Redis database (geo-replicated CRDB in case of Active/Active).
Optional:
- Deploy the Redis Enterprise admission controller.
- Rack zone aware deployment.
- a loadbalancer (metallb) to let the clusters talk to each other through a "public" endpoint (in the Docker kind network).
- an ingress controller (ingress-nginx / haproxy-ingress) to facilitate Redis Operator created Ingress resources.
- patch k8s DNS (coredns) to resolve the (remote) cluster api and database.
- monitoring through Prometheus + Grafana and preconfigured Redis dashboards.
- There are multiple haproxy ingresses. One from HAProxy Inc. and one from jcmoraisjr. This is tested with the latter one.
- There are multiple nginx ingresses. So far this is tested with the kubernetes 'ingress-nginx'.
- There are more Ingresses that work, such as the Nginx Inc. (F5) Ingress Nginx Controller and Contour. However, they require (manual) creation of CRDs for SSL/TLS passthrough if regular Ingress Kubernetes resources are not supporting passthrough. E.g. TransportServer for Nginx Inc. or HTTPProxy for Contour.
- DNS patching is hardwired to api and a named 'db1' database.
- This is a scripted deployment, so not all steps are idempotent. If you change the config, you may need to tear down and recreate to get consistent again.
The minimum proper setup with 2 participating Redis clusters (3 k8s worker nodes each) requires 16GB of RAM, a 30GB OS disk, and >4 physical CPU cores.
Some tested configs that work:
- physical i5-9600K (6 cores @ 4.5 GHz)
- GCP n2-standard-8 (8 vCPU - 4 cores @ 2.1-2.8 GHz)
- AWS t3.2xlarge (8 vCPU @ 2.5 GHz)
What won't work:
- GCP n2-standard-4 (4 vCPU - 2 cores @ 2.1-2.8 GHz)
- GCP c2-standard-4 (4 vCPU - 2 cores @ 3.1 GHz)
- AWS t3.xlarge (4 vCPU @ 2.5 GHz)