Skip to content

Table of Contents generated with DocToc

AWS EFS Storage Configuration Example

Prerequisite

  • Refer to the AWS EFS guide for details.
  • EFS storage configuration requires the following cluster configuration data:
  • cluster node VPC ID
  • VPC security group IDs for the master node and worker nodes as well as the default security group

Update default security group to enable EFS access

  • Edit the cluster default security group inbound rules
  • Add NFS rule for master node security group
  • Add NFS rule for worker node security group

Creating EFS Storage

  • From the AWS UI console, go to Services->EFS
  • Create file system
  • Select Customize
  • From the Virtual Private Cloud (VPC) panel, select the VPC associated with the cluster master node.
  • Use default settings for the other options

Deploying EFS provisioner in the AWS cluster

  • Log in to the AWS cluster
  • Create a script called efs-helm.sh with the following code:
    FSID=<EFS File system ID>  # Get from Amazon EFS File systems list
    REGION=<EFS Region>        # for example, use `us-east-2` for region us-east-2a/b/c
    
    helm install efs-provisioner \
        --namespace default \
        --set  efsProvisioner.efsFileSystemId=${FSID} \
        --set efsProvisioner.awsRegion=${REGION} \
        efs-provisioner-0.13.2.tgz
    
  • Run efs-helm.sh script to deploy the efs provisioner
  • Update the efs storage class as default storage
  • remove the current default storage class from gp2
  • edit sc aws-efs and add the following settings in the YAML to set it as the default storage class.
      annotations:
        storageclass.kubernetes.io/is-default-class: "true"