How can one add mountoptions to the persistent volume claim?

November 30, 2018 986 views
Block Storage Kubernetes

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
    
Be the first one to answer this question.

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