Description
Kubernetes version: v1.26.0(KubeSphere:v3.4.1)
Helm version: v3.12.0
RadonDB Operator version: 3.0.0
RadonDB MySQL version: 8.0.25
数据库集群节点从1节点扩到3节点后,创建的数据库消失
操作过程:
1、检查1节点集群状态
3、将集群节点扩容到3个
[root@k8s-master001 ~]# kubectl get all -n mysql-cluster
NAME READY STATUS RESTARTS AGE
pod/radondb-operator-mysql-operator-846657db5-xsb6v 2/2 Running 0 45h
pod/sample-mysql-0 3/3 Running 0 87s
pod/sample-mysql-1 3/3 Running 0 3m43s
pod/sample-mysql-2 3/3 Running 0 2m40s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/mysql-operator-metrics ClusterIP 10.233.35.195 8443/TCP 45h
service/radondb-mysql-webhook ClusterIP 10.233.60.113 443/TCP 45h
service/sample-follower ClusterIP 10.233.24.81 3306/TCP,8082/TCP 3m44s
service/sample-leader ClusterIP 10.233.51.178 3306/TCP,8082/TCP 44h
service/sample-mysql ClusterIP None 3306/TCP,8082/TCP 44h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/radondb-operator-mysql-operator 1/1 1 1 45h
NAME DESIRED CURRENT READY AGE
replicaset.apps/radondb-operator-mysql-operator-846657db5 1 1 1 45h
NAME READY AGE
statefulset.apps/sample-mysql 3/3 44h
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-0 -n mysql-cluster | grep role
role=FOLLOWER
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-1 -n mysql-cluster | grep role
role=LEADER
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-2 -n mysql-cluster | grep role
role=FOLLOWER
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-2 -n mysql-cluster | grep healthy=
healthy=yes
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-1 -n mysql-cluster | grep healthy=
healthy=yes
[root@k8s-master001 ~]# kubectl describe pod/sample-mysql-0 -n mysql-cluster | grep healthy=
healthy=yes
可以看到数据库hx_db已经没有了