To set up Redis replication with Helm, you would typically use the Bitnami Redis Helm chart. It supports master-slave mode out of the box. Here is a simple guide:
Install Helm: If not already installed, you need to install Helm first. It's a package manager for Kubernetes. You can download it from the official Helm GitHub Repository.
Add the Bitnami Chart repository to Helm:
In this command,
my-release is the name of the release (you can choose any name), the flag
--set password=secretpassword is used to set the Redis password to 'secretpassword', the flag
--set replication.enabled=true enables replication, and
--set replication.slaveCount=1 sets one Redis slave.
That's it! Helm will deploy Redis in master-slave mode on your Kubernetes cluster. The master will handle write operations, and the slave will be a read-only replica of the master.
Note: Always ensure your data is secure by choosing a strong, unique password when configuring your Redis instance.