Welcome to the Linux Foundation Forum!

storageClass provisioner for nfs and hostPath

Need help on how to configure the the provisioner attribute of a storageClass for NFS and hostPath.
For hostPath according to https://kubernetes.io/docs/concepts/storage/storage-classes/#local
provisioner: kubernetes.io/no-provisioner ?

For NFS the documentations says https://kubernetes.io/docs/concepts/storage/storage-classes/
"Each StorageClass has a provisioner that determines what volume plugin is used for provisioning PVs. This field must be specified."
But the table below doesn't show any value for NFS.
Besides under the table it says:
"For example, NFS doesn't provide an internal provisioner, but an external provisioner can be used."

So what is the provisioner for nfs storageClass?

Comments

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi @ltosolini,

    On the storage classes page referenced above, there is a section on Provisioners where you can find links to a few NFS provisioners on GitHub.

    Regards,
    -Chris

  • Hello Chris,
    I can not find such reference, would you kindly provide it....
    BTW, I have implemented the lab exercise as follow using 'no-provisioner' and it works. Is it wrong?
    Thanks,
    Luca.

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
    name: storageclass1
    provisioner: kubernetes.io/no-provisioner
    parameters:
    allowVolumeExpansion: true


    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: pvvol-1
    spec:
    capacity:
    storage: 1Gi
    volumeMode: Filesystem
    accessModes:
    - ReadWriteMany
    persistentVolumeReclaimPolicy: Retain
    storageClassName: storageclass1
    nfs:
    path: /opt/sfw
    server: 10.9.4.145


    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: pvc-one
    spec:
    accessModes:
    - ReadWriteMany
    volumeMode: Filesystem
    resources:
    requests:
    storage: 200Mi
    storageClassName: storageclass1
    ubuntu@wf-st-cctr1:~/8$

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi @ltosolini,

    I realize that navigating through the documentation can be quite challenging.

    I was referencing the same Storage Classes documentation page, found at https://kubernetes.io/docs/concepts/storage/storage-classes/, which you mentioned above.

    On the Storage Classes documentation page, if you scroll down to the Provisioner section, right above the sentence you quoted in your post:

    For example, NFS doesn't provide an internal provisioner, but an external provisioner can be used.

    there is another sentence that reads:

    Some external provisioners are listed under the repository kubernetes-sigs/sig-storage-lib-external-provisioner.

    If you happen to click on the link kubernetes-sigs/sig-storage-lib-external-provisioner, you will be taken to GitHub where you may find information about a library used to write external provisioners together with a short list of NFS provisioners.

    Regards,
    -Chris

Categories

Upcoming Training