Pod Scheduling¶
All CRDs support Kubernetes pod scheduling options to control where backup, check, restore-test, and restore Jobs run. These settings are applied to every Job and CronJob created by the operator for that resource.
Node Selector¶
Assign Jobs to nodes with specific labels:
spec:
nodeSelector:
node-role.kubernetes.io/backup: "true"
topology.kubernetes.io/zone: "eu-central-1a"
Tolerations¶
Allow Jobs to run on tainted nodes:
spec:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "backup"
effect: "NoSchedule"
- key: "node.kubernetes.io/disk-pressure"
operator: "Exists"
effect: "NoSchedule"
Affinity¶
Use node affinity for more flexible scheduling rules:
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/backup
operator: Exists
Scope¶
For VolumeBackup and S3Backup, scheduling settings apply to all generated CronJobs:
- Main backup CronJob
- Check CronJob (if enabled)
- Restore-test CronJob (if enabled)
- Unlock CronJob
For VolumeRestore, they apply to the restore Job.
For VolumeSnapshotBackup, they apply to the Restic backup Job.
Suspend and Resume¶
VolumeBackup and S3Backup support suspending backups without deleting the resource:
# Suspend
kubectl patch volumebackup my-backup \
-p '{"spec":{"suspended":true}}' --type=merge
# Resume
kubectl patch volumebackup my-backup \
-p '{"spec":{"suspended":false}}' --type=merge
When suspended, the CronJob's suspend field is set to true, preventing new Jobs from being scheduled. Running Jobs are not affected.
The status condition reflects the suspended state: