Installing kubernetes-csi/csi-driver-nfs on OpenShift with the Console
We have an existing way to do this with the cli but I wanted to show how we can also do it with the OpenShift Console
Create a HelmRepository
- Log into the OpenShift console and change to the Developer Perspective
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Click Helm on the left navigation bar
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Change Project to kube-system
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Create a new Helm Chart Repository
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Leave it as a Namespaced scoped type
- Set
Name: csi-driver-nfs
- Optionally set
Display Name: csi-driver-nfs
- Set
URL: https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Create the Repository
- Click Helm again and Create a new Helm Release
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Filter by Chart Repositories and select
Csi Driver Nfs
and select the Csi Driver Nfs chart card to install
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Click Create
These notes were created using version csi-driver-nfs version 4.6.0
- Change the Chart version to
v4.6.0
- With the YAML view of the release options we need to change a few settings:
- Click Create
- All three circles will go dark blue as the Helm Release rolls out the containers to the cluster
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
We are deploying into the kube-system
project because the csi-driver-nfs needs elevated permissions on the OpenShift cluster which are provided by default in that privileged project
Create a StorageClass
- Proceed to the Administrator Perspective in the
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Navigate to Storage -> StorageClasses and click Create StorageClass
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Use the GUI to set:
- Name: nfs-csi
- Reclaim policy: Delete
- Volume binding mode: Immediate
- Provisioner: nfs.csi.k8s.io
- Additional parameters:
- server:
nfs-server.example.com
- share:
/example-dir
- subDir:
${pvc.metadata.namespace}-${pvc.metadata.name}
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
If we need specific mount options like NFS v4 we can add a parameter:
- mountOptions:
nvsvers=4.1
subDir
is optional, by default the template for subdirectories is {nfs-server-address}#{sub-dir-name}#{share-name}
Set Default StorageClass
If we do not have one already we should set this StorageClass as default for the cluster
- Click Actions -> Edit Annotations
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Set a new annotation
storageclass.kubernetes.io/is-default-class: true
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More β
- Click Save
Now you can provision a new PersistentVolumeClaim!
Create a VolumeSnapshotClass
Snapshots are supported with csi-driver-nfs
after creating a VolumeSnapshotClass
.
Creating snapshots and clones can be slow because a snapshot request simply runs tar -czf $DESTINATION_FILE $SOURCE_FOLDER
. More information can be found in the community discussion.
If you want fast/instantaneous snapshots and clones, please use your storage vendor's CSI driver (e.g. NetApp, Dell/EMC, Portworx, OpenShift Data Foundation, etcβ¦)
A basic VolumeSnapshotClass
only requires two pieces of information.
Virtual Machine snapshots have a 5 minute timeout by default. The GUI allows you to manually specify a longer time. Or you can create VM snapshots via YAML with failureDeadline
set to a large number.