IAM によるアクセス制御

AI Platform Pipelines は、機械学習(ML)パイプラインが Google Cloud リソースにアクセスするときにユーザー、グループ、サービスを認証するため、Identity and Access Management(IAM)のロールに依存します。

このドキュメントでは、次の作業に必要なロールについて説明します。

IAM のコンセプトと IAM の仕組みについて学習する。

AI Platform Pipelines の設定に必要なロール

AI Platform Pipelines をデプロイするには、プロジェクトの閲覧者(roles/viewer)と Kubernetes Engine 管理者(roles/container.admin)のロールが付与されている必要があります。閲覧者のロールでは、プロジェクト内のすべてのリソースに対する読み取りアクセス権が付与されます。Kubernetes Engine 管理者のロールでは、Kubernetes クラスタと Kubernetes API オブジェクトに対する完全アクセス権が付与されます。

最小権限の原則に従うには、きめ細かいアクセス権を使用するように AI Platform Pipelines クラスタを設定します。きめ細かいアクセス権を持つようにクラスタを設定するには、プロジェクトに対するサービス アカウント管理者(roles/iam.serviceAccountAdmin)のロールも付与する必要があります。サービス アカウント管理者のロールでは、IAM サービス アカウントの作成と構成を行うためのアクセス権が付与されます。

詳細については、IAM ロールのアクセス権の付与をご覧ください。

ロール 権限
閲覧者roles/viewer プロジェクト内の既存のリソースやデータを表示する(ただし変更は不可能)など、状態に影響しない読み取り専用アクションに必要な権限。

roles/container.admin

クラスタとその Kubernetes API オブジェクトを完全に管理するためのアクセス権を付与します。

ノードにサービス アカウントを設定するには、ノードが使用するユーザー管理サービス アカウントに対するサービス アカウント ユーザーのロール(roles/iam.serviceAccountUser)も必要です。

このロールを付与できる最下位レベルのリソース:

  • プロジェクト

