GithubHelp home page GithubHelp logo

tongdun / td-redis-operator Goto Github PK

View Code? Open in Web Editor NEW
503.0 29.0 89.0 7.49 MB

一款强大的云原生redis-operator,经过大规模生产级运行考验,支持分布式集群、支持主备切换等缓存集群解决方案…The powerful cloud-native redis-operator, which has passed the test of large-scale production-level operation, supports distributed clusters and active/standby switching ...

License: Apache License 2.0

Makefile 1.02% Dockerfile 0.78% Go 68.46% Shell 2.81% JavaScript 25.18% Less 1.74%
redis k8s kubernetes kubernetes-operator operator redis-cluster redis-sentinel redis-operator docker ops

td-redis-operator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

td-redis-operator's Issues

(异常场景测试)redis集群写入数据后,重启redis pod后,新pod依旧有槽位信息,operator就会判断pod一直在集群中,无法加入redis 集群

测试步骤:
1、创建redis集群;
2、向redis集群写入一些数据;
3、重启部分pod,新重启的pod里,会被判定为有槽位信息(podInCluster函数),那么这些pod就不会被加入集群;

重启pod的redis相关日志如下:

1:M 25 Jul 2023 02:28:25.269 * DB loaded from disk: 0.000 seconds
1:M 25 Jul 2023 02:28:25.269 # I have keys for unassigned slot 3300. Taking responsibility for it.
1:M 25 Jul 2023 02:28:25.272 * Ready to accept connections

虽然nodes.conf是未被持久化的,但启动后,还是会被redis给写入槽位数据:

# cat /home/admin/redis/nodes.conf 
9ee910e301fef3ba741011d2e472379daa262f9a :6379@16379 myself,master - 0 0 0 connected 3300
vars currentEpoch 0 lastVoteEpoch 0

predixy这个服务可以配置成不安装么?

使用命令

kubectl apply -f https://raw.githubusercontent.com/tongdun/td-redis-operator/main/cr/redis_cluster.yaml

会默认安装,对内存要求还挺高的,一直处于Pending状态。

如果修改redis_cluster.yaml文件,将proxyimage去掉,会报错,安装不了,改成“”空字符串,是没有安装了。
但是连redis-cluster-trump这个Service的Endpoints都没有了……,说明Operator那里出问题了。

启动后,节点连接不上

报错信息如下

Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:53.236708068+08:00 Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:53.246455920+08:00 Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:53.312395104+08:00 Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:54.336460067+08:00 Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:55.356507794+08:00 Could not connect to Redis at sentinel-standby-crawler-redis-2.sentinel-standby-crawler-redis.redis.svc.cluster.local:26379: Name or service not known
2023-12-22T14:42:56.411673398+08:00 /usr/local/bin/docker-entrypoint.sh: line 12: [: =: unary operator expected

Service account being created twice

---
# Source: td-redis-operator/templates/operator-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: td-redis-operator
  namespace: kube-system
---
# Source: td-redis-operator/templates/operator.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: td-redis-operator
  namespace: kube-system

无法完成部署,statefulset、redis都起不来

操作,想部署主备:
kubectl apply -f deploy.yaml
kubectl apply -f redis_standby.yaml

[root@localhost td-redis]# kubectl get all -n redis
NAME READY STATUS RESTARTS AGE
pod/operator-7785578894-swjwg 1/1 Running 0 15h
pod/redis-standby-tom-0 1/2 Running 60 (15m ago) 15h
pod/sentinel-standby-tom-0 1/1 Running 171 (43s ago) 15h
pod/sentinel-standby-tom-1 1/1 Running 175 (41s ago) 15h
pod/sentinel-standby-tom-2 1/1 Running 173 (39s ago) 15h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/redis-standby-tom ClusterIP 10.96.120.210 6379/TCP 15h
service/sentinel-standby-tom ClusterIP 10.97.94.185 26379/TCP 15h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/operator 1/1 1 1 15h

NAME DESIRED CURRENT READY AGE
replicaset.apps/operator-7785578894 1 1 1 15h

NAME READY AGE
statefulset.apps/redis-standby-tom 0/2 15h
statefulset.apps/sentinel-standby-tom 3/3 15h

redis集群所有pod同时重启后,无法再组成集群

现有代码中,重启redis的pod后,在createRedisCluster函数中,podsNotinCluster中的pod逐个向podsInCluster的pod去meet,从而再加入集群。
但是,如果原redis集群中,所有pod同时重启后,podsInCluster中pod的个数为0,不能再meet,也就无法恢复集群了。
请问这种情况,需要如何处理?

redis访问咨询

假如外网访问具体ingress映射到哪个服务上,还有内部访问方式是servername+namespace.svc这种方式访问?

Is there any Docker file for reference?

Hello,

where can i find the docker images used in this project
tongduncloud/redis-cluster for example
And what's the difference between official images ?

Thanks a lot

请问有没有开发相关的文档

如题。

  1. 我pull了master的代码。执行./hack/update-codegen.sh没有成功。
  2. 另外,我执行make命令,发现只是执行了go generate,查看makefile,默认的targe命中了codegen,建议增加一个alltarget。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.