Complete the following steps:
-
If you're upgrading from VAST CSI Driver 2.0.x or earlier to VAST CSI Driver 2.1.1, download and run the VAST PV migration script to make the existing Kubernetes persistent volumes (PVs) compatible with VAST CSI Driver 2.1.1. For more information, see Migrating PVs from VAST CSI Driver 2.0.x to 2.1.1. Otherwise, skip to step 2.
>> wget https://raw.githubusercontent.com/vast-data/vast-csi/v2.1/scripts/migrate-pv.py >> python3 ./migrate-pv.py [--vast-csi-namespace='<namespace>'] ... info: PV pvc-12345 updated. info: Done.
-
Remove the old version of VAST CSI Driver.
The existing containers will continue to run with the volumes provisioned by the old VAST CSI Driver version.
-
To remove VAST CSI Driver 2.0.0 or later:
-
Remove the VAST storage class:
kubectl delete sc vastdata-filesystem
-
Remove the VAST CSI driver:
kubectl delete csidriver csi.vastdata.com
-
Remove the VAST namespace:
kubectl delete all --all -n vast-csi
-
-
To remove VAST CSI Driver 1.0.0, you'll need the YAML configuration file that was used to deploy VAST CSI Driver. You can generate the file using the 1.0.0 container.
Run the following command:
kubectl delete -f vast-csi-deployment.yaml
-
-
Deploy the new version of VAST CSI Driver.
Containers referencing VAST CSI Driver via the VAST storage class (
vastdata-filesystem
) will run with the new version of VAST CSI Driver the next time they are created.
You have to migrate Kubernetes persistent volumes (PVs) that were created with earlier versions of VAST CSI Driver to be able to use the PVs with VAST CSI Driver 2.1.1.
Each PV created with VAST CSI Driver 2.1.1 has the following parameters in its volumeAttributes
configuration entry:
-
root_export
. This is the path within the VAST cluster where the volume directory is created. -
vip_pool_name
. This is the name of the VAST VIP pool to be used when mounting the volume. -
mount_options
. This parameter lists custom NFS mount options to be used when mounting the volume. If no custom mount options are needed, the parameter is specified with an empty value ('').
PVs created with earlier versions of VAST CSI Driver do not have these attributes and thus cannot be mounted with VAST CSI Driver 2.1.1 or later for Kubernetes pods.
To add the missing attributes to PVs created with pre-2.1.1 versions of VAST CSI Driver, download and run the PV migration script provided by VAST.
Run the PV migration script migrate-pv.py
as part of the procedure to migrate your environment from VAST CSI Driver 2.0.x or earlier to VAST CSI Driver 2.1.1.
The PV migration script adds root_export
and vip_pool_name
attributes to Kubernetes persistent volumes (PVs) created with VAST CSI Driver 2.0.x or earlier. After running this script, VAST CSI Driver 2.1.1 is able to mount the updated PVs for Kubernetes pods.
VAST recommends running the PV migration script before you remove the old version of VAST CSI Driver to let the script automatically determine and set proper root_export,
vip_pool_name
and mount_options
values.
However, you can choose to run the script after having removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1. In this case, you have to specify the root_export
, vip_pool_name
and mount_options
values manually.
Complete these steps:
-
Download the PV migration script from the VAST GitHub space:
wget https://raw.githubusercontent.com/vast-data/vast-csi/v2.1/scripts/migrate-pv.py
-
Run the script on a host where
kubectl
is already installed and configured with the target Kubernetes cluster.-
If the old version of VAST CSI Driver has not been removed yet, use the following syntax:
migrate-pv.py [--vast-csi-namespace='<namespace>']
Specify the
--vast-csi-namespace
parameter if the namespace of the old version of VAST CSI Driver is not vast-csi. For example:>> python3 ./migrate-pv.py --vast-csi-namespace='kube-system'
-
If you have removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1, use the following syntax:
migrate-pv.py --force --root_export=<path> --vip_pool_name=<vip_pool_name>
Where:
-
--force
is a required parameter that indicates that the script is run after you have removed the old version of VAST CSI Driver and installed VAST CSI Driver 2.1.1. -
--root_export
identifies the storage path that was provided when the old version of VAST CSI Driver was deployed. This is the value you supplied at the “NFS Export Path” prompt. -
--vip_pool_name
identifies the VIP pool to be used for the PVs. Specify a VIP pool that has been defined in VAST Cluster. It does not have to be the same as in the original deployment. -
--mount_options
specifies custom NFS mount options. Enter a comma-separated list of options. Specify '' (empty string) if none are needed.
For example:
>> python3 ./migrate-pv.py --force --root_export=/data/k8s --vip_pool_name=vippool-1 --mount_options=''
-
-
-
Verify that the script output is similar to the following:
info: PV <pv_name> updated. info: Done.
Note
If an error was found in the user-supplied parameters, rerun the script with correct values specified.
Comments
0 comments
Article is closed for comments.