이 영역을 누르면 첫 페이지로 이동
h0lymoly 경험 저장소 블로그의 첫 페이지로 이동

h0lymoly 경험 저장소

페이지 맨 위로 올라가기

h0lymoly 경험 저장소

삽질 해결 - EKS Pod Identity-Agent 관련(With EBS-CSI-Driver) 삽질

  • 2025.09.18 22:34
  • 에러 & 삽질


개요


테라폼으로 aws-ebs-csi-driver 애드온을 배포하고, IRSA 를 통하여 EBS-CSI-Driver의 정상 동작을 확인하였습니다.

이후, OIDC Provider 연결이 작업이 번거로워 Pod Identity 방식으로 전환을 시도하였는데 그때 발생한 이슈를 정리하였습니다.

 

 

EBS-CSI-Driver와 Pod Identity Agent는 이미 애드온 형태로 배포된 상태.

 

 

EKS Pod Identity에서 요구하는 신뢰 정책으로 IAM 역할 생성 완료된 상태.

 

 

네임스페이스와 서비스 어카운트에 맞게 IAM 역할 연결이 완료된 상태.

 

 

그러나, 아래와 같이 배포한 pvc 상태를 확인하면 pending 상태이고 아래와 같이 403 권한 에러가 발생.

[ec2-user@ip-??-???-?-??? ~]$ k get pv
NAME        STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS
ebs-claim   Pending                                      gp3            <unset>

 

 

 

$ k describe pvc
Name:          ebs-claim
Namespace:     default
StorageClass:  gp3
Status:        Pending
Volume:
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com
               volume.kubernetes.io/selected-node: ip-??-???-??-???.us-west-2.compute.internal
               volume.kubernetes.io/storage-provisioner: ebs.csi.aws.com
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Used By:       app
Events:
  Type     Reason                Age               From                                                                                      Message
  ----     ------                ----              ----                                                                                      -------
  Warning  ProvisioningFailed    11s               persistentvolume-controller                                                               storageclass.storage.k8s.io "gp3" not found
  Warning  ProvisioningFailed    10s               ebs.csi.aws.com_ebs-csi-controller-??????  failed to provision volume with StorageClass "gp3": rpc error: code = Internal desc = Could not create volume "pvc-?????": could not create volume in EC2: operation error EC2: CreateVolume, get identity: get credentials: failed to refresh cached credentials, failed to retrieve credentials, operation error STS: AssumeRoleWithWebIdentity, https response error StatusCode: 403, RequestID: a749af29-?????, api error AccessDenied: Not authorized to perform sts:AssumeRoleWithWebIdentity
  Warning  ProvisioningFailed    9s                ebs.csi.aws.com_ebs-csi-controller-??????  failed to provision volume with StorageClass "gp3": rpc error: code = Internal desc = Could not create volume "pvc-?????": could not create volume in EC2: operation error EC2: CreateVolume, get identity: get credentials: failed to refresh cached credentials, failed to retrieve credentials, operation error STS: AssumeRoleWithWebIdentity, https response error StatusCode: 403, RequestID: a749af29-?????, api error AccessDenied: Not authorized to perform sts:AssumeRoleWithWebIdentity

 

 

해결


Pod Identity Agent 을 사용해 권한을 부여해 준 뒤, 해당 서비스의 컨트롤러(Controller)는 재시작이 필요함.

$ kubectl rollout restart -n kube-system deploy ebs-csi-controller

 

 

EBS CSI Drvier 재시작 후에는 아래와 같이 정상적으로 pvc 가 Bound 상태로 변경되는 것이 확인.

[ec2-user@ip-??-???-?-??? ~]$ k get pvc
NAME        STATUS   VOLUME    CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS
ebs-claim   Bound    pvc-????   1Gi        RWO            gp3

 

참고


  • https://ss00story.tistory.com/84

 

'에러 & 삽질' 카테고리의 다른 글

삽질 해결 - VPC Flow Log format 사용자 지정 형식(Custom) 삽질  (0) 2025.03.19
에러 해결 - User not authorized to perform kms:CreateGrant operation  (0) 2025.03.15
삽질 해결 - aws_iam_policy_attachment 삭제 시, 정책과 연결된 Group/Role/User의 정책 연결 해제 방지 방안  (0) 2025.03.02

댓글

이 글 공유하기

  • 구독하기

    구독하기

  • 카카오톡

    카카오톡

  • 라인

    라인

  • 트위터

    트위터

  • Facebook

    Facebook

  • 카카오스토리

    카카오스토리

  • 밴드

    밴드

  • 네이버 블로그

    네이버 블로그

  • Pocket

    Pocket

  • Evernote

    Evernote

다른 글

  • 삽질 해결 - VPC Flow Log format 사용자 지정 형식(Custom) 삽질

    삽질 해결 - VPC Flow Log format 사용자 지정 형식(Custom) 삽질

    2025.03.19
  • 에러 해결 - User not authorized to perform kms:CreateGrant operation

    에러 해결 - User not authorized to perform kms:CreateGrant operation

    2025.03.15
  • 삽질 해결 - aws_iam_policy_attachment 삭제 시, 정책과 연결된 Group/Role/User의 정책 연결 해제 방지 방안

    삽질 해결 - aws_iam_policy_attachment 삭제 시, 정책과 연결된 Group/Role/User의 정책 연결 해제 방지 방안

    2025.03.02
다른 글 더 둘러보기

정보

h0lymoly 경험 저장소 블로그의 첫 페이지로 이동

h0lymoly 경험 저장소

  • h0lymoly 경험 저장소의 첫 페이지로 이동

검색

메뉴

  • 홈
  • 태그
  • 방명록

카테고리

  • 분류 전체보기 (16)
    • Cloud (6)
      • AWS (6)
    • Kubernetes (0)
    • IaC (4)
      • Terraform (4)
    • 에러 & 삽질 (4)
    • Certification (1)
    • 일상 (1)

최근 글

인기 글

댓글

공지사항

아카이브

태그

  • EBS-CSI-Driver
  • hands-on
  • hcp terraform
  • EKS
  • Terraform
  • AWS
  • Migration Hub
  • Pod Identity

나의 외부 링크

정보

h0lymoly의 h0lymoly 경험 저장소

h0lymoly 경험 저장소

h0lymoly

블로그 구독하기

  • 구독하기
  • RSS 피드

방문자

  • 전체 방문자
  • 오늘
  • 어제

티스토리

  • 티스토리 홈
  • 이 블로그 관리하기
  • 글쓰기
Powered by Tistory / Kakao. © h0lymoly. Designed by Fraccino.

티스토리툴바