Is it possible to use AWS EFS access points to mount a kubernetes persistent volume in EKS?

4/23/2020

First of all to put some context on that question.

  • I have an EKS cluster with version >= 1.15
  • The EFS - EKS security group / mount target etc. are working properly
  • The CSI driver for EFS in EKS is installed and work as expected
  • I have deployed a storage class called efs-sc using the EFS CSI driver as a provisioner
  • I can access the EFS volume on the pod

But ... it only works if it is the root path / that is defined as the path in the kubernetes persistent volume resource definition.

Example with Terraform 0.12 syntax

resource "kubernetes_persistent_volume" "vol" {
  metadata {
    name = "my-vol"
  }
  spec {
    capacity = {
      storage = "15Gi"
    }
    access_modes = ["ReadWriteMany"]
    storage_class_name = "efs-sc"
    persistent_volume_reclaim_policy = "Recycle"
    persistent_volume_source {
      nfs {
        path = "/" # -> OK it works properly
        # path = "/access-point-path" -> NOT WORKING
        server = var.efs-storage-apt-server
      }
    }
  }
}

When I try to specify the path of my access point the mounting of the volume fails.

The efs access point is configured like this

enter image description here

So is it a limitation? Did I miss something?

I was looking about this solution efs-provisioner but I don't see what this will solve from this current configuration.

-- Asa
amazon-web-services
efs
eks
kubernetes
terraform

0 Answers