このページでは、GKE on AWS の AWS Identity and Access Management(IAM)の権限とロールを Google Cloud で管理する方法について説明します。
GKE on AWS は、AWS API を使用して、GKE on AWS コンポーネントとワークロードの両方に対して、EC2 インスタンス、自動スケーリング グループ、ロードバランサなどのリソースを作成します。これらのリソースを作成するには、 Google Cloud に AWS IAM 権限を付与する必要があります。
GKE on AWS が AWS API にアクセスする仕組み
GKE on AWS は、AWS の ID 連携を使用して AWS アカウントへのアクセスをきめ細かく管理します。GKE on AWS は、クラスタに対してアクションを実行する必要がある場合、有効期間が短いトークンを AWS にリクエストします。GKE Multi-Cloud API ロールは、このトークンを使用して AWS に対する認証を行います。
サービス エージェント
AWS アカウントでクラスタを作成、更新、削除、管理するためのアクセス権を Google Cloud に付与するため、GKE on AWS は 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 Multi-Cloud Service エージェントをご覧ください。
GKE on AWS の 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 を作成します。
GKE on AWS で推奨の AWS IAM ロールを使用してクラスタを管理するには、AWS IAM ロールを作成するをご覧ください。
カスタム IAM ポリシーを作成する
権限をさらに制限するには、推奨されるポリシーを使用する代わりに、GKE on AWS を許可するカスタム AWS IAM ポリシーを作成します。たとえば、特定のタグを持つリソースや特定の AWS VPC 内のリソースに対する権限に制限できます。
タグによるアクセス制御
AWS タグを使用すると、一部のリソースに対するアクションのみを許可するように AWS IAM ポリシーを制限できます。条件フィールドで指定されたタグを持つロールは、同じタグを持つリソースに対する操作に制限されます。これを使用すると、管理者ロールを特定のクラスタまたはノードプール内のリソースに対する操作に制限できます。
AWS IAM ポリシーを特定のタグを持つリソースにのみ適用するには、ポリシーの Condition フィールドにタグの値を指定し、クラスタとノードプールの作成時にタグ値を渡します。GKE on AWS は、リソースの作成時にこのタグを適用します。
[[["わかりやすい","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-08-30 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)."]]