Skip to content

Redis Cluster交付介绍

house edited this page Dec 19, 2022 · 7 revisions

CRD资源实例

kind: RedisCluster
metadata:
  name: redis-cluster-trump
  namespace: redis
spec:
  app: cluster-trump
  capacity: 32768
  dc: hz
  env: demo
  image: 10.58.11.90:55000/redis-cluster:0.2
  monitorimage: 10.58.11.90:55000/redis-exporter:1.0
  netmode: ClusterIP
  proxyimage: 10.58.11.90:55000/predixy:1.0
  proxysecret: "123"
  realname: demo
  secret: abc
  size: 3
  storageclass: ""
  vip: 172.17.128.8
app          关联应用,注意name目前需要要求等于redis-{app},如示例
capacity     容量,单位Mb
dc           机房
env          可选(demo,staging,prodction)
image        redis镜像
monitorimage exporter镜像
netmode      网络模式(ClusterIP、NodePort)
proxyimage   代理镜像
proxysecret  代理密码
realname     负责人
secret       redis密码
size         集群group数量
storageclass pvc
vip          无实际功能


资源访问以及展示

访问地址 实际地址 10.246.94.225 代理地址 10.246.183.54 注意两个地址均可以访问,但由于predixy并不完善,建议还是在生产环境使用实际访问,代理地址可以用于日常数据导入

# kubectl -n redis get pod
predixy-redis-cluster-trump-5bd48f6fd8-ftxm4   1/1     Running   0          3h59m
predixy-redis-cluster-trump-5bd48f6fd8-scmwn   1/1     Running   0          3h59m
redis-cluster-trump-0-0                        2/2     Running   0          3h59m
redis-cluster-trump-0-1                        2/2     Running   0          3h59m
redis-cluster-trump-1-0                        2/2     Running   0          3h59m
redis-cluster-trump-1-1                        2/2     Running   0          3h59m
redis-cluster-trump-2-0                        2/2     Running   0          3h59m
redis-cluster-trump-2-1                        2/2     Running   0          3h59m
# 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
redis-cluster-trump           ClusterIP   10.246.94.225   <none>        6379/TCP    4h1m

Clone this wiki locally