Skip to content

Redis Standby Configuration Example

house edited this page Dec 19, 2022 · 3 revisions

CRD Resource Instance

kind: RedisStandby
metadata:
  name: redis-standby-tom
  namespace: redis
spec:
  app: standby-tom
  capacity: 2048
  dc: hz
  env: demo
  image: tongduncloud/redis-standby:1.0
  monitorimage: tongduncloud/redis-exporter:1.0
  netmode: ClusterIP
  realname: sa
  secret: "123"
  sentinelimage: tongduncloud/sentinel-standby:0.8
  storageclass: ""
  vip: 172.17.128.8

Parameter Description

app           Associated application
capacity      Capacity, unit Mb
dc            Data Center
env           Optional(demo,production)
image         Redis image
monitorimage  Exporter image
netmode       Network mode, Optional(ClusterIP、NodePort)
realname      Admin user name
secret        secret
sentinelimage sentinel image
storageclass  Kubernetes PVC
vip           External network access address, Reserved function

Resource Access and Display

Resource address 10.246.183.54

Note that it is reasonable for one of the nodes to be in a notReady state, see the principle for details.

# kubectl -n redis get pod
redis-standby-tom-0                            2/2     Running   0          3h53m
redis-standby-tom-1                            1/2     Running   0          3h53m
sentinel-standby-tom-0                         1/1     Running   0          3h53m
sentinel-standby-tom-1                         1/1     Running   0          3h53m
sentinel-standby-tom-2                         1/1     Running   0          3h53m
# kubectl -n redis get svc
NAME                          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE
predixy-redis-cluster-trump   ClusterIP   10.246.183.54   <none>        6379/TCP    4h

Clone this wiki locally