kubeblocks
kubeblocks copied to clipboard
How to create a backup pod for each instance
Now, we want to create a backup pod for each instance
bpt is:
compDefs:
- ^zookeeper-
schedules:
- backupMethod: zk-data-sync
cronExpression: 0 18 * * 0
enabled: true
retentionPeriod: 7d
serviceKind: Zookeeper
target:
fallbackRole: follower
role: leader
strategy: All
The bp generated by bpt is as follows:
target:
podSelector:
fallbackLabelSelector:
matchLabels:
app.kubernetes.io/instance: momo-zookeeper
app.kubernetes.io/managed-by: kubeblocks
apps.kubeblocks.io/component-name: zookeeper
kubeblocks.io/role: follower
matchLabels:
app.kubernetes.io/instance: momo-zookeeper
app.kubernetes.io/managed-by: kubeblocks
apps.kubeblocks.io/component-name: zookeeper
kubeblocks.io/role: leader
strategy: All
useKopia: false
As a result, only one backup pod was created. The .spec.target.role field of bpt cannot be empty. Does this mean that backup pods can only be created for some instances?
It seems the matchLables hits only on pod
matchLabels:
app.kubernetes.io/instance: momo-zookeeper
app.kubernetes.io/managed-by: kubeblocks
apps.kubeblocks.io/component-name: zookeeper
kubeblocks.io/role: leader
there should be only one LEADER in your cluster.
You may set 'role: ""' in backup policy template.
it works, However, the backup pod is destroyed at the same time as it is created, so it is not possible to run a backup pod stably for each pod at the same time.
actionSet type is Continuous?
actionSet type is Continuous?
yes
yes, Continuous backup is not supported yet
This issue has been marked as stale because it has been open for 30 days with no activity