部署和管理RabbitMQ集群 , 为 RabbitMQ 集群的生命周期(创建、升级、正常关闭)设计的自定义控制器和自定义资源定义 ( CRD )
https://www.rabbitmq.com/kubernetes/operator/operator-overview.html
https://github.com/rabbitmq/cluster-operator
Kubernetes 1.19.0 cluster
- 集群已安装
OLM
组件。安装手册参考 OLM安装
1. kubectl apply -f https://operatorhub.io/install/rabbitmq-cluster-operator.yaml
-
原理同
redis-operator
2. kubectl get csv -n operators
3. kubectl create -f https://raw.githubusercontent.com/chenghongxi/kubernetes-learning/master/olm/rabbitmq-operators/yml/create-rabbitmq-cluster.yaml
1. kubectl get po,sc,pv,pvc,secret
删除步骤 3 中的资源
kubectl delete -f https://raw.githubusercontent.com/chenghongxi/kubernetes-learning/master/olm/rabbitmq-operators/yml/create-rabbitmq-cluster.yaml
删除此 Operator
1. kubectl delete subscription <subscription-name> -n operators
2. kubectl delete clusterserviceversion -n operators