Skip to content

Local storage

This file provides examples on how a Kubernetes cluster and helm deployment can be configured to utilize AWS EBS backed volumes.

Dynamic provisioning

Due to the ephemeral nature of Kubernetes pods we advise dynamic provisioning be used for creating and consuming EBS volume(s).

Prerequisites

Ensure the EBS CSI driver is installed within the k8s cluster, you can confirm this by running:

kubectl get csidriver
the output of the above command should include the named driver ebs.csi.aws.com for example:
NAME              ATTACHREQUIRED   PODINFOONMOUNT   MODES        AGE
ebs.csi.aws.com   true             false            Persistent   5d1h
If not present the EBS driver can be installed using the following instructions here.

Provisioning

  1. Create a Storage Class
  2. Update values.yaml to utilise Storage Class

1. Create Storage Class

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: ebs-sc
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer

2. Update values.yaml

Update the localHome storageClassName value within values.yaml to the name of the Storage Class created in step 1 above

volumes:
  localHome:
    persistentVolumeClaim:
      create: true
      storageClassName: "ebs-sc"

Resources

Some useful resources on provisioning local storage with the AWS CSI Driver


Product installation

Creating the local home volume is the final step in provisioning the required infrastructure. You can now move onto the next step, Installation.