Deploying Redis Cluster
This section provides instructions for deploying a Redis Cluster and Redis Commander on OpenShift using Devtron.
Procedure
-
In the Devtron Chart Store, select the latest version of the
redis-clusterchart. - Configure the chart and select the option to deploy it.
-
Remove the default YAML content in the configuration section. Add the
following values, replacing passwords, host names, service-account names, and
route hosts with values for your environment, and deploy the chart.
global: imageRegistry: "" imagePullSecrets: [] storageClass: "" compatibility: openshift: adaptSecurityContext: auto extraDeploy: - apiVersion: apps/v1 kind: Deployment metadata: name: redis-commander spec: replicas: 1 selector: matchLabels: app: redis-commander template: metadata: labels: app: redis-commander spec: containers: - name: redis-commander image: rediscommander/redis-commander:latest env: - name: REDIS_HOSTS value: "cluster:<redis-cluster-service>:6379:0:<redis-password>" - name: IS_CLUSTER value: "true" ports: - containerPort: 8081 - apiVersion: v1 kind: Service metadata: name: redis-commander-svc spec: type: ClusterIP ports: - port: 80 targetPort: 8081 selector: app: redis-commander - apiVersion: route.openshift.io/v1 kind: Route metadata: name: redis-ui-route spec: host: <redis-route-host> to: kind: Service name: redis-commander-svc port: targetPort: 8081 tls: termination: edge insecureEdgeTerminationPolicy: Redirect image: registry: docker.io repository: bitnamilegacy/redis-cluster tag: 8.2.1-debian-12-r0 volumePermissions: enabled: false podSecurityContext: enabled: true fsGroup: null containerSecurityContext: enabled: true runAsUser: null runAsNonRoot: true readOnlyRootFilesystem: false allowPrivilegeEscalation: false capabilities: drop: ["ALL"] serviceAccount: create: false name: <service-account-name> usePassword: true password: "<redis-password>" cluster: init: true nodes: 6 replicas: 1 externalAccess: enabled: false persistence: enabled: true size: 8Gi redis: useAOFPersistence: "yes" resourcesPreset: "medium" readinessProbe: enabled: true initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 15 successThreshold: 1 extraEnvVars: - name: REDIS_CLUSTER_DYNAMIC_IPS value: "yes" - name: REDIS_DNS_RETRIES value: "120" - name: REDIS_CLUSTER_ANNOUNCE_IP valueFrom: fieldRef: fieldPath: status.podIP -
Validate the deployment by checking the Redis and Redis Commander pods and
services.
oc get pods -n cdp-dev-app oc get svc -n cdp-dev-app oc get route redis-ui-route -n cdp-dev-app