Kubernetes

Amazon EFS CSI Driver

DevelopC 2022. 9. 23. 09:13
728x90

Amazon EFS CSI Driver

kubernetes에서 AWS EFS 사용을 위해 Amazon EFS CSI Driver 설치해야 합니다. efs-csi-node daemonset과 efs-csi-controller deployment로 구성되어있습니다.

Install

helm을 사용하여 설치합니다. AWS의 IAM Role을 생성하고, policy 를 참고하여 권한 설정을 해야 합니다.

# values.yaml

replicaCount: 3
controller:
  serviceAccount:
    create: true
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::${ACCOUNT_ID}:role/efs-csi-controller

node:
  serviceAccount:
    create: true
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::${ACCOUNT_ID}:role/efs-csi-node
$ helm repo add aws-efs-csi-driver https://kubernetes-sigs.github.io/aws-efs-csi-driver/
$ helm repo update
$ helm upgrade --install aws-efs-csi-driver -n amazon-efs -f values.yaml aws-efs-csi-driver/aws-efs-csi-driver

주의사항

EFS는 생성 시 VPC 및 Subnet을 선택하고, EFS생성이 완료되면 ENI가 할당됩니다. 만약 서로 다른 VPC에서 EFS를 사용하고자 할 때 VPC Peering설정을 해주셔야 합니다. 그리고 Securiy Group에 통신할 수 있게 inbound / outbound 룰을 설정해주셔야 합니다.

참고

 

GitHub - kubernetes-sigs/aws-efs-csi-driver: CSI Driver for Amazon EFS https://aws.amazon.com/efs/

CSI Driver for Amazon EFS https://aws.amazon.com/efs/ - GitHub - kubernetes-sigs/aws-efs-csi-driver: CSI Driver for Amazon EFS https://aws.amazon.com/efs/

github.com

 

728x90