How to Set Up RWX Volumes on VKE with Vultr File System
Vultr File System (VFS) introduces the capability to create ReadWriteMany (RWX) persistent volumes within Vultr Kubernetes Engine (VKE) clusters. This functionality allows multiple pods to concurrently access and share the same storage volume, making it ideal for use cases that require shared data, such as content management systems, collaborative applications, and distributed workloads.
Prerequisites
- Vultr Kubernetes Engine (VKE) cluster.
- Vultr Container Storage Interface (CSI) Driver v0.14.0 or higher.
- Kubernetes Config (
KUBECONFIG
) for cluster management.
Implementation
Vultr File System volumes can be used as Persistent Volumes in Kubernetes using the vultr-vfs-storage
storage class.
Create a new manifest for PVC resource.
yamlapiVersion: v1 kind: PersistentVolumeClaim metadata: name: test-rwx spec: accessModes: - ReadWriteMany resources: requests: storage: 10Gi storageClassName: vultr-vfs-storage
In this example, the PVC resource
test-rwx
is created with a capacity of 10Gi and access modeReadWriteMany
. The storage classvultr-vfs-storage
is used to provision the VFS volume.Apply the PVC manifest.
console$ kubectl apply -f pvc.yaml
Output:
persistentvolumeclaim/test-rwx created
List the PVC resource.
console$ kubectl get pvc test-rwx
The PVC resource
test-rwx
should be listed with the statusBound
.Output:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE test-rwx Bound pvc-604cf0c549ad41e3 10Gi RWX vultr-vfs-storage <unset> 10m
Troubleshooting
If you are unable to reproduce the same behaviour as noted above, you can try troubleshooting to get more information.
Describe the PVC resource.
console$ kubectl describe pvc test-rwx
You can review the events for any issues related to provisioning of the VFS volume.
List all storage classes.
console$ kubectl get storageclass
The list must contain
vultr-vfs-storage
in order to provision a VFS volume.Ensure sufficient quota allocation.
Monitor cluster events for storage issues.
Conclusion
This guide demonstrated how to set up ReadWriteMany (RWX) volumes on Vultr Kubernetes Engine (VKE) using Vultr File System (VFS). This feature allows multiple pods to concurrently access and share the same storage volume, making it ideal for use cases that require shared data.
For more information, refer to the following documentation: