Question

How can one add mountoptions to the persistent volume claim?

Posted November 30, 2018 1.1k views
Block StorageKubernetes

When creating a persistent volume in kubernetes, the storage class “do-block-storage” is available. I would like to add mountOptions to this, but it isn’t clear to me how this is done (or if it is possible).

I ask because when looking at the volume itself, “discard,noatime,defaults” is recommended. I would like to be able to use a storage class that properly mounts the device.

1 comment
  • The following does not appear to work:

    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
      name: storage-noatime
    mountOptions:
    - discard
    - noatime
    - defaults
    provisioner: dobs.csi.digitalocean.com
    
0 answers
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!