【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】oceanbase/oceanbase-cloud-native:4.2.1.6-106000012024042515
【问题描述】清晰明确描述问题
【复现路径】kubectl apply -f obcluster.yaml后,新增数据库,新增表数据,然后kubectl delete -f obcluster.yaml,再执行kubectl apply -f obcluster.yaml,连接数据库访问,原来新增的数据丢失obcluster.yaml如下:
这是obcloud的包吧,社区版没有该包。
建议去咨询云服务技术支持同学
没做持久化?
是社区版的,用的是gitHub上的部署方案,链接是:https://github.com/oceanbase/ob-operator/blob/master/README-CN.md
用的这个yaml里面的镜像https://raw.githubusercontent.com/oceanbase/ob-operator/stable/example/quickstart/obcluster.yaml
kubectl delete这个命令应该是删除相信信息了。属于预期内的
持久化了,保留了pvc,下面是obcluster.yaml的配置
…
metadata:
name: test
namespace: default
annotations:
“oceanbase.oceanbase.com/mode”: “service”
“oceanbase.oceanbase.com/independent-pvc-lifecycle”: “true”
spec:
clusterName: obcluster
clusterId: 1
serviceAccount: “default”
userSecrets:
root: root-password
topology:
- zone: zone1
replica: 1
observer:
image: oceanbase/oceanbase-cloud-native:4.2.1.6-106000012024042515
resource:
cpu: 2
memory: 10Gi
storage:
dataStorage:
storageClass: local-path
size: 70Gi
redoLogStorage:
storageClass: local-path
size: 50Gi
logStorage:
storageClass: local-path
size: 20Gi
parameters:
- name: system_memory
value: 1G - name: “__min_full_resource_pool_memory”
value: “2147483648” # 2G
可以理解,但我们假设一个场景,原来部署OceanBase的机器坏了,我们把数据备份了,迁移到新节点,重建集群,如果重新执行yaml无法重建,那意味着数据丢失了
这张恢复场景ob不支持。推荐使用多副本高可用集群