Before you begin

The following are required to install the helm chart:

  1. One separate VM or a bare metal server
  2. AWS OpenShift cluster
  3. The Helm tool (v3+)
  4. The oc tool
  5. Storage class

StorageClass configuration

Skip this section if you have already configured the EFS StorageClass.

A ‘StorageClass’ allows your k8s administrators to describe the “classes” of storage they offer. The StorageClass contains the fields provisioner, parameters, and reclaimPolicy, which are used when a PersistentVolume (PV) belonging to the class needs to be dynamically provisioned.

For using the PersistenceVolume, you must first deploy an AWS Elastic File System (EFS) helm chart. Deploying the AWS EFS helm chart will automatically create a custom StorageClass.

Installing the EFS for the AWS OpenShift cluster

If you are not using the EFS for storage, you can skip this section.

Before deploying the EFS helm chart, you must follow these steps:

  • Create your EFS file system. See Create Your Amazon EFS File System for information on creating a file system.
  • Create a mount target. See Creating mount targets for information on creating a mount target.
  • You need to add a stable helm repository to your helm client as shown below:

helm repo add stable https://charts.helm.sh/stable

  • Provide the efsFileSystemId and region and install the chart with the helm-deploy name as aws-efs.

helm install aws-efs stable/efs-provisioner --set efsProvisioner.efsFileSystemId=fs-12345678 --set efsProvisioner.awsRegion=us-east-2

  • You must mark the aws-efs storage class with the default annotation so that the PersistentVolumeClaim objects (without a StorageClass specified) will trigger dynamic provisioning:

oc patch storageclass aws-efs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

  • There has to be only one storage class with default setting, so you must remove the other storage classes with default settings:

oc patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'

  • After deploying the efs helm chart, execute the command:

oc get storageclass

storage class screenshot

Next Step