container.*

  • container.apiServices.create
  • container.apiServices.delete
  • container.apiServices.get
  • container.apiServices.getStatus
  • container.apiServices.list
  • container.apiServices.update
  • container.apiServices.updateStatus
  • container.auditSinks.create
  • container.auditSinks.delete
  • container.auditSinks.get
  • container.auditSinks.list
  • container.auditSinks.update
  • container.backendConfigs.create
  • container.backendConfigs.delete
  • container.backendConfigs.get
  • container.backendConfigs.list
  • container.backendConfigs.update
  • container.bindings.create
  • container.bindings.delete
  • container.bindings.get
  • container.bindings.list
  • container.bindings.update
  • container.certificateSigningRequests.approve
  • container.certificateSigningRequests.create
  • container.certificateSigningRequests.delete
  • container.certificateSigningRequests.get
  • container.certificateSigningRequests.getStatus
  • container.certificateSigningRequests.list
  • container.certificateSigningRequests.update
  • container.certificateSigningRequests.updateStatus
  • container.clusterRoleBindings.create
  • container.clusterRoleBindings.delete
  • container.clusterRoleBindings.get
  • container.clusterRoleBindings.list
  • container.clusterRoleBindings.update
  • container.clusterRoles.bind
  • container.clusterRoles.create
  • container.clusterRoles.delete
  • container.clusterRoles.escalate
  • container.clusterRoles.get
  • container.clusterRoles.list
  • container.clusterRoles.update
  • container.clusters.connect
  • container.clusters.create
  • container.clusters.createTagBinding
  • container.clusters.delete
  • container.clusters.deleteTagBinding
  • container.clusters.get
  • container.clusters.getCredentials
  • container.clusters.impersonate
  • container.clusters.list
  • container.clusters.listEffectiveTags
  • container.clusters.listTagBindings
  • container.clusters.update
  • container.componentStatuses.get
  • container.componentStatuses.list
  • container.configMaps.create
  • container.configMaps.delete
  • container.configMaps.get
  • container.configMaps.list
  • container.configMaps.update
  • container.controllerRevisions.create
  • container.controllerRevisions.delete
  • container.controllerRevisions.get
  • container.controllerRevisions.list
  • container.controllerRevisions.update
  • container.cronJobs.create
  • container.cronJobs.delete
  • container.cronJobs.get
  • container.cronJobs.getStatus
  • container.cronJobs.list
  • container.cronJobs.update
  • container.cronJobs.updateStatus
  • container.csiDrivers.create
  • container.csiDrivers.delete
  • container.csiDrivers.get
  • container.csiDrivers.list
  • container.csiDrivers.update
  • container.csiNodeInfos.create
  • container.csiNodeInfos.delete
  • container.csiNodeInfos.get
  • container.csiNodeInfos.list
  • container.csiNodeInfos.update
  • container.csiNodes.create
  • container.csiNodes.delete
  • container.csiNodes.get
  • container.csiNodes.list
  • container.csiNodes.update
  • container.customResourceDefinitions.create
  • container.customResourceDefinitions.delete
  • container.customResourceDefinitions.get
  • container.customResourceDefinitions.getStatus
  • container.customResourceDefinitions.list
  • container.customResourceDefinitions.update
  • container.customResourceDefinitions.updateStatus
  • container.daemonSets.create
  • container.daemonSets.delete
  • container.daemonSets.get
  • container.daemonSets.getStatus
  • container.daemonSets.list
  • container.daemonSets.update
  • container.daemonSets.updateStatus
  • container.deployments.create
  • container.deployments.delete
  • container.deployments.get
  • container.deployments.getScale
  • container.deployments.getStatus
  • container.deployments.list
  • container.deployments.rollback
  • container.deployments.update
  • container.deployments.updateScale
  • container.deployments.updateStatus
  • container.endpointSlices.create
  • container.endpointSlices.delete
  • container.endpointSlices.get
  • container.endpointSlices.list
  • container.endpointSlices.update
  • container.endpoints.create
  • container.endpoints.delete
  • container.endpoints.get
  • container.endpoints.list
  • container.endpoints.update
  • container.events.create
  • container.events.delete
  • container.events.get
  • container.events.list
  • container.events.update
  • container.frontendConfigs.create
  • container.frontendConfigs.delete
  • container.frontendConfigs.get
  • container.frontendConfigs.list
  • container.frontendConfigs.update
  • container.horizontalPodAutoscalers.create
  • container.horizontalPodAutoscalers.delete
  • container.horizontalPodAutoscalers.get
  • container.horizontalPodAutoscalers.getStatus
  • container.horizontalPodAutoscalers.list
  • container.horizontalPodAutoscalers.update
  • container.horizontalPodAutoscalers.updateStatus
  • container.hostServiceAgent.use
  • container.ingresses.create
  • container.ingresses.delete
  • container.ingresses.get
  • container.ingresses.getStatus
  • container.ingresses.list
  • container.ingresses.update
  • container.ingresses.updateStatus
  • container.initializerConfigurations.create
  • container.initializerConfigurations.delete
  • container.initializerConfigurations.get
  • container.initializerConfigurations.list
  • container.initializerConfigurations.update
  • container.jobs.create
  • container.jobs.delete
  • container.jobs.get
  • container.jobs.getStatus
  • container.jobs.list
  • container.jobs.update
  • container.jobs.updateStatus
  • container.leases.create
  • container.leases.delete
  • container.leases.get
  • container.leases.list
  • container.leases.update
  • container.limitRanges.create
  • container.limitRanges.delete
  • container.limitRanges.get
  • container.limitRanges.list
  • container.limitRanges.update
  • container.localSubjectAccessReviews.create
  • container.localSubjectAccessReviews.list
  • container.managedCertificates.create
  • container.managedCertificates.delete
  • container.managedCertificates.get
  • container.managedCertificates.list
  • container.managedCertificates.update
  • container.mutatingWebhookConfigurations.create
  • container.mutatingWebhookConfigurations.delete
  • container.mutatingWebhookConfigurations.get
  • container.mutatingWebhookConfigurations.list
  • container.mutatingWebhookConfigurations.update
  • container.namespaces.create
  • container.namespaces.delete
  • container.namespaces.finalize
  • container.namespaces.get
  • container.namespaces.getStatus
  • container.namespaces.list
  • container.namespaces.update
  • container.namespaces.updateStatus
  • container.networkPolicies.create
  • container.networkPolicies.delete
  • container.networkPolicies.get
  • container.networkPolicies.list
  • container.networkPolicies.update
  • container.nodes.create
  • container.nodes.delete
  • container.nodes.get
  • container.nodes.getStatus
  • container.nodes.list
  • container.nodes.proxy
  • container.nodes.update
  • container.nodes.updateStatus
  • container.operations.get
  • container.operations.list
  • container.persistentVolumeClaims.create
  • container.persistentVolumeClaims.delete
  • container.persistentVolumeClaims.get
  • container.persistentVolumeClaims.getStatus
  • container.persistentVolumeClaims.list
  • container.persistentVolumeClaims.update
  • container.persistentVolumeClaims.updateStatus
  • container.persistentVolumes.create
  • container.persistentVolumes.delete
  • container.persistentVolumes.get
  • container.persistentVolumes.getStatus
  • container.persistentVolumes.list
  • container.persistentVolumes.update
  • container.persistentVolumes.updateStatus
  • container.petSets.create
  • container.petSets.delete
  • container.petSets.get
  • container.petSets.list
  • container.petSets.update
  • container.petSets.updateStatus
  • container.podDisruptionBudgets.create
  • container.podDisruptionBudgets.delete
  • container.podDisruptionBudgets.get
  • container.podDisruptionBudgets.getStatus
  • container.podDisruptionBudgets.list
  • container.podDisruptionBudgets.update
  • container.podDisruptionBudgets.updateStatus
  • container.podPresets.create
  • container.podPresets.delete
  • container.podPresets.get
  • container.podPresets.list
  • container.podPresets.update
  • container.podSecurityPolicies.create
  • container.podSecurityPolicies.delete
  • container.podSecurityPolicies.get
  • container.podSecurityPolicies.list
  • container.podSecurityPolicies.update
  • container.podSecurityPolicies.use
  • container.podTemplates.create
  • container.podTemplates.delete
  • container.podTemplates.get
  • container.podTemplates.list
  • container.podTemplates.update
  • container.pods.attach
  • container.pods.create
  • container.pods.delete
  • container.pods.evict
  • container.pods.exec
  • container.pods.get
  • container.pods.getLogs
  • container.pods.getStatus
  • container.pods.initialize
  • container.pods.list
  • container.pods.portForward
  • container.pods.proxy
  • container.pods.update
  • container.pods.updateStatus
  • container.priorityClasses.create
  • container.priorityClasses.delete
  • container.priorityClasses.get
  • container.priorityClasses.list
  • container.priorityClasses.update
  • container.replicaSets.create
  • container.replicaSets.delete
  • container.replicaSets.get
  • container.replicaSets.getScale
  • container.replicaSets.getStatus
  • container.replicaSets.list
  • container.replicaSets.update
  • container.replicaSets.updateScale
  • container.replicaSets.updateStatus
  • container.replicationControllers.create
  • container.replicationControllers.delete
  • container.replicationControllers.get
  • container.replicationControllers.getScale
  • container.replicationControllers.getStatus
  • container.replicationControllers.list
  • container.replicationControllers.update
  • container.replicationControllers.updateScale
  • container.replicationControllers.updateStatus
  • container.resourceQuotas.create
  • container.resourceQuotas.delete
  • container.resourceQuotas.get
  • container.resourceQuotas.getStatus
  • container.resourceQuotas.list
  • container.resourceQuotas.update
  • container.resourceQuotas.updateStatus
  • container.roleBindings.create
  • container.roleBindings.delete
  • container.roleBindings.get
  • container.roleBindings.list
  • container.roleBindings.update
  • container.roles.bind
  • container.roles.create
  • container.roles.delete
  • container.roles.escalate
  • container.roles.get
  • container.roles.list
  • container.roles.update
  • container.runtimeClasses.create
  • container.runtimeClasses.delete
  • container.runtimeClasses.get
  • container.runtimeClasses.list
  • container.runtimeClasses.update
  • container.scheduledJobs.create
  • container.scheduledJobs.delete
  • container.scheduledJobs.get
  • container.scheduledJobs.list
  • container.scheduledJobs.update
  • container.scheduledJobs.updateStatus
  • container.secrets.create
  • container.secrets.delete
  • container.secrets.get
  • container.secrets.list
  • container.secrets.update
  • container.selfSubjectAccessReviews.create
  • container.selfSubjectAccessReviews.list
  • container.selfSubjectRulesReviews.create
  • container.serviceAccounts.create
  • container.serviceAccounts.createToken
  • container.serviceAccounts.delete
  • container.serviceAccounts.get
  • container.serviceAccounts.list
  • container.serviceAccounts.update
  • container.services.create
  • container.services.delete
  • container.services.get
  • container.services.getStatus
  • container.services.list
  • container.services.proxy
  • container.services.update
  • container.services.updateStatus
  • container.statefulSets.create
  • container.statefulSets.delete
  • container.statefulSets.get
  • container.statefulSets.getScale
  • container.statefulSets.getStatus
  • container.statefulSets.list
  • container.statefulSets.update
  • container.statefulSets.updateScale
  • container.statefulSets.updateStatus
  • container.storageClasses.create
  • container.storageClasses.delete
  • container.storageClasses.get
  • container.storageClasses.list
  • container.storageClasses.update
  • container.storageStates.create
  • container.storageStates.delete
  • container.storageStates.get
  • container.storageStates.getStatus
  • container.storageStates.list
  • container.storageStates.update
  • container.storageStates.updateStatus
  • container.storageVersionMigrations.create
  • container.storageVersionMigrations.delete
  • container.storageVersionMigrations.get
  • container.storageVersionMigrations.getStatus
  • container.storageVersionMigrations.list
  • container.storageVersionMigrations.update
  • container.storageVersionMigrations.updateStatus
  • container.subjectAccessReviews.create
  • container.subjectAccessReviews.list
  • container.thirdPartyObjects.create
  • container.thirdPartyObjects.delete
  • container.thirdPartyObjects.get
  • container.thirdPartyObjects.list
  • container.thirdPartyObjects.update
  • container.thirdPartyResources.create
  • container.thirdPartyResources.delete
  • container.thirdPartyResources.get
  • container.thirdPartyResources.list
  • container.thirdPartyResources.update
  • container.tokenReviews.create
  • container.updateInfos.create
  • container.updateInfos.delete
  • container.updateInfos.get
  • container.updateInfos.list
  • container.updateInfos.update
  • container.validatingWebhookConfigurations.create
  • container.validatingWebhookConfigurations.delete
  • container.validatingWebhookConfigurations.get
  • container.validatingWebhookConfigurations.list
  • container.validatingWebhookConfigurations.update
  • container.volumeAttachments.create
  • container.volumeAttachments.delete
  • container.volumeAttachments.get
  • container.volumeAttachments.getStatus
  • container.volumeAttachments.list
  • container.volumeAttachments.update
  • container.volumeAttachments.updateStatus
  • container.volumeSnapshotClasses.create
  • container.volumeSnapshotClasses.delete
  • container.volumeSnapshotClasses.get
  • container.volumeSnapshotClasses.list
  • container.volumeSnapshotClasses.update
  • container.volumeSnapshotContents.create
  • container.volumeSnapshotContents.delete
  • container.volumeSnapshotContents.get
  • container.volumeSnapshotContents.getStatus
  • container.volumeSnapshotContents.list
  • container.volumeSnapshotContents.update
  • container.volumeSnapshotContents.updateStatus
  • container.volumeSnapshots.create
  • container.volumeSnapshots.delete
  • container.volumeSnapshots.get
  • container.volumeSnapshots.getStatus
  • container.volumeSnapshots.list
  • container.volumeSnapshots.update
  • container.volumeSnapshots.updateStatus

