배경 : StorageClass 기반으로 pvc 생성 시 발생 메세지

메시지 : waiting for a volume to be created, either by external provisioner "ebs.csi.aws.com" or manually created by system administrator

 

해결책은 다음 절차대로 실행한다.

 

Step1.

eksctl 설치 (자세한 방법은 생략)

 

Step2. (명령어)

eksctl utils associate-iam-oidc-provider --region=(리전) --cluster=(클러스터이름) --approve

 

Step3. (YAML)

eksctl create iamserviceaccount \
  --region (리전) \
  --name ebs-csi-controller-sa \
  --namespace kube-system \
  --cluster (클러스터이름) \
  --attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
  --approve \
  --role-only \
  --role-name AmazonEKS_EBS_CSI_DriverRole

Step4. (명령어)

eksctl create addon --name aws-ebs-csi-driver --cluster (클러스터이름) --service-account-role-arn arn:aws:iam::$(aws sts get-caller-identity --query Account --output text):role/AmazonEKS_EBS_CSI_DriverRole --region (리전) --force

 

끝.