Verify VAST CSI Driver Deployment

Prev Next

To verify your VAST CSI Driver deployment, test it by launching an application using a Persistent Volume Claim (PVC).

In the following example, VAST CSI Driver will create a PVC by provisioning a volume of 1Gi from VAST using the vastdata-filesystem storage class. It will create a set of 5 pods running an application consisting of Docker containers with mounts to that volume. The application is a shell program that appends a date to a text file.

To verify the deployment with a test application:

  1. Create a Kubernetes YAML configuration file for a PVC as follows:

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: vast-pvc-1
    spec:
      accessModes:
      - ReadWriteMany
      resources:
        requests:
          storage: 1Gi
      storageClassName: vastdata-filesystem
  2. Apply the PVC configuration file:

    kubectl apply -f <filename>.yaml
  3. Verify that the PVC has been created with the following commands:

    kubectl get pvc
    kubectl get pv
  4. Create a Kubernetes YAML configuration file for the test application:

    kind: StatefulSet
    apiVersion: apps/v1
    metadata:
      name: test-app-1
    spec:
      serviceName: "test-service-1"
      replicas: 5
      selector:
        matchLabels:
          app: test-app-1
      template:
        metadata:
          labels:
            app: test-app-1
            role: test-app-2
        spec:
          containers:
            - name: my-frontend
              image: busybox
              volumeMounts:
              - mountPath: "/shared"
                name: my-shared-volume
              command: [ '/bin/sh', '-c', 'while true; do date -Iseconds >> /shared/$HOSTNAME; sleep 1; done' ]
          volumes:
            - name: my-shared-volume
              persistentVolumeClaim:
                claimName: vast-pvc-1
  5. Apply the test application configuration file:

    kubectl apply -f <filename>.yaml
  6. Monitor the VAST Cluster path specified in the definition of the vastdata-filesystem storage class. You will see a PVC per container, in this example 5. In each, a date will be appended to a text file.