Verify VAST COSI Driver Deployment

Prev Next

To verify your VAST COSI Driver deployment, provision a bucket on the VAST cluster and prepare credentials for accessing the bucket:

  1. Create a Kubernetes YAML configuration file that defines bucket access:

    kind: BucketAccessClass
    apiVersion: objectstorage.k8s.io/v1alpha1
    metadata:
     name: sample-bac
    driverName: csi.vastdata.com
    authenticationType: KEY
    ---
    kind: BucketAccess
    apiVersion: objectstorage.k8s.io/v1alpha1
    metadata:
     name: sample-access
    spec:
     bucketClaimName: sample-bucket
     bucketAccessClassName: sample-bac
     credentialsSecretName: my-super-secret
    ---
    kind: BucketClaim
    apiVersion: objectstorage.k8s.io/v1alpha1
    metadata:
     name: sample-bucket
    spec:
     bucketClassName: vastdata-bucket
     protocols:
     - s3
  2. Apply the bucket access configuration file:

    kubectl apply -f <filename>.yaml
  3. Verify that a newly created bucket vastdata-bucket is displayed as a view in the VAST Cluster's Web UI.

  4. Verify that the newly created user named vastdata-bucket is displayed in the VAST Cluster's Web UI.

  5. Verify that a newly created Kubernetes secret my-super-secret is listed in the output of the following command:

    kubectl get secret
  6. Create a Kubernetes YAML configuration file for a pod that uses the newly created Kubernetes secret:

    apiVersion: v1
    kind: Pod
    metadata:
     name: awscli
    spec:
     containers:
       - name: awscli
         image: amazon/aws-cli
         command: ["sleep"]
         args: ["9999999999"]
         volumeMounts:
           - name: cosi-secrets
             mountPath: /data/cosi
             readOnly: true
     volumes:
     - name: cosi-secrets
       secret:
         secretName: my-super-secret
  7. Apply the pod configuration file:

    kubectl apply -f <filename>.yaml
  8. Verify the content of the Kubernetes secret:

    kubectl exec -it awscli cat /data/cosi/BucketInfo

    The JSON output lists the VAST Cluster endpoint, the access key and the secret key, which can be used to access the newly created bucket.