ข้ามไปยังเนื้อหา

This is the Experimental version (Latest). It is under active development and may change. For the most reliable documentation, use the version selector in the top-right to switch to Stable, or click here to go to the Stable version's homepage.

Redis for Opstella Installation

อัพเดทล่าสุด:

เนื้อหานี้ยังไม่มีในภาษาของคุณ

🟢 Management

Redis is a Pub/Sub Service and In-Memory Cache for Opstella

  • 💿Persistence Storage Access for Redis for Opstella
    • On Kubernetes when requesting for a PVC, will request with Storage Class specified.
  1. Connect to 🟢 Management Kubernetes Cluster ; i.e w/ Kubeconfig File

  2. Prepare 🟢 Management Kubernetes Cluster Information

    Ensure K8S_INTERNAL_DOMAIN, K8S_STORAGECLASS_NAME are defined as per the Shell Variables guide.


  1. Set Redis Authentication Password

    Recommended to enabled authentication for Redis (You can optionally disable it). (Password loaded from redis.vars.sh)

  2. Create Redis manifest and secret

    You will be creating Kubernetes Secret named opstella-redis-credentials, RedisReplication CR named redis-opstella, and RedisSentinel CR named redis-sentinel-opstella

    Terminal window
    cat <<EOF > $BASE_WORKING_DIR/kubernetes-manifests/redis-opstella-platform-full.yaml
    apiVersion: v1
    kind: Secret
    metadata:
    name: opstella-redis-credentials
    namespace: opstella-system
    type: Opaque
    stringData:
    redis-password: "${OPSTELLA_REDIS_PASSWORD}"
    ---
    apiVersion: redis.redis.opstreelabs.in/v1beta2
    kind: RedisReplication
    metadata:
    name: redis-opstella
    namespace: opstella-system
    spec:
    clusterSize: 3
    # Pod-level security context
    podSecurityContext:
    fsGroup: 1000
    fsGroupChangePolicy: "OnRootMismatch"
    runAsUser: 1000
    runAsNonRoot: true
    seccompProfile:
    type: RuntimeDefault
    # Container-level security context
    securityContext:
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
    privileged: false
    allowPrivilegeEscalation: false
    capabilities:
    drop: ["ALL"]
    seccompProfile:
    type: RuntimeDefault
    kubernetesConfig:
    image: quay.io/opstree/redis:v7.4.7
    imagePullPolicy: IfNotPresent
    resources:
    requests:
    cpu: 100m
    memory: 128Mi
    limits:
    cpu: 250m
    memory: 512Mi
    redisSecret:
    name: opstella-redis-credentials
    key: redis-password
    storage:
    volumeClaimTemplate:
    spec:
    storageClassName: "${K8S_STORAGECLASS_NAME}"
    accessModes: ["ReadWriteOnce"]
    resources:
    requests:
    storage: 2Gi
    redisExporter:
    enabled: false
    image: quay.io/opstree/redis-exporter:v1.44.0
    resources:
    requests:
    cpu: 50m
    memory: 64Mi
    limits:
    cpu: 100m
    memory: 128Mi
    ---
    apiVersion: redis.redis.opstreelabs.in/v1beta2
    kind: RedisSentinel
    metadata:
    name: redis-sentinel-opstella
    namespace: opstella-system
    spec:
    clusterSize: 3
    # Pod-level security context
    podSecurityContext:
    fsGroup: 1000
    fsGroupChangePolicy: "OnRootMismatch"
    runAsUser: 1000
    runAsNonRoot: true
    seccompProfile:
    type: RuntimeDefault
    # Container-level security context
    securityContext:
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
    privileged: false
    allowPrivilegeEscalation: false
    capabilities:
    drop: ["ALL"]
    seccompProfile:
    type: RuntimeDefault
    redisSentinelConfig:
    redisReplicationName: redis-opstella
    redisReplicationPassword:
    secretKeyRef:
    name: opstella-redis-credentials
    key: redis-password
    masterGroupName: redis-opstella
    downAfterMilliseconds: "10000"
    failoverTimeout: "10000"
    kubernetesConfig:
    image: quay.io/opstree/redis-sentinel:v8.4.0
    imagePullPolicy: IfNotPresent
    resources:
    requests:
    cpu: 50m
    memory: 64Mi
    limits:
    cpu: 100m
    memory: 128Mi
    EOF
  1. Install Redis

    Terminal window
    kubectl apply -n opstella-system -f $BASE_WORKING_DIR/kubernetes-manifests/redis-opstella-platform-full.yaml
  1. Get Pod Status - Redis for Opstella

    Terminal window
    kubectl get pods -n opstella-system

    Redis for Opstella should be Running

    NAME READY STATUS RESTARTS AGE
    ... (deducted)
    redis-opstella-0 1/1 Running 0 XdXh
    redis-opstella-1 1/1 Running 0 XdXh
    redis-opstella-2 1/1 Running 0 XdXh
    redis-sentinel-opstella-0 1/1 Running 0 XdXh
    redis-sentinel-opstella-1 1/1 Running 0 XdXh
    redis-sentinel-opstella-2 1/1 Running 0 XdXh

Finished?

Use the below navigation to proceed