recommender.containerDiagnosisInsights.*

  • recommender.containerDiagnosisInsights.get
  • recommender.containerDiagnosisInsights.list
  • recommender.containerDiagnosisInsights.update

recommender.containerDiagnosisRecommendations.*

  • recommender.containerDiagnosisRecommendations.get
  • recommender.containerDiagnosisRecommendations.list
  • recommender.containerDiagnosisRecommendations.update

recommender.locations.*

  • recommender.locations.get
  • recommender.locations.list

recommender.networkAnalyzerGkeConnectivityInsights.*

  • recommender.networkAnalyzerGkeConnectivityInsights.get
  • recommender.networkAnalyzerGkeConnectivityInsights.list
  • recommender.networkAnalyzerGkeConnectivityInsights.update

recommender.networkAnalyzerGkeIpAddressInsights.*

  • recommender.networkAnalyzerGkeIpAddressInsights.get
  • recommender.networkAnalyzerGkeIpAddressInsights.list
  • recommender.networkAnalyzerGkeIpAddressInsights.update

resourcemanager.projects.get

resourcemanager.projects.list

roles/iam.serviceAccountAdmin

サービス アカウントを作成、管理します。

このロールを付与できる最下位レベルのリソース:

  • サービス アカウント

iam.serviceAccounts.create

