DirectPV comes with two components:
- DirectPV plugin - installed on client machine.
- DirectPV CSI driver - installed on Kubernetes cluster.
The plugin needs to be installed to manage DirectPV CSI driver in Kubernetes.
- Access to Kubernetes cluster.
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
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
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.
- 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.12.0-0
- quay.io/minio/csi-provisioner:v5.0.2-0 (for Kubernetes >= v1.20)
- quay.io/minio/csi-provisioner:v2.2.0-go1.18 (for kubernetes < v1.20)
- quay.io/minio/livenessprobe:v2.14.0-0
- quay.io/minio/csi-resizer:v1.12.0-0
- quay.io/minio/directpv:latest
- If
seccomp
is enabled, load DirectPV seccomp profile on nodes where you want to install DirectPV and use--seccomp-profile
flag tokubectl directpv install
command. For more information, refer Kubernetes documentation here - If
apparmor
is enabled, load DirectPV apparmor profile on nodes where you want to install DirectPV and use--apparmor-profile
flag tokubectl directpv install
command. For more information, refer to the Kubernetes documentation. - Enabled
ExpandCSIVolumes
feature 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.
To install DirectPV in all Kubernetes nodes, run
$ kubectl directpv install
To install DirectPV on selected Kubernetes nodes and/or with tolerations and/or with non-standard kubelet
directory, use below steps accordingly.
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
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
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
To install DirectPV on Openshift with specific configuration, use the --openshift
flag. Below is an example:
$ kubectl directpv install --openshift
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