This article documents how to configure a Veeam Kasten for Kubernetes export parameter to specify the storageClass that is created and used during exports.
The ExporterStorageClassName parameter can be used for namespaces that have PersistentVolumeClaims (PVCs) using a single storageClass, as well as in cases where multiple PVCs, using different storageClasses, are in the same namespace.
This is particularly helpful when the application’s PVC is provisioned using a storageClass with the deletion policy set to ‘Retain’. This setting ensures that there are no leftover PersistentVolumes (PVs) in the ‘released’ state after the temporary PVCs, created for exports, have been cleaned up.
The examples below show how to add these parameters by editing the Policy manually.
apiVersion: config.kio.kasten.io/v1alpha1
kind: Policy
metadata:
name: postgresql-backup-1
namespace: kasten-io
spec:
actions:
- action: backup
- action: export
exportParameters:
exportData:
enabled: true
# Storage class to use for any temporary PVCs created
# during the snapshot conversion process. If not specified, the
# storage class of the source volume is used.
**exporterStorageClassName:****gp2-delete**
frequency: '@hourly'
migrationToken:
name: postgresql-backup-1-migration-token-7vrgc
namespace: kasten-io
profile:
name: test-jai
namespace: kasten-io
receiveString: xxxxxxx
retention: {}
createdBy: kasten-io:k10-k10
frequency: '@hourly'
retention:
daily: 7
hourly: 24
monthly: 12
weekly: 4
yearly: 7
selector:
matchExpressions:
- key: k10.kasten.io/appNamespace
operator: In
values:
- postgresql
- kasten-io-cluster
apiVersion: config.kio.kasten.io/v1alpha1
kind: Policy
metadata:
name: postgresql-backup-1
namespace: kasten-io
spec:
actions:
- action: backup
- action: export
exportParameters:
exportData:
enabled: true
overrides:
# Override setting of a specific storage class
- **storageClassName: gp2-retain** **enabled: true** ** exporterStorageClassName: gp2-delete** ** - storageClassName: gp3-retain** ** enabled: true** ** exporterStorageClassName: gp3-delete**
# Setting to disable the export for a specific storageClass
-** storageClassName: nfs-client** ** enabled: false**
frequency: '@hourly'
migrationToken:
name: postgresql-backup-1-migration-token-7vrgc
namespace: kasten-io
profile:
name: test-jai
namespace: kasten-io
receiveString: xxxxxxx
retention: {}
createdBy: kasten-io:k10-k10
frequency: '@hourly'
retention:
daily: 7
hourly: 24
monthly: 12
weekly: 4
yearly: 7
selector:
matchExpressions:
- key: k10.kasten.io/appNamespace
operator: In
values:
- postgresql
- kasten-io-cluster
Note: It is also possible to disable the export of a specific storageClass as in the example below for NFS:
# Setting to disable the export for a specific storageClass
-** storageClassName: nfs-client** ** enabled: false**
Regarding all fields that can be configured with the policy API, please refer to <https://docs.kasten.io/latest/api/policies.html> for more information.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.