Dynamic and static provisioning
The section provides some examples of dynamic and static provisioning. For more examples, see https://github.com/weka/csi-wekafs/tree/main/examples.
Dynamic provisioning
Dynamic provisioning means defining a persistent volume claim (PVC) for the pods using a storage class similar to the storage class described in the Storage class configuration section.
Procedure
Create a PVC yaml file (see the following example).
Apply the PVC yaml file and validate it is created successfully.
Persistent volume claim parameters
Parameter | Description |
---|---|
| Defines the access mode for the volume. Possible values include:
|
| Storage class for PV creation. Specifies the storage class to be used when creating the Persistent Volume (PV). The storage class must already exist. |
| Required capacity for the volume. The specified capacity is not enforced but is recorded as a quota within the filesystem directory's extended attributes for future reference. |
The directory is created in the filesystem under the csi-volumes
directory starting with the volume name.
Static provisioning
The Kubernetes admin can prepare persistent volumes in advance to be used by pods. The persistent volume must be an existing directory, and can contain pre-populated data used by the PODs.
The persistent volume can be a directory previously provisioned by the CSI or a an existing directory in the WEKA filesystem.
To expose an existing directory in the WEKA filesystem through the CSI, define a persistent volume, and bind the persistent volume claim to this persistent volume.
You can use an existing storage class from dynamic provisioning for static provisioning. However, the Persistent Volume parameters (filesystemName
, filesystemGroupName
, and volumeType
) will override those in the storage class.
Procedure
Create a PV yaml file (see the following example).
Apply the PV yaml file and validate it is created successfully.
Persistent volume parameters
Parameter | Description |
---|---|
| The volume access mode.
Possible values: |
| The storage class to use to create the PV. The storage class must exist. |
| A required capacity for the volume. The capacity quota is not enforced but is stored on the filesystem directory extended and attributed for future use. |
| The path previously created.
A string containing the The filesystem and path must exist in the WEKA cluster. |
Bind a PVC to this specific PV using the
volumeName
parameter under the PVCspec
and provide it with the specific PV name.
Persistent volume claim for static provisioning
Parameter | Description |
---|---|
| The volume access mode.
Possible values: |
| The storage class to use to create the PVC.
It must be the same storage class as the PV requested to bind in |
| The required capacity for the volume. The capacity quota is not enforced but is stored on the filesystem directory extended and attributed for future use. |
| The name of a pre-configured persistent volume. The persistent volume name must exist. |
Validate that the PVC resource is created and successfully bounded (the status is
Bound
).
Last updated