Skip to content

Redis Operator by Opstree Installation

This content is not available in your language yet.

Redis Operator by OpsTree is a Redis operator that will make/oversee Redis standalone and cluster mode setup on top of Kubernetes.

  1. Connect to 🟢 Management Kubernetes Cluster ; _i.e w/ Kubeconfig File.

    Set Kubeconfig File

    Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.

    Terminal window
    source $HOME/opstella-installation/shell-values/kubernetes/management_cluster.vars.sh
    Terminal window
    export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/management_cluster.yaml"
  2. Create Namespace for Redis Operator Controller

    2.1 Create Kubernetes Namespace

    Terminal window
    kubectl create namespace ot-operators
  3. Add Operator Helm Repository

    Terminal window
    helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/
  4. Create Helm Values Configurations for Operator

    Terminal window
    cat <<EOF > $HOME/opstella-installation/helm-values/ot-redis-full-values.yaml
    ---
    redisOperator:
    # If set to true, webhook server will be enabled for masterSlaveAntiAffinity feature
    # When enabled, you need to either:
    # 1. Enable cert-manager (certmanager.enabled=true) for automatic certificate management, or
    # 2. Manually create a certificate secret (see "How to generate private key" section in README)
    webhook: true
    issuer:
    # Whether to create the issuer or not. You might want to disable this if instead you
    # want to use a ClusterIssuer that you simply want to provide.
    create: true
    # You can choose Issuer or ClusterIssuer here. The first one is namespaced, the second one
    # is available for global usage.
    kind: Issuer
    type: selfSigned
    name: redis-operator-issuer
    email: ""
    server: ""
    privateKeySecretName: ""
    solver:
    enabled: false
    certmanager:
    # Whether to use cert-manager for certificate management
    # Only effective when webhook=true
    # If webhook=true and certmanager.enabled=false, you need to manually create certificate secret
    enabled: true
    podSecurityContext:
    fsGroup: 1000
    securityContext:
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
    privileged: false
    allowPrivilegeEscalation: false
    seccompProfile:
    type: RuntimeDefault
    capabilities:
    drop: ["ALL"]
    # Feature gates for alpha/experimental features
    featureGates:
    # Enable generating Redis configuration using an init container instead of a regular container
    GenerateConfigInInitContainer: true
    EOF
  5. Install Redis Operator

    Terminal window
    helm install redis-operator ot-helm/redis-operator --namespace ot-operators \
    -f $HOME/opstella-installation/helm-values/ot-redis-full-values.yaml
  1. Get Pod Status - Redis Operator

    Terminal window
    kubectl get pods -n ot-operators

    Redis Operator should be Running

    NAME READY STATUS RESTARTS AGE
    ... (deducted)
    redis-operator-XXXXXXX-YYYYY 1/1 Running 0 XdXh

Finished?

Use the below navigation to proceed