Configuring NVME local device setup for AWS

Before you begin

Setup AWS EKS cluster following this tutorial until step 6 of section Deploy a database instance on your Amazon EKS cluster.

Procedure

  1. Deploy the openebs-lite operator:
    kubectl apply -f https://openebs.github.io/charts/openebs-operator-lite.yaml 
    kubectl apply -f https://openebs.github.io/charts/openebs-lite-sc.yaml
  2. Deploy the Storage Class using the spec, BlockDeviceSelectors, as this spec needs to use the NVME node group:
    cat << EOF | kubectl apply -f -
    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: local-device
      annotations:
        openebs.io/cas-type: local
        cas.openebs.io/config: |
          - name: StorageType
            value: device
          - name: FSType
            value: ext4
          - name: BlockDeviceSelectors
            data:
               eks.amazonaws.com/nodegroup: "${NODE_GROUP}"
    provisioner: openebs.io/local
    reclaimPolicy: Delete
    volumeBindingMode: WaitForFirstConsumer
    EOF
    Note: Replace ​${NODE_GROUP} with the name that was selected for nodegroup when NVME node groups are created as part of pre-requisites tutorial.