Use pv-mounter to mount and unmount Kubernetes PVCs
mainpv-mounter is a kubectl plugin designed to mount and unmount Kubernetes PersistentVolumeClaims (PVCs) to your local machine. It automates the complex steps required for local access, including managing pods, ephemeral containers, port-forwarding, and the underlying mount connections.
To use it, you will primarily use the mount and unmount commands (detailed in their respective guides). You can choose between two backends using the --backend flag:
- ssh: The default backend, which uses SSHFS.
- nfs: Uses NFS-Ganesha.
Before using pv-mounter, ensure you have the necessary prerequisites met for your chosen backend (SSH or NFS).
# Example concept of selecting a backend (actual command syntax is in the mount guide)
# kubectl pv-mounter mount <pvc-name> <local-path> --backend nfs