By BobbyKo
I have a Kubernetes cluster with a deployment which uses automatically provisioned block storage. My question is:
How can I specify the filesystem for the Persistent Volume? I would like for the Persistent Volume to be created with XFS in my case (my service is a MongoDB which recommends XFS filesystem).
Here is the section from my manifest for the Claim and volume mount:
...
volumeMounts:
- name: mongo-raw-volume-claim
mountPath: /data/db
volumeClaimTemplates:
- metadata:
name: mongo-raw-volume-claim
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: do-block-storage
resources:
requests:
storage: 100Gi
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
@BobbyKo In your K8s StorageClass manifest file, you’ll need to set the fsType as follows:
e.g. example-storageclass.yml:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: standard-retain-xfs
provisioner: dobs.csi.digitalocean.com
parameters:
fsType: xfs
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
For further information regarding this, I recommend taking a look at the following documentation here.
I wish that it helps and all the best.
–
Think different and code well,
-Conrad
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.