Operations
Backup And Restores
Custom Secret
Monitoring
tpl
Operations
Backup And Restores
Custom Secret
Monitoring
tpl
A standalone Redis deployment consists of a single Redis server instance running independently without any replication or clustering. It is the simplest and most lightweight deployment model.
Use Cases
Before proceeding, ensure the following:
kubectl create ns demo
namespace/demo created
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: redis-standalone
namespace: demo
spec:
terminationPolicy: Delete
clusterDef: redis # set to reids
topology: standalone # set topology to standalone
componentSpecs:
- name: redis
replicas: 1 # set replica to 1
serviceVersion: 7.2.4
resources:
limits:
cpu: "0.5"
memory: "0.5Gi"
requests:
cpu: "0.5"
memory: "0.5Gi"
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
Key Configuration Details:
clusterDef: redis
: Specifies the ClusterDefinition CR for the cluster.topology: standalone
: Configures the cluster to use standalone topology.componentSpecs
: Defines the components in the cluster:
serviceVersion: 7.2.4
: Specifies the version of the Redis service to be deployed.Once the cluster is deployed, check its status:
kubectl get cluster redis-standalone -n demo -w
Expected Output:
NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE
redis-standalone redis Delete Running 34s
kubectl get component redis-standalone-redis -n demo
Expected Output:
NAME DEFINITION SERVICE-VERSION STATUS AGE
redis-standalone-redis redis-7-1.0.0 7.2.4 Running 90s
To remove all resources created during this tutorial:
kubectl delete cluster redis-standalone -n demo
kubectl delete ns demo