iam.serviceAccounts.delete

iam.serviceAccounts.disable

iam.serviceAccounts.enable

iam.serviceAccounts.get

iam.serviceAccounts.getIamPolicy

iam.serviceAccounts.list

iam.serviceAccounts.setIamPolicy

iam.serviceAccounts.undelete

iam.serviceAccounts.update

resourcemanager.projects.get

resourcemanager.projects.list

ユーザーが管理するサービス アカウントで AI Platform Pipelines を実行するために必要なロール

Google Kubernetes Engine(GKE)クラスタ上の Pod は、GKE クラスタのサービス アカウントを使用して Google Cloud に対して認証を行います。AI Platform Pipelines の設定と使用を簡単に行えるように、AI Platform Pipelines によって作成された GKE クラスタでは https://www.googleapis.com/auth/cloud-platform アクセス スコープを持つデフォルトの Compute Engine サービス アカウントを使用します。このアクセス スコープは、プロジェクトで有効にした Google Cloud リソースと API への完全アクセス権を提供します。これによって、クラスタ上のワークロードで、Google Cloud への必要以上のアクセスが発生する可能性があります。

AI Platform Pipelines クラスタで実行するワークロードにきめ細かい権限を割り当てるには、クラスタのサービス アカウントを作成し、このサービス アカウントにプロジェクトに対する次のロールへのアクセス権を付与します。

  • モニタリング閲覧者: モニタリング閲覧者(roles/monitoring.viewer)のロールでは、モニタリング データと構成に対する読み取りアクセス権が付与されます。
  • モニタリング指標の書き込み: モニタリング指標の書き込み(roles/monitoring.metricWriter)のロールでは、クラスタで指標を書き込めるように書き込みアクセス権が付与されます。
  • ログ書き込み: ログ書き込み(roles/logging.logWriter)のロールでは、クラスタでログエントリを書き込むことが可能です。
  • ストレージ オブジェクト閲覧者: Container Registry に保存されるパイプライン用のカスタム コンテナ イメージを作成する場合は、AI Platform Pipelines クラスタに、プロジェクトに対する Storage オブジェクト閲覧者(roles/storage.objectViewer)のロールへのアクセス権を付与します。

