Skip to main content
Version: 2.6

Add Kubernetes clusters with CSI drivers

Portworx Backup supports backup and restore on Kubernetes clusters with CSI drivers if the driver meets certain prerequisites.

Add the cluster to Portworx Backup

  1. From the home page, select Add Cluster:

    Add cluster

  2. In the Add Cluster page, under Select Kubernetes Platform, select Others and then enter the cluster details:

    • The name of the cluster
    • Retrieve the Kubeconfig from your cluster and paste it in the Kubeconfig text frame or click Browse to upload it from a file.
    • Select the Others radio button from the Kubernetes Service radio group

    Enter the cluster details

  3. Click Add Cluster.

    Portworx Backup adds the Kubernetes cluster and create a default VolumeSnapshotClass on it. In some cases, this default VolumeSnapshotClass will work with no further configuration. If it doesn't, you must configure it by adding your CSI driver's parameters.

    Attempt a backup on your newly added cluster from the Portworx Backup user interface. If it fails, proceed to the Add CSI driver specific parameters section.

Add CSI driver specific parameters

If you have added the cluster to Portworx Backup and successfully performed a backup, skip this section. If you attempted a backup unsuccessfully, you must add some parameters to the VolumeSnapshotClass to allow Portworx Backup to perform backups and restores with your CSI driver.

See your CSI driver documentation to determine which parameters you need in your VolumeSnapshotClass. If the CSI driver you are using requires VolumeSnapshotClass parameters to function correctly, you must create or update this object.

Perform the following steps to edit the default VolumeSnapshotClass for your CSI driver:

  1. Verify that the VolumeSnapshotClass exists:

    kubectl get volumesnapshotclass <snapshotclass>
  2. List the CSI driver(s) for your volumes and retain the driver name for use in the next step:

    kubectl get csidrivers
  3. Edit the VolumeSnapshotClass object for your CSI driver by saving the driver name as an environment variable called CSI_DRIVER_NAME and entering the kubectl edit command shown below:

    CSI_DRIVER_NAME=<csi_driver_name>
    kubectl edit volumesnapshotclass stork-csi-snapshot-class-${CSI_DRIVER_NAME}
  4. Add the necessary parameters to this object based on the documentation for your CSI driver(s).

    Portworx Backup will now use these VolumeSnapshotClass parameters when performing backups and restores. Verify that you've configured the VolumeSnapshotClass successfully by running another backup from the Portworx Backup user interface.

    note

    Portworx Backup always overrides the VolumeSnapshotClass with a deletion policy as retain to prevent data loss.

Was this page helpful?