Skip to main content
Version: 2.7

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. In the home page, from the left navigation pane, click Clusters.

  2. At the upper-right corner, click Connect cluster:

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

    • Cluster name: enter a name for your cluster

    • Kubeconfig: retrieve the Kubeconfig from your cluster and paste it here or click Browse to upload it from a file

4 Select the Others radio button from the Kubernetes Service radio group

  1. Click Add cluster.

Portworx Backup add your Azure cluster and to view the added cluster go to left navigation pane and click Clusters icon.

In this case, Portworx Backup also creates a default VolumeSnapshotClass on it. In some cases, this default VolumeSnapshotClass will work with no further configuration. If no, you must configure it by adding your CSI driver's parameters.

Attempt a backup on your newly added cluster from the Portworx Backup web console. 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 have configured the VolumeSnapshotClass successfully by running another backup from the Portworx Backup web console.

note

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