Manually create a static persistent volume of type HostPath or NFS Shared Storage.
HostPath: Mounts the file directory from the host where the container resides to a specified path in the container (corresponding to Kubernetes' HostPath), allowing the container to use the host's file system for persistent storage. If the host becomes inaccessible, the HostPath may not be accessible.
NFS Shared Storage: NFS Shared Storage uses the community NFS CSI (Container Storage Interface) storage plugin, which aligns more closely with Kubernetes design principles, providing client access capabilities for multiple services. Ensure that the current cluster has deployed the NFS storage plugin before use.
Confirm the size of the persistent volume to be created and ensure that the backend storage system currently has the capacity to provide the corresponding storage.
Obtain the backend storage access address, the file path to be mounted, credential access (if required), and other relevant information.
Navigate to Platform Management.
In the left navigation bar, click on Storage Management > Persistent Volumes (PV).
Click on Create Persistent Volume.
Refer to the instructions below and configure the parameters before clicking Create.
Type | Parameter | Description |
---|---|---|
HostPath | Path | The path to the directory of files on the node backing the storage volume. For example: /etc/kubernetes . |
NFS Shared Storage | Server Address | The access address of the NFS server. |
Path | The mount path of the NFS file system on the server node, such as /nfs/data . | |
NFS Protocol Version | The currently supported NFS protocol versions on the platform are v3 , v4.0 , and v4.1 . You can execute nfsstat -s on the server side to view version information. |
Access modes of the persistent volume influenced by the relevant parameters set by the backend storage.
Access Mode | Meaning |
---|---|
ReadWriteOnce (RWO) | Can be mounted as read-write by a single node. |
ReadWriteMany (RWX) | Can be mounted as read-write by multiple nodes. |
ReadOnlyMany (ROX) | Can be mounted as read-only by multiple nodes. |
Reclaim Policy | Meaning |
---|---|
Delete | Deletes the persistent volume claim at the same time deletes the bound persistent volume, as well as the backend storage volume resource. Note: The reclaim policy for PV of type NFS Shared Storage does not support Delete. |
Retain | Even when the persistent volume claim is deleted, the bound persistent volume and storage data will still be retained. Manual handling of the storage data and deletion of the persistent volume will be required thereafter. |
You can click the ⋮ on the right of the list page or click the Operations in the upper right corner of the details page to update or delete the persistent volume as needed.
Deleting a persistent volume is applicable in the following two scenarios:
Deleting an unbound persistent volume: Has not been written to and is no longer required for writing, thus freeing up corresponding storage space upon deletion.
Deleting a Retained persistent volume: The persistent volume claim has been deleted, but due to the retain reclaim policy, it has not been deleted simultaneously. If the data in the persistent volume has been backed up to other storage or is no longer needed, deleting it can also free up corresponding storage space.