Skip to content

Installing Redis

This section explains the steps to install Redis using the Bitnami Redis Helm chart (version 18.0.2) in Kubernetes. Helm simplifies the deployment by managing configurations. The chart sets up a scalable Redis instance with optimal settings for storage, resources and security.

To install Redis, follow the steps:

  1. Fetch the Redis Helm chart version 18.0.2 by running the following command:

    helm fetch bitnami/redis --version 18.0.2
    
  2. Update the following parameters in the values.yaml file.

    Name Description Value
    global.storageClass Global StorageClass for Persistent Volume(s) "longhorn-ssd"
    global.redis.password Global Redis® password (overrides auth.password) "123456"
    master.resources.limits The resources limits for the Redis® master containers {"cpu": "2", "memory": "12Gi"}
    master.resources.requests The requested resources for the Redis® master containers {"cpu": "100m", "memory": "6Gi"}
    master.affinity Affinity for Redis® master pods assignment {"nodeAffinity": {"requiredDuringSchedulingIgnoredDuringExecution": {"nodeSelectorTerms": [{"matchExpressions": [{"key": "iaas", "operator": "In", "values": ["true"]}]}]}}}
    master.tolerations Tolerations for Redis® master pods assignment [{"effect": "NoSchedule", "key": "domain", "operator": "Equal", "value": "iaas"}]
    master.persistence.size Persistent Volume size 200Gi
    master.service.type Redis® master service type NodePort
    master.service.nodePorts.redis Node port for Redis® master "30004"
    replica.resources.limits The resources limits for the Redis® replicas containers {"cpu": "2", "memory": "15Gi"}
    replica.resources.requests The requested resources for the Redis® replicas containers {"cpu": "250m", "memory": "6Gi"}
    replica.affinity Affinity for Redis® replicas pods assignment {"nodeAffinity": {"requiredDuringSchedulingIgnoredDuringExecution": {"nodeSelectorTerms": [{"matchExpressions": [{"key": "iaas", "operator": "In", "values": ["true"]}]}]}}}
    replica.tolerations Tolerations for Redis® replicas pods assignment [{"effect": "NoSchedule", "key": "domain", "operator": "Equal", "value": "iaas"}]
    replica.persistence.size Persistent Volume size 200Gi
    metrics.enabled Start a sidecar Prometheus exporter to expose Redis® metrics true
    metrics.serviceMonitor.enabled Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator true
    metrics.serviceMonitor.namespace The namespace in which the ServiceMonitor will be created "monitoring"
    sysctl.enabled Enable init container to modify Kernel settings true
    sysctl.command Override default init-sysctl container command (useful when using custom images) ['sysctl', '-w', 'net.core.somaxconn=551']
  3. Install Redis using Helm by running the following command:

    helm -n mdsp-bk-redis install redis ./
    

Reference

For more information, refer to the official Redis Helm chart: Bitnami Redis 18.0.2.


Last update: January 31, 2025