Redis for Opstella Installation
🟢 Management
Redis is a Pub/Sub Service and In-Memory Cache for Opstella
Prerequisites
Section titled “Prerequisites”- 💿Persistence Storage Access for Redis for Opstella
- On Kubernetes when requesting for a PVC, will request with Storage Class specified.
Preparation
Section titled “Preparation”Kubernetes Cluster Preparation
Section titled “Kubernetes Cluster Preparation”-
Connect to
🟢 ManagementKubernetes Cluster ; i.e w/ Kubeconfig File -
Prepare
🟢 ManagementKubernetes Cluster InformationEnsure
K8S_INTERNAL_DOMAIN,K8S_STORAGECLASS_NAMEare defined as per the Shell Variables guide.
Redis Preparation
Section titled “Redis Preparation”-
Set Redis Authentication Password
Recommended to enabled authentication for Redis (You can optionally disable it)
export REDIS_PASSWORD="CHANGEME" -
Create Redis manifest and secret
You will be creating Kubernetes Secret named
opstella-redis-credentials, RedisReplication CR namedredis-opstella, and RedisSentinel CR namedredis-sentinel-opstellaTerminal window cat <<EOF > $HOME/opstella-installation/kubernetes-manifests/redis-opstella-platform-full.yamlapiVersion: v1kind: Secretmetadata:name: opstella-redis-credentialsnamespace: opstella-systemtype: OpaquestringData:redis-password: "${REDIS_PASSWORD}"---apiVersion: redis.redis.opstreelabs.in/v1beta2kind: RedisReplicationmetadata:name: redis-opstellanamespace: opstella-systemspec:clusterSize: 3podSecurityContext:runAsUser: 1000fsGroup: 1000kubernetesConfig:image: quay.io/opstree/redis:v7.4.7imagePullPolicy: IfNotPresentresources:requests:cpu: 100mmemory: 128Milimits:cpu: 250mmemory: 512MiredisSecret:name: opstella-redis-credentialskey: redis-passwordstorage:volumeClaimTemplate:spec:storageClassName: "${K8S_STORAGECLASS_NAME}"accessModes: ["ReadWriteOnce"]resources:requests:storage: 2GiredisExporter:enabled: falseimage: quay.io/opstree/redis-exporter:v1.44.0resources:requests:cpu: 50mmemory: 64Milimits:cpu: 100mmemory: 128Mi---apiVersion: redis.redis.opstreelabs.in/v1beta2kind: RedisSentinelmetadata:name: redis-sentinel-opstellanamespace: opstella-systemspec:clusterSize: 3podSecurityContext:runAsUser: 1000fsGroup: 1000redisSentinelConfig:redisReplicationName: redis-opstellaredisReplicationPassword:secretKeyRef:name: opstella-redis-credentialskey: redis-passwordmasterGroupName: redis-opstelladownAfterMilliseconds: "10000"failoverTimeout: "10000"kubernetesConfig:image: quay.io/opstree/redis-sentinel:v8.4.0imagePullPolicy: IfNotPresentresources:requests:cpu: 50mmemory: 64Milimits:cpu: 100mmemory: 128MiEOF
Installation
Section titled “Installation”-
Install Redis
Terminal window kubectl apply -n opstella-system -f $HOME/opstella-installation/kubernetes-manifests/redis-opstella-platform-full.yaml
Post-Installation
Section titled “Post-Installation”Redis for Opstella Testing
Section titled “Redis for Opstella Testing”-
Get Pod Status - Redis for Opstella
Terminal window kubectl get pods -n opstella-systemRedis for Opstella should be
RunningNAME READY STATUS RESTARTS AGE... (deducted)redis-opstella-0 1/1 Running 0 XdXhredis-opstella-1 1/1 Running 0 XdXhredis-opstella-2 1/1 Running 0 XdXhredis-sentinel-opstella-0 1/1 Running 0 XdXhredis-sentinel-opstella-1 1/1 Running 0 XdXhredis-sentinel-opstella-2 1/1 Running 0 XdXh
Finished?
Use the below navigation to proceed