#1 Global Leader in Data Resilience

How to Override Volume storageClass During Export

KB ID: 4595
Product: Veeam Kasten for Kubernetes
Published: 2024-06-07
Last Modified: 2024-06-07
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Purpose

This article documents how to configure a Veeam Kasten for Kubernetes export parameter to specify the storageClass that is created and used during exports.

Solution

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.

Single storageClass

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

Multiple storageClass

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

More Information

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.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.