Installation
March 24, 2026 ยท View on GitHub
DirectPV comes with two components:
- DirectPV plugin - installed on client machine.
- DirectPV CSI driver - installed on Kubernetes cluster.
DirectPV plugin installation
The plugin needs to be installed to manage DirectPV CSI driver in Kubernetes.
Prerequisites
- Access to Kubernetes cluster.
Installation using Krew
The latest DirectPV plugin is available in Krew repository. Use below steps to install the plugin in your system.
# Update the plugin list.
$ kubectl krew update
# Install DirectPV plugin.
$ kubectl krew install directpv
Installation of release binary
The plugin binary name starts by kubectl-directpv and is available at https://github.com/minio/directpv/releases/latest. Download the binary as per your operating system and architecture. Below is an example for GNU/Linux on amd64 architecture:
# Download DirectPV plugin.
$ release=$(curl -sfL "https://api.github.com/repos/minio/directpv/releases/latest" | awk '/tag_name/ { print substr(\$2, 3, length(\$2)-4) }')
$ curl -fLo kubectl-directpv https://github.com/minio/directpv/releases/download/v${release}/kubectl-directpv_${release}_linux_amd64
# Make the binary executable.
$ chmod a+x kubectl-directpv
DirectPV CSI driver installation
Before starting the installation, it is required to have DirectPV plugin installed on your system. For plugin installation refer this documentation. If you are not using krew, replace kubectl directpv by kubectl-directpv in below steps.
Prerequisites
- Kubernetes >= v1.20 on GNU/Linux on amd64.
- If you use private registry, below images must be pushed into your registry. You could use this helper script to do that.
- quay.io/minio/csi-node-driver-registrar:v2.16.0-0
- quay.io/minio/csi-provisioner:v6.2.0-0 (for Kubernetes >= v1.20)
- quay.io/minio/csi-provisioner:v2.2.0-go1.18 (for kubernetes < v1.20)
- quay.io/minio/livenessprobe:v2.18.0-0
- quay.io/minio/csi-resizer:v2.1.0-0
- quay.io/minio/directpv:latest
- If
seccompis enabled, load DirectPV seccomp profile on nodes where you want to install DirectPV and use--seccomp-profileflag tokubectl directpv installcommand. For more information, refer Kubernetes documentation here - If
apparmoris enabled, load DirectPV apparmor profile on nodes where you want to install DirectPV and use--apparmor-profileflag tokubectl directpv installcommand. For more information, refer to the Kubernetes documentation. - Enabled
ExpandCSIVolumesfeature gate for volume expansion feature. - Review the driver specification documentation
- For Red Hat Openshift users, refer to the Openshift specific documentation for configuration prior to install DirectPV.
Default installation
To install DirectPV in all Kubernetes nodes, run
$ kubectl directpv install
Customized installation
To install DirectPV on selected Kubernetes nodes and/or with tolerations and/or with non-standard kubelet directory, use below steps accordingly.
Installing on selected nodes
To install DirectPV on selected nodes, use --node-selector flag to install command. Below is an example:
# Install DirectPV on nodes having label 'group-name' key and 'bigdata' value
$ kubectl directpv install --node-selector group-name=bigdata
Installing on tainted nodes
To install DirectPV on tainted nodes, use --toleration flag to install command. Below is an example:
# Install DirectPV on tainted nodes by tolerating 'key1' key, 'Equal' operator for 'value1' value with 'NoSchedule' effect
$ kubectl directpv install --tolerations key1=value1:NoSchedule
# Install DirectPV on tainted nodes by tolerating 'key2' key, 'Exists' operator with 'NoExecute' effect
$ kubectl directpv install --tolerations key2:NoExecute
Installing on non-standard kubelet directory
To install on non-standard kubelet directory, set the KUBELET_DIR_PATH environment variable and start the installation. Below is an example:
$ export KUBELET_DIR_PATH=/path/to/my/kubelet/dir
$ kubectl directpv install
Installing on Openshift
To install DirectPV on Openshift with specific configuration, use the --openshift flag. Below is an example:
$ kubectl directpv install --openshift
Installing by generating DirectPV manifests
To install using generated manifests file, run below command
$ curl -sfL https://github.com/minio/directpv/raw/master/docs/tools/install.sh | sh -s - apply