Standalone
Architecture
Redis standalone is a single process-based redis pod that can manage your keys inside it. Multiple applications can consume this redis with a Kubernetes endpoint or service. Since this standalone setup is running inside Kubernetes, the auto-heal feature will be automatically part of it. The only drawback of a standalone setup is that it doesn’t stand on the high availability principle.
Helm Installation
In redis standalone mode, we deploy redis as a single StatefulSet pod that means ease of setup but no complexity, no high availability, and no resilience.
Installation can be easily done via helm
command:
$ helm install redis ot-helm/redis --namespace ot-operators
...
Release "redis" does not exist. Installing it now.
NAME: redis
LAST DEPLOYED: Sun May 2 15:59:48 2021
NAMESPACE: ot-operators
STATUS: deployed
REVISION: 1
TEST SUITE: None
Verify the standalone redis setup by kubectl command line.
$ kubectl get pods -n ot-operators
...
NAME READY STATUS RESTARTS AGE
redis-0 1/1 Running 0 56s
YAML Installation
Examples folder has different types of manifests for different scenarios and features. There are these YAML examples present in this directory:
- additional_config
- advance_config
- affinity
- disruption_budget
- external_service
- password_protected
- private_registry
- probes
- redis_monitoring
- tls_enabled
- upgrade_strategy
A basic sample manifest for standalone redis:
---
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: Redis
metadata:
name: redis-standalone
spec:
kubernetesConfig:
image: quay.io/opstree/redis:v7.0.15
imagePullPolicy: IfNotPresent
storage:
volumeClaimTemplate:
spec:
# storageClassName: standard
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
securityContext:
runAsUser: 1000
fsGroup: 1000
The yaml manifest can easily get applied by using kubectl
.
$ kubectl apply -f standalone.yaml