また、ML パイプラインで使用する Google Cloud リソースまたは API へのアクセス権をサービス アカウントに付与する必要もあります。

ロール 役職 説明 権限

roles/monitoring.viewer

すべてのモニタリング データや構成に関する情報を取得して一覧表示するための読み取り専用アクセス権を付与します。

このロールを付与できる最下位レベルのリソース:

  • プロジェクト

cloudnotifications.activities.list

monitoring.alertPolicies.get

monitoring.alertPolicies.list

monitoring.dashboards.get

monitoring.dashboards.list

monitoring.groups.get

monitoring.groups.list

monitoring.metricDescriptors.get

monitoring.metricDescriptors.list

monitoring.monitoredResourceDescriptors.*

  • monitoring.monitoredResourceDescriptors.get
  • monitoring.monitoredResourceDescriptors.list

monitoring.notificationChannelDescriptors.*

  • monitoring.notificationChannelDescriptors.get
  • monitoring.notificationChannelDescriptors.list

monitoring.notificationChannels.get

monitoring.notificationChannels.list

monitoring.publicWidgets.get

monitoring.publicWidgets.list

monitoring.services.get

monitoring.services.list

monitoring.slos.get

monitoring.slos.list

monitoring.snoozes.get

monitoring.snoozes.list

monitoring.timeSeries.list

monitoring.uptimeCheckConfigs.get

monitoring.uptimeCheckConfigs.list

opsconfigmonitoring.resourceMetadata.list

resourcemanager.projects.get

resourcemanager.projects.list

stackdriver.projects.get

stackdriver.resourceMetadata.list

roles/monitoring.metricWriter

指標に対する書き込み専用アクセス権を付与します。これにより、Cloud Monitoring エージェントや、指標を送信する他のシステムに必要な権限が付与されます。

このロールを付与できる最下位レベルのリソース:

  • プロジェクト

monitoring.metricDescriptors.create

monitoring.metricDescriptors.get

monitoring.metricDescriptors.list

