Upgrade DirectPV Using Helm
This page describes how to upgrade an existing DirectPV with Helm. Upgrades with Helm are possible even if DirectPV was not originally installed using Helm.
MinIO recommends using Helm for upgrading DirectPV.
Alternatively, you can continue to upgrade using the kubectl plugin.
kubectl directpv migrate to migrate the old resources to a new installation.
Prerequisites
Kubernetes environment
-
Kubernetes installed with an in-support, active release.
In general, Kubernetes provides security releases for releases for a period of up to 1 year. DirectPV requires Kubernetes version 1.29 or later.
Back up the existing Helm configuration
helm get values -n directpv
Test Upgrades Before Applying To Production
DirectPV uses a testing and validation suite as part of all releases. However, no testing suite can account for unique combinations and permutations of hardware, software, and workloads of your production environment.
You should always validate any DirectPV upgrades in a lower environment (such as Dev/QA/Staging) before applying those upgrades to production deployments, or any other environment containing critical data. Performing updates to production environments without first validating in lower environments is done at your own risk.
Consider using SUBNET for additional support and guidance during the upgrade procedure.
Upgrade DirectPV CSI driver from 4.1.x to latest
Installation managed by Helm
-
For DirectPV installations already managed by Helm, run
helm upgrade.helm upgrade directpv minio/directpvIf you customized the Helm chart for your installation, include the values file in the command. For example:
helm upgrade directpv minio/directpv -f directpv-values.yaml --reuse-values- Replace
directpv-values.yamlwith the file containing your chart customizations. If you do not have any custom chart values, you can skip the-fand file.
- Replace
Installation not managed by Helm
For DirectPV installations not yet managed by Helm, have Helm take over the installation and upgrade it.
-
Verify the existing installation
Use the following command to verify the health and status of all pods and services in the
directpvnamespace:kubectl get all -n directpv -
Add the MinIO Helm repo
helm repo add minio https://helm.min.io -
Update Helm
helm repo update -
Search for the MinIO Helm repository
helm search repo minio -
Upgrade the installation and have Helm take ownership to manage the installation going forward
helm upgrade --install --take-ownership --force directpv minio/directpv -
Validate the upgrade
Use the following command to check the pods in the DirectPV namespace to confirm the Helm upgrade deployed correctly.
kubectl get all -n directpv- Replace
directpvwith the namespace you installed DirectPV to.
- Replace
-
Upgrade the plugin to latest version
Upgrade from a version 4.x.x to <4.1.5
-
Uninstall DirectPV
kubectl directpv uninstallUninstalling DirectPV is a non-destructive process. Existing persistent volumes are not removed.
-
Reinstall DirectPV with the latest version
See the installation documentation.
Upgrade from a version older than 4.x.x
-
Upgrade to release 4.1.5
Open a SUBNET ticket for further guidance on migrating from older community DirectPV releases.
-
Follow the instructions to upgrade from 4.1.5 to latest
Upgrade DirectPV Plugin
-
Download the DirectPV plugin for your operating system and architecture from https://dl.min.io/aistor/directpv/release/.
Move the downloaded file to your system PATH. Refer to the documentation for your operating system for where to place the file.
-
Mark the downloaded plugin as executable.
chmod a+x /path/to/kubectl-directpvExecutables on macOSmacOS typically blocks unsigned binaries from running. If thekubectl-directpvcommand fails, go to System Settings, then Privacy and Security. Scroll to the Security section and select Allow Anyway for thekubectl-directpvapplication.