내용으로 건너뛰기

클러스터에서 EKS Pod Identity를 활성화하려고 할 때 발생하는 “Unable to fetch credentials” 오류를 해결하려면 어떻게 해야 합니까?

2분 분량
0

Amazon Elastic Kubernetes Service(Amazon EKS) 클러스터를 사용하여 EKS Pod Identity를 사용하려고 합니다. 하지만 “Unable to fetch credentials” 오류가 표시됩니다.

해결 방법

참고: AWS Command Line Interface(AWS CLI) 명령을 실행할 때 오류가 발생하면 AWS CLI의 오류 해결을 참조하십시오. 또한 최신 AWS CLI 버전을 사용하고 있는지 확인하십시오.

Amazon EKS 클러스터에서 EKS Pod Identity를 활성화하려고 하면 다음 오류 중 하나가 표시될 수 있습니다.

  • "Error when retrieving credentials from container-role: Error retrieving metadata: Received error when attempting to retrieve container metadata: Read timeout on endpoint URL: http://169.254.170.23/v1/credentials"
  • "Unable to fetch credentials: error getting credentials to cache: unable to fetch credentials from EKS Auth: operation error EKS Auth"

오류를 해결하려면 다음 작업을 수행하십시오.

  • eks-pod-identity-agent 포드에서 로그를 검색하려면 다음 명령을 실행합니다.

    kubectl logs -f eks-pod-identity-agent -n kube-system
  • 프라이빗 클러스터를 사용하는 경우 AWS PrivateLink에서 eks-auth 엔드포인트를 허용해야 합니다.

  • 역할 설정을 확인하려면 애플리케이션 포드의 쉘을 열고 get-caller-identity AWS CLI 명령을 실행합니다.

    aws sts get-caller-identity
  • 방화벽이 eks-auth 엔드포인트를 차단하고 있지 않은지 확인합니다.

  • 프록시 구성을 사용하는 경우 다음 명령을 실행하여 EKS Pod Identity Agent https_proxy를 구성했는지 확인합니다.

    kubectl set env ds/eks-pod-identity-agent https_proxy="PROXY-URL" -n kube-system
AWS 공식업데이트됨 일 년 전
댓글 없음

관련 콘텐츠