이 페이지에서는 Google Cloud에서 AWS용 GKE에 대한 AWS Identity and Access Management(IAM) 권한과 역할을 관리하는 방법을 설명합니다.
AWS용 GKE는 AWS API를 사용하여 EC2 인스턴스, 자동 확장 그룹, AWS용 GKE 구성요소와 워크로드 모두를 위한 부하 분산기와 같은 리소스를 만듭니다. 이러한 리소스를 만들려면 AWS IAM 권한을 Google Cloud에 제공해야 합니다.
AWS용 GKE에서 AWS API에 액세스하는 방법
AWS용 GKE는 AWS의 ID 제휴를 사용하여 AWS 계정에 대한 세부 조정된 액세스 권한을 관리합니다. AWS용 GKE가 클러스터에 작업을 수행해야 하는 경우 AWS에서 단기 토큰을 요청합니다. GKE Multi-Cloud API 역할은 이 토큰을 사용하여 AWS에 인증합니다.
서비스 에이전트
AWS 계정에서 클러스터를 만들고 업데이트하고 삭제하며 관리할 수 있는 액세스 권한을 Google Cloud에 부여하기 위해 AWS용 GKE는 Google Cloud 프로젝트에 서비스 에이전트를 만듭니다. 서비스 에이전트는 GKE Multi-Cloud API AWS IAM 역할을 사용하는 Google 관리 서비스 계정입니다.
GKE 클러스터를 관리하는 Google Cloud 프로젝트마다 서비스 에이전트에 대한 AWS IAM 역할을 만들어야 합니다.
서비스 에이전트에는 이메일 주소 service-PROJECT_NUMBER@gcp-sa-gkemulticloud.iam.gserviceaccount.com이 사용됩니다.
Google Cloud IAM 권한에 대한 자세한 내용은 Anthos 멀티 클라우드 서비스 에이전트를 참조하세요.
AWS용 GKE의 AWS IAM 권한
기본 AWS IAM 역할을 사용하는 역할을 만들거나 조직 요구사항을 충족시키는 고유한 커스텀 AWS IAM 정책을 만들 수 있습니다.
기본 정책 사용
AWS IAM 정책은 권한의 집합입니다. 클러스터를 만들고 관리할 수 있는 권한을 부여하려면 먼저 다음 역할에 대해 AWS IAM 정책을 만들어야 합니다.
GKE Multi-Cloud API 서비스 에이전트 역할
GKE Multi-Cloud API는 이 AWS IAM 역할을 사용해서 AWS API를 사용하여 리소스를 관리합니다.
이 역할은 서비스 에이전트라고 하는 Google 관리 서비스 계정에 사용됩니다.
제어 영역 AWS IAM 역할
클러스터 제어 영역은 이 역할을 사용해서 노드 풀을 제어합니다.
노드 풀 AWS IAM 역할
제어 영역은 이 역할을 사용하여 노드 풀 VM을 만듭니다.
AWS용 GKE에 권장되는 AWS IAM 역할을 사용하여 클러스터를 관리하려면 AWS IAM 역할 만들기를 참조하세요.
커스텀 IAM 정책 만들기
권장되는 정책을 사용하는 대신 권한을 더 제한하려면 AWS용 GKE를 허용하는 커스텀 AWS IAM 정책을 만들면 됩니다. 예를 들어 특정 태그를 사용하는 리소스 또는 특정 AWS VPC의 리소스로 권한을 제한할 수 있습니다.
태그로 액세스 제어
AWS 태그를 사용하여 제한된 리소스 집합에서만 작업을 허용하도록 AWS IAM 정책을 제한할 수 있습니다. 조건 필드에 지정된 태그를 사용하는 역할은 동일한 태그를 사용하는 리소스로 작업이 제한됩니다.
이를 사용하여 특정 클러스터 또는 노드 풀의 리소스 작업으로 관리 역할을 제한할 수 있습니다.
특정 태그가 있는 리소스에만 적용되도록 AWS IAM 정책을 제한하려면 정책의 Condition 필드에 태그 값을 포함한 후 클러스터 및 노드 풀을 만들 때 이 태그 값을 전달합니다. AWS용 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"]],["최종 업데이트: 2024-06-27(UTC)"],[],[],null,["# About AWS IAM roles\n\nThis page describes how Google Cloud manages AWS Identity and Access\nManagement (IAM) permissions and roles for your GKE on AWS.\n\nGKE on AWS uses the AWS API to create resources such as EC2 instances,\nauto-scaling groups, and load balancers for both GKE on AWS components and\nyour workloads. You must provide Google Cloud with AWS IAM permissions to\ncreate these resources.\n\nHow GKE on AWS accesses the AWS API\n-----------------------------------\n\nGKE on AWS uses\n[identity federation in AWS](https://aws.amazon.com/identity/federation/)\nto manage fine-grained access to your AWS account. When GKE on AWS\nneeds to take an action for your cluster, it requests a short-lived token\nfrom AWS. The [GKE Multi-Cloud API role](#api-role) uses this token to authenticate\nto AWS.\n\nService agents\n--------------\n\nIn order to grant Google Cloud access to create, update, delete, and\nmanage clusters in your AWS account, GKE on AWS creates a\n[*Service agent*](/iam/docs/service-agents) in your Google Cloud project. The\nservice agent is a\n[Google-managed service account](/iam/docs/service-account-types#google-managed) that\nuses the [GKE Multi-Cloud API AWS IAM role](#api-role).\nYou must create an AWS IAM role for the\nservice agent in each Google Cloud project where you manage GKE clusters from.\nThe service agent uses the email address\n`service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-gkemulticloud.iam.gserviceaccount.com`.\nFor more information on the Google Cloud IAM permissions,\nsee\n[Anthos Multi-Cloud Service Agent](/iam/docs/understanding-roles#gkemulticloud.serviceAgent).\n\nAWS IAM permissions for GKE on AWS\n----------------------------------\n\nYou can create roles that use default AWS IAM roles, or create your own\ncustom AWS IAM policies that meet your organization's requirements.\n\n### Use default policies\n\nAn AWS IAM policy is a collection of permissions. To grant permissions to\ncreate and manage clusters, you must first create AWS IAM\npolicies for the following roles:\n\nGKE Multi-Cloud API service agent role\n: The GKE Multi-Cloud API uses this AWS IAM role to manage resources using AWS APIs.\n This role is used by a Google-managed service account known as a\n [service agent](/iam/docs/service-agents).\n\nControl plane AWS IAM role\n: Your cluster control plane uses this role to control node pools.\n\nNode pool AWS IAM role\n: The control plane uses this role to create node pool VMs.\n\nTo use suggested AWS IAM roles for GKE on AWS to manage clusters,\nsee [Create AWS IAM roles](/kubernetes-engine/multi-cloud/docs/aws/how-to/create-aws-iam-roles).\n\n### Create custom IAM policies\n\nTo further restrict permissions, instead of using suggested policies you can\ncreate custom AWS IAM policies that allow GKE on AWS. For example, you can\nrestrict permissions to permissions to resources with a certain tag, or\nresources in a specific AWS VPC\n\n#### Controlling access with tags\n\nYou can restrict AWS IAM policies to allow actions only on a limited set of\nresources, using AWS tags. Any role with that tag specified in its\ncondition field will be restricted to operating on resources with the same tag.\nYou can use this to restrict administrative roles to acting on resources in a\nspecific cluster or node pool.\n\nTo restrict an AWS IAM policy to apply only to resources with a specific tag,\ninclude the tag's value in the `Condition` field of the policy, then pass the\ntag value when you create your cluster and node pools. GKE on AWS\napplies this tag when it creates resources.\n\nFor more information on tags, see\n[Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).\nFor more information on using tags with an AWS policy, see\n[Controlling access to AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html#access_tags_control-resources).\n\nFor more on creating cluster resources with a particular tag, see the\n[`gcloud container aws clusters create`](/sdk/gcloud/reference/container/aws/clusters/create#--tags)\nand\n[`gcloud container aws node-pools create`](/sdk/gcloud/reference/container/aws/node-pools/create#--tags)\nreference documentation.\n\nFor a list of specific permissions that GKE on AWS needs for each policy,\nsee the [AWS IAM role list](/kubernetes-engine/multi-cloud/docs/aws/reference/aws-iam-role-list)."]]