基于 Golang
的 Redos-Operator,可以在 Kubernetes
集群上创建 Redis standalone/cluster
模式。
Redis-Exporter
提供监控功能。
=> v6
https://ot-container-kit.github.io/redis-operator/
https://github.com/ot-container-kit/redis-operator
Redis 集群和独立模式
Redis 集群故障转移和恢复
内置 Redis 监控
Redis 密码设置
TLS
支持 Ipv4 和 Ipv6
支持配置领导者和追随者
grafana dashboard
Kubernetes 1.18.0 cluster
- 集群已安装
OLM
组件。安装手册参考 OLM安装
1. kubectl apply -f https://operatorhub.io/install/redis-operator.yaml
-
Subscription
对象从Catalog source
获取可用版本 -
Subscription
会创建一个Install
对象为Operator
安装资源,根据批准策略来批准安装计划:
2. kubectl get csv -n operators
3. kubectl apply -f https://raw.githubusercontent.com/chenghongxi/kubernetes-learning/master/olm/redis-operators/yml/create-redis-cluster.yaml
1. kubectl get sc,pv,po
2. kubectl exec -it redis-cluster-leader-0 -- redis-cli -c cluster nodes
删除步骤 3 中的资源
kubectl delete -f https://raw.githubusercontent.com/chenghongxi/kubernetes-learning/master/olm/redis-operators/yml/create-redis-cluster.yaml
删除此 Operator
1. kubectl delete subscription <subscription-name> -n operators
2. kubectl delete clusterserviceversion -n operators