Deploy an Application
If all verification steps in the preceding stages were satisfied, then Replicated PV Mayastor has been successfully deployed within the cluster. In order to verify basic functionality, we will now dynamically provision a Persistent Volume based on a Replicated PV Mayastor StorageClass, mount that volume within a small test pod which we'll create, and use the Flexible I/O Tester utility within that pod to check that I/O to the volume is processed correctly.
#
Define the PVCUse kubectl
to create a PVC based on a StorageClass that you created in the previous stage. In the example shown below, we will consider that StorageClass to have been named "mayastor-1". Replace the value of the field "storageClassName" with the name of your own Replicated PV Mayastor-based StorageClass.
For the purposes of this quickstart guide, it is suggested to name the PVC "ms-volume-claim", as this is what will be illustrated in the example steps which follow.
Command
YAML
If you used the storage class example from previous stage, then volume binding mode is set to WaitForFirstConsumer
. That means, that the volume won't be created until there is an application using the volume. We will go ahead and create the application pod and then check all resources that should have been created as part of that in kubernetes.
#
Deploy the FIO Test PodThe Replicated PV Mayastor CSI driver will cause the application pod and the corresponding Replicated PV Mayastor volume's NVMe target/controller ("Nexus") to be scheduled on the same Replicated PV Mayastor Node, in order to assist with restoration of volume and application availabilty in the event of a storage node failure.
Command (GitHub Latest)
YAML
#
Verify the Volume and the DeploymentWe will now verify the Volume Claim and that the corresponding Volume and Replicated PV Mayastor Volume resources have been created and are healthy.
#
Verify the Volume ClaimThe status of the PVC should be "Bound".
Command
Example Output
#
Verify the Persistent Volumeinfo
Substitute the example volume name with that shown under the "VOLUME" heading of the output returned by the preceding "get pvc" command, as executed in your own cluster.
Command
Example Output
#
Verify the Replicated PV Mayastor VolumeThe status of the volume should be "online".
info
To verify the status of volume Kubectl plugin is used.
Command
Example Output
#
Verify the ApplicationVerify that the pod has been deployed successfully, having the status "Running". It may take a few seconds after creating the pod before it reaches that status, proceeding via the "ContainerCreating" state.
info
The example FIO pod resource declaration included with this release references a PVC named ms-volume-claim
, consistent with the example PVC created in this section of the quickstart. If you have elected to name your PVC differently, deploy the Pod using the example YAML, modifying the claimName
field appropriately.
Command
Example Output
#
Run the FIO Tester ApplicationWe now execute the FIO Test utility against the Replicated PV Mayastor for 60 seconds, checking that I/O is handled as expected and without errors. In this quickstart example, we use a pattern of random reads and writes, with a block size of 4k and a queue depth of 16.
Command
Example Output
If no errors are reported in the output then PV has been correctly configured and is operating as expected.