Install highly available Redis¶
Add the Bitnami repository to Helm:
helm repo add bitnami https://charts.bitnami.com/bitnami
Create a custom values file named
redis-values.yaml
and add the following configuration:master: persistence: enabled: true size: 8Gi storageClass: "<nameofstorageclass>" resources: requests: memory: 256Mi cpu: 100m limits: memory: 512Mi cpu: 200m replica: replicaCount: 3 persistence: enabled: true size: 8Gi storageClass: "<nameofstorageclass>" resources: requests: memory: 256Mi cpu: 100m limits: memory: 512Mi cpu: 200m
Install Redis with Helm:
helm install redis bitnami/redis -f redis-values.yaml
Save the Redis password as an environment variable:
export REDIS_PASSWORD=$(kubectl get secret --namespace default redis -o jsonpath="{.data.redis-password}" | base64 -d) echo $REDIS_PASSWORD
Get the Redis service name and IP address:
kubectl get service
Example output:
redis-master ClusterIP 10.96.84.98 <none> 6379/TCP