Upgrade DirectPV Using Helm

Version changed
DirectPV 5.1.0 and later do not require a license and ignore any existing license configuration or secret. Remove these values at your discretion.

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.

Updating Custom Installations
Custom installations do not support client-side upgrade functionality. Use 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.

  • Helm installed.

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

If you upgrade to a 5.0.x version, you must add a license. Versions 5.1.0 or later do not require a license.

Installation managed by Helm

  1. For DirectPV installations already managed by Helm, run helm upgrade.

    helm upgrade directpv minio/directpv
    

    If 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.yaml with the file containing your chart customizations. If you do not have any custom chart values, you can skip the -f and file.
  2. Upgrade the DirectPV plugin.

Installation not managed by Helm

For DirectPV installations not yet managed by Helm, have Helm take over the installation and upgrade it.

  1. Verify the existing installation

    Use the following command to verify the health and status of all pods and services in the directpv namespace:

    kubectl get all -n directpv
    
  2. Add the MinIO Helm repo

    helm repo add minio https://helm.min.io
    
  3. Update Helm

    helm repo update
    
  4. Search for the MinIO Helm repository

    helm search repo minio
    
  5. Upgrade the installation and have Helm take ownership to manage the installation going forward

    helm upgrade --install --take-ownership --force directpv minio/directpv
    
  6. 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 directpv with the namespace you installed DirectPV to.
  7. Upgrade the plugin to latest version

Upgrade from a version 4.x.x to <4.1.5

  1. Uninstall DirectPV

    kubectl directpv uninstall
    

    Uninstalling DirectPV is a non-destructive process. Existing persistent volumes are not removed.

  2. Reinstall DirectPV with the latest version

    See the installation documentation.

Upgrade from a version older than 4.x.x

  1. Upgrade to release 4.1.5

    Open a SUBNET ticket for further guidance on migrating from older community DirectPV releases.

  2. Follow the instructions to upgrade from 4.1.5 to latest

Upgrade DirectPV Plugin

  1. 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.

  2. Mark the downloaded plugin as executable.

    chmod a+x /path/to/kubectl-directpv
    
    Executables on macOS
    macOS typically blocks unsigned binaries from running. If the kubectl-directpv command fails, go to System Settings, then Privacy and Security. Scroll to the Security section and select Allow Anyway for the kubectl-directpv application.