How to Specify the Posix user GID/UID when using EFS CSI in dynamic AP-mode in EKS

1

In a stock EKS cluster, with aws-efs-csi-driver installed, and using the dynamic provisioning storage class, how do we force a specific GID/UID when volumes are created? Thought here is we would probably have more than one sc pointing to the efs. One that is 100% dynamic, just storage, and one (or more) that have a defined gid/uid they pass onto the created EFS Access Point.

**Edit: I mean the POSIX UID and GID. Such as when in the AWS console, creating an access point by hand, the User UID/GID, and then the Owner UID/GID.

https://github.com/kubernetes-sigs/aws-efs-csi-driver

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: efs-sc
provisioner: efs.csi.aws.com
parameters:
  provisioningMode: efs-ap
  fileSystemId: fs-someRandomJunkHere
  directoryPerms: "700"
  gidRangeStart: "1000" # optional
  gidRangeEnd: "2000" # optional
  basePath: "/dynamic_provisioning" # optional
  subPathPattern: "${.PVC.namespace}/${.PVC.name}" # optional
  ensureUniqueDirectory: "true" # optional
  reuseAccessPoint: "false" # optional
1개 답변
2
수락된 답변

Hello,

Greetings for the day!!

From your correspondence I can understand that you would like to know how to pass a specific GID or UID (POSIX) when using dynamic provisioning with EFS CSI on an EKS cluster.

The EFS CSI driver now supports dynamic provisioning with the ability to specify the user ID and group ID to enforce user identity for all EFS requests. Here is the github page for the EFS CSI driver outlining the parameters that can be set[1a][1b] and the supporting EKS documentation[2]. Parameters named 'uid' and 'gid' are applicable in this case.

Additionally, you can also provide a rand using the parameters 'gidRangeStart' and 'gidRangeEnd' as per[1b]. This range parameters are also specified in the sample you have shared.

Also, the github issue for this feature which is now closed: https://github.com/kubernetes-sigs/aws-efs-csi-driver/issues/393

Have a fantastic day ahead!!

Reference:

[1a] - https://github.com/kubernetes-sigs/aws-efs-csi-driver

[1b] - https://github.com/kubernetes-sigs/aws-efs-csi-driver#storage-class-parameters-for-dynamic-provisioning

[2] - https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html

AWS
답변함 7달 전
profile picture
전문가
검토됨 2달 전
  • Okay. Im not sure how many time I read right over that block. I usually skipped to the bottom where it was all about the start/end of uid/gid.

    Thank you!!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