monitoring.monitoredResourceDescriptors.*

  • monitoring.monitoredResourceDescriptors.get
  • monitoring.monitoredResourceDescriptors.list

monitoring.timeSeries.create

roles/logging.logWriter

ログエントリを書き込むための権限を付与します。

このロールを付与できる最下位レベルのリソース:

  • プロジェクト

logging.logEntries.create

logging.logEntries.route

roles/storage.objectViewer

オブジェクトとそのメタデータ(ACL を除く)を閲覧するためのアクセス権を付与します。バケット内のオブジェクトを一覧表示することもできます。

このロールを付与できる最下位レベルのリソース:

  • バケット

resourcemanager.projects.get

resourcemanager.projects.list

storage.managedFolders.get

storage.managedFolders.list

storage.objects.get

storage.objects.list

ユーザーとして AI Platform Pipelines にアクセスするために必要なロール

AI Platform Pipelines クラスタにアクセスするには、各ユーザーに Kubernetes Engine クラスタ閲覧者(roles/container.clusterViewer)のロールと、Google Kubernetes Engine クラスタのサービス アカウントに対するサービス アカウント ユーザーのロールが付与されている必要があります。

ロール 役職 説明 権限

roles/container.clusterViewer

GKE クラスタを取得して一覧表示するためのアクセス権を付与します。

container.clusters.get

container.clusters.list

resourcemanager.projects.get

resourcemanager.projects.list

次のセクションに進んで、Kubernetes Engine クラスタ閲覧者のロールとサービス アカウント ユーザーのロールへのアクセス権をユーザーに付与する方法を学習します。

ユーザーに AI Platform Pipelines へのアクセスを許可する

次の手順を使用して、ユーザー アカウントに AI Platform Pipelines クラスタへのアクセス権を付与します。

  1. Google Cloud コンソールで AI Platform Pipelines を開きます。

    AI Platform Pipelines に移動

  2. AI Platform Pipelines クラスタを探します。以降のステップで使用できるように [クラスタ]と [ゾーン] の値をメモします。

  3. Cloud Shell セッションを開きます。

    Cloud Shell を開く

    Cloud Shell は、Google Cloud コンソールの下部にあるフレームに表示されます。Cloud Shell を使用してこのプロセスの残りを完了します。

  4. 次のコマンドを実行して、この Cloud Shell セッションでのデフォルトの Google Cloud プロジェクトを設定します。

    gcloud config set project PROJECT_ID
    

    PROJECT_ID は、実際の Google Cloud プロジェクト ID に置き換えます。

  5. 次のコマンドを実行して、GKE クラスタで使用するサービス アカウントを確認します。

    gcloud container clusters describe CLUSTER_NAME --zone ZONE \
    --format="flattened(nodePools[].config.serviceAccount)"
    

    以下を置き換えます。

    • CLUSTER_NAME: GKE クラスタの名前。
    • ZONE: クラスタが作成されたゾーン。

    レスポンスに、クラスタが default という名前のサービス アカウントを使用していることが示される可能性があります。この値は、Compute Engine のデフォルトのサービス アカウントを表します。次のコマンドを実行して、このサービス アカウントの完全な名前を確認します。

    gcloud iam service-accounts list \
    --filter "compute@developer.gserviceaccount.com"
    

    Compute Engine のデフォルトのサービス アカウントの詳細を確認してください。

  6. GKE クラスタのサービス アカウントに対するサービス アカウント ユーザーのロールをユーザー アカウントに付与します。

    gcloud iam service-accounts add-iam-policy-binding \
    SERVICE_ACCOUNT_NAME \
    --member=user:USERNAME \
    --role=roles/iam.serviceAccountUser
    

    以下を置き換えます。

    • SERVICE_ACCOUNT_NAME: 前の手順で確認した GKE クラスタのサービス アカウントの名前。サービス アカウント名は、*@*.gserviceaccount.com という形式になります。
    • USERNAME: Google Cloud のユーザー名。
  7. ユーザー アカウントにプロジェクトの GKE クラスタ閲覧者のロールへのアクセス権を付与します。

    gcloud projects add-iam-policy-binding PROJECT_ID \
    --member user:USERNAME --role roles/container.clusterViewer
    

    以下を置き換えます。

    • PROJECT_ID: Google Cloud プロジェクトの ID。
    • USERNAME: Google Cloud のユーザー名。