워크로드 아이덴티티를 사용하면 클러스터의 애플리케이션마다 고유하고 세분화된 ID와 승인을 할당할 수 있습니다. 워크로드 아이덴티티는 AWS용 GKE 내에서 실행되는 애플리케이션이 AWS 및 Google Cloud 서비스에 액세스하는 데 권장되는 방법입니다.
모든 GKE 클러스터에는 워크로드 아이덴티티가 사용 설정되어 있습니다.
Kubernetes 서비스 계정
워크로드 아이덴티티는 ID 통합을 구현합니다. 또는 신뢰 및 역할을 외부 제공업체에 위임합니다. 각 클러스터에는 기본 제공되는 Open ID Connect(OIDC) 제공업체가 포함되어 있습니다. 클러스터에서 포드가 실행될 때는 Kubernetes 서비스 계정을 사용하여 실행됩니다.
바인드된 서비스 계정 토큰 볼륨을 사용하여 Kubernetes 서비스 계정에 대해 단기 사용자 인증 정보가 포함된 토큰을 가져오도록 포드를 구성할 수 있습니다.
OpenID Connect 제공업체
각 클러스터는 Open ID Connect(OIDC) 제공업체로 작동할 수 있습니다. 이 제공업체를 통해 OIDC를 사용하는 ID 통합을 지원하는 서비스에 Kubernetes 서비스 계정 사용자 인증 정보를 제공할 수 있습니다.
이 제공업체의 발급자 URI는 또한 OIDC 검색 엔드포인트로 사용됩니다. 서비스는 이 검색 엔드포인트를 사용하여 JSON 웹 키 집합(JWKS)을 가져올 수 있습니다. 이 키 집합은 Kubernetes 서비스 계정 사용자 인증 정보를 확인할 수 있게 해주는 공개 키 정보를 제공합니다.
Google Cloud IAM ID 풀 및 공급업체
Google Cloud IAM은 OIDC를 사용하는 ID 제휴를 지원합니다.
모든 GKE 클러스터는 워크로드 아이덴티티 풀 PROJECT_ID.svc.id.goog에서 ID 공급업체로 구성됩니다.
AWS IAM은 OIDC를 사용하는 ID 통합을 지원합니다.
워크로드의 서비스 계정 ID를 사용해서 AWS에 액세스하려면 AWS IAM에서 OIDC 제공업체 만들기를 수행해야 합니다. 기본적으로 AWS용 GKE는 AWS IAM의 ID 공급업체로 구성되지 않습니다.
워크로드 아이덴티티의 대안
AWS용 GKE에서 서비스에 액세스하기 위해서는 대안 방법이 있습니다.
다음 방법은 너무 복잡해서 권장되지 않습니다.
사용자 인증 정보를 내보내고 이를 Kubernetes 보안 비밀로 저장합니다. 이 경우 AWS IAM 및 클러스터 모두에서 저장된 사용자 인증 정보를 수동으로 순환해야 합니다. 또한 공격자가 사용자 인증 정보를 도용한 경우 악용 가능성이 있습니다.
노드 풀의 기본 인스턴스에 사용자 인증 정보를 연결합니다. 이 경우 동일 노드에서 실행되는 모든 워크로드가 사용자 인증 정보를 공유합니다. 그 결과 워크로드에 필요한 것보다 더 많은 권한 집합이 제공될 수 있습니다. 인스턴스 권한으로 액세스를 제한하기 위해 GKE 클러스터는 포드에서 인스턴스 메타데이터 서비스로의 액세스를 차단합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-31(UTC)"],[],[],null,["# Workload identity overview\n\n*Workload identity* enables you to assign distinct, fine-grained identities and\nauthorization for each application in your cluster. Workload identity is the\nrecommended way for applications running within GKE on AWS to access\nAWS and Google Cloud services.\n\nAll GKE clusters have workload identity enabled.\n\nKubernetes service accounts\n---------------------------\n\nWorkload identity implements *identity federation* , or delegating trust or roles\nto an external provider. Each cluster has a built-in OpenID Connect (OIDC)\nprovider. When a Pod runs in the cluster, it runs using a\n[Kubernetes service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/).\nThe Pod can be configured to obtain a token with short-lived credentials for\nits Kubernetes service account using a\n[Bound Service Account Token Volume](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume).\n\nOpenID Connect providers\n------------------------\n\nEach cluster can act as an\n[OpenID Connect (OIDC)](https://openid.net/connect/) provider. With\nthis provider, you can provide Kubernetes service account credentials to\nservices that support identity federation using OIDC.\n\nThis provider's issuer URI also serves as an OIDC discovery endpoint. Services\ncan use this discovery endpoint to obtain the JSON Web Key Set (JWKS), which\nprovides public key information that allows them to verify Kubernetes service\naccount credentials.\n\nGoogle Cloud IAM identity pools and providers\n---------------------------------------------\n\nGoogle Cloud IAM supports\n[identity federation using OIDC](https://cloud.google.com/iam/docs/workload-identity-federation).\nAll GKE clusters are configured as identity providers in the\nworkload identity pool \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.svc.id.goog`.\n\nTo get the name of your workload identity pool and providers, see\n[Use workload identity with Google Cloud](/kubernetes-engine/multi-cloud/docs/aws/how-to/use-workload-identity-google#determine_the_workload_identity_pool_for_your_cluster).\n\nAWS IAM identity providers\n--------------------------\n\nAWS IAM supports\n[identity federation using OIDC](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html).\nTo access AWS using a workload's service account identities,\nyou need to\n[create an OIDC provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html)\non AWS IAM. By default, GKE on AWS are not configured with an\nidentity provider for AWS IAM.\n\nAlternatives to workload identity\n---------------------------------\n\nThere are alternative methods to access services from GKE on AWS.\nWe don't recommended the following methods due to complications.\n\n1. Export credentials and store them as Kubernetes Secrets. In this case,\n you must rotate stored credentials manually in both AWS IAM and\n in your cluster. Additionally, if an attacker steals credentials, they can\n exploit them.\n\n2. Attach credentials to the node pools's underlying instances. In this case,\n all workloads running on the same node share the credentials,\n which can result in a greater set of permissions than workloads might\n need. To block access to an instance's permissions, GKE clusters\n blocks access from a Pod to the instance metadata service.\n\nWhat's next\n-----------\n\n- [Using workload identity with Google Cloud services](/kubernetes-engine/multi-cloud/docs/aws/how-to/use-workload-identity-google)\n- [Using workload identity with AWS](/kubernetes-engine/multi-cloud/docs/aws/how-to/use-workload-identity-aws)\n- Learn more about [Workload identity federation](/iam/docs/workload-identity-federation#pools)"]]