すべてのプロダクト
Search
ドキュメントセンター

Container Service for Kubernetes:承認のベストプラクティス

最終更新日:Feb 12, 2025

Container Service for Kubernetes (ACK) の承認システムは、RAM (Resource Access Management) 承認とRBAC (role-based access control) 承認で構成されています。 RAM権限は、クラウドリソースに対する権限を付与するために使用されます。 RBAC権限付与は、クラスター内のKubernetesリソースに対する権限を付与するために使用されます。 2つの方法を使用して、ユーザーの役割と要件に基づいてユーザーに権限を付与できます。 このトピックでは、RAM権限付与とRBAC権限付与を使用して、O&Mエンジニア、開発者、および権限付与管理者にクラスターとアプリケーションを管理する権限を付与するためのベストプラクティスについて説明します。

承認システム

ACKの認証システムは、RAM認証とRBAC認証で構成されています。 RAM権限は、クラウドリソースに対する権限を付与するために使用されます。 RBAC権限付与は、クラスター内のKubernetesリソースに対する権限を付与するために使用されます。 ACKの認可システムを次の図に示します。

image
  • RAM権限付与: RAMのシステムポリシーとカスタムポリシーに基づいています。この認可システムは、ACKおよびその他のAlibaba CloudサービスのAPI操作に対する権限を付与して、次のO&M操作をサポートするために使用されます。

    • クラスターを作成、表示、アップグレード、および削除します。

    • ノードプールを作成、変更、スケールします。

    • 認証を管理します。

    • クラスターを監視し、ログとイベントを収集します。

  • RBAC認証: Kubernetes RBACに基づいています。 この認証システムは、O&M操作をサポートするために、ACKクラスター内のKubernetesリソースに対する権限を付与するために使用されます。 ほとんどの場合、RBAC権限を使用して、次のKubernetesリソースオブジェクトを追加、削除、変更、およびクエリする権限を付与できます。

    • ワークロードリソース: Deployment、StatefulSet、DaemonSet、Job、CronJob、pod、ReplicaSet。

    • ネットワークリソース: サービス、Ingress、およびNetworkPolicy。

    • ストレージリソース: 永続ボリューム (PV) 、永続ボリュームクレーム (PVC) 、およびStorageClass。

    • 名前空間、ConfigMap、およびシークレット。

シナリオ1: O&Mエンジニアにクラスターとアプリケーションを管理する権限を付与する

O&Mエンジニアには、クラスターとアプリケーションを管理および保守するための権限が必要です。 RAM権限付与とRBAC権限付与を実行する必要があります。

  1. RAM権限付与

    AliyunCSFullAccessおよびAliyunCSReadOnlyAccess RAMポリシーを使用して、ACK関連の権限を付与できます。

    • AliyunCSFullAccessには、ACKのすべてのAPI操作を呼び出す権限が含まれています。

    • AliyunCSReadOnlyAccessには、読み取り専用アクセスのためにACKのAPI操作を呼び出す権限が含まれています。

    RAMコンソールのRAMユーザーまたはRAMロールにAliyunCSFullAccessまたはAliyunCSReadOnlyAccessポリシーをアタッチできます。 詳細については、「RAMユーザーへの権限の付与」および「RAMロールへの権限の付与」をご参照ください。

    きめ細かいアクセス制御が必要な場合は、カスタムポリシーをアタッチできます。 詳細については、「RAMを使用してクラスターとクラウドリソースにアクセスする権限を付与する」をご参照ください。

    この場合、使用するRAMユーザーまたはRAMロールに次のポリシーをアタッチできます。 RAMポリシーのRAMアクションの詳細については、「アクションの説明」をご参照ください。

    {
      "Version": "1",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "cs:GetClusters",
            "cs:ModifyCluster",
            "cs:UpgradeCluster",
            "cs:DescribeClusterDetail",
            "cs:DescribeClusterVuls",
            "cs:DescribeClusterSecuritySummary",
            "cs:DescribeClusterUserKubeconfig",
            "cs:RevokeK8sClusterKubeConfig",
            "cs:CheckControlPlaneLogEnable",
            "cs:DescribeClusterResources",
            "cs:DescribeClusterEvents",
            "cs:DescribeClusterLogs",
            "cs:GetClusterAuditProject",
            "cs:ListClusterChecks",
            "cs:GetClusterCheck",
            "cs:RunClusterCheck",
            "cs:ModifyClusterAudit",
            "cs:DescribeResourcesDeleteProtection", 
            "cs:UpdateResourcesDeleteProtection",
            "cs:DescribeClusterNodePools",
            "cs:DescribeClusterNodePoolDetail",
            "cs:CreateClusterNodePool",
            "cs:ModifyClusterNodePool",
            "cs:UpgradeClusterNodepool",
            "cs:DeleteClusterNodepool",
            "cs:CreateAutoscalingConfig",
            "cs:SyncClusterNodePool",
            "cs:RepairClusterNodePool",
            "cs:AttachInstancesToNodePool",
            "cs:ModifyNodePoolNodeConfig",
            "cs:DescribeClusterNodes",
            "cs:RemoveClusterNodes",
            "cs:RemoveNodePoolNodes",
            "cs:DiagnoseClustersNode",
            "cs:DescribeNodePoolVuls",
            "cs:FixNodePoolVuls",
            "cs:DrainNodes",
            "cs:DescribeClusterAddonMetadata",
            "cs:DescribeClusterAddonsVersion",
            "cs:InstallClusterAddons",
            "cs:UpgradeClusterAddons",
            "cs:ModifyClusterAddon",
            "cs:UnInstallClusterAddons",
            "cs:DescribeClusterAddonInstance",
            "cs:DescribeClusterAddonsUpgradeStatus",
            "cs:DescribeClusterAddonUpgradeStatus",
            "cs:ListClusterComponent",
            "cs:GetClusterComponent",
            "cs:DescribePolicyInstances",
            "cs:DeployPolicyInstance",
            "cs:ModifyPolicyInstance",
            "cs:DeletePolicyInstance",
            "cs:DescribePolicyGovernanceInCluster",
            "cs:DescribePolicyInstancesStatus",
            "cs:UpdateContactGroupForAlert",
            "cs:StartAlert",
            "cs:StopAlert",
            "cs:ListAlertRules",
            "cs:GetAlertHistory",
            "cs:DescribeClusterTasks",
            "cs:GetClusterBasicInfo",
            "cs:ListClusterReportSummary",
            "cs:GetClusterReportSummary",
            "cs:ListReportTaskRule",
            "cs:CreateTrigger",
            "cs:DescribeKubernetesClusterHookTrigger",
            "cs:CreateDiagnose",
            "cs:CreateClusterOverviewReport",
            "cs:GetAIDiagnosisResult",
            "cs:CreateReportTaskRule",
            "cs:CreateClusterReport",
            "cs:GetClusterCheckResult",
            "cs:GetClusterServices",
            "cs:UpdateControlPlaneLog",
            "cs:UpdateClusterName"
          ],
          "Resource": "acs:cs:*:*:cluster/xxxxx"  # Replace xxxxx with the ID of your cluster. 
        },
        {
          "Effect": "Allow",
          "Action": [
            "cs:DescribeSubAccountHelmPermission",
            "cs:CheckServiceRole",
            "cs:DeleteTriggerHook",
            "cs:QueryAlertContact",
            "cs:QueryAlertContactGroup",
            "cs:AddOrUpdateAlertContact",
            "cs:AddOrUpdateAlertContactGroup",
            "cs:DeleteAlertContact",
            "cs:DeleteAlertContactGroup",
            "cs:DescribeKubernetesVersionMetadata",
            "cs:ListOperationPlans",
            "cs:DescribeClusterEndpoints",
            "cs:DescribeTaskInfo",
            "cs:DescribeEvents",
            "cs:PauseTask",
            "cs:CancelTask",
            "cs:DescribeAddons",
            "cs:DeleteReportTaskRule",
            "cs:CreateSessionMessage",
            "cs:DescribePolicies",
            "cs:DescribePolicyDetails"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "vpc:DescribeVSwitches",
            "vpc:DescribeVpcs",
            "vpc:DescribeEipAddresses"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": "kms:ListKeys",
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "arms:ListDashboards",
            "arms:InstallAddon"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudshell:CreateEnvironment",
            "cloudshell:AttachStorage",
            "cloudshell:DetachStorage",
            "cloudshell:CreateSession"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ess:DescribeScalingActivities",
            "ess:DescribeScalingActivityDetail",
            "ess:DescribeLifecycleActions"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": "oos:ListExecutions",
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:DescribeKeyPairs",
            "ecs:DescribeInstances",
            "ecs:DescribeSecurityGroups",
            "ecs:DescribeImages",
            "ecs:DescribePrice"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "cr:ListInstance",
            "cr:ListInstanceDomain",
            "cr:ListRepository",
            "cr:ListArtifactTag"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": "ram:GetRole",
          "Resource": "acs:ram:*:*:role/aliyuncisdefaultrole"
        },
        {
          "Effect": "Allow",
          "Action": [
            "log:GetDashboard",
            "log:GetSavedSearch",
            "log:GetLogStore",
            "log:GetIndex",
            "log:UpdateIndex",
            "log:GetLogStoreLogs",
            "log:CreateDashboardSharing",
            "log:ListProject",
            "log:GetProjectLogs",
            "log:GetResourceRecord",
            "log:CreateResourceRecord",
            "log:UpdateResourceRecord"
          ],
          "Resource": "*"
        }
      ]
    }

    ACK APIの詳細については、「 [製品の変更] ACK APIによるユーザー認証の強化」および「関数別の操作のリスト」をご参照ください。

  2. RBAC権限付与

    RAM権限付与を実行した後、RAMユーザーまたはRAMロールに対してRBAC権限付与を実行する必要があります。 次の表に、ACKによって提供される事前定義されたRBACロールを示します。

    ロール

    クラスターリソースに対するRBAC権限

    管理者

    すべての名前空間のリソースに対する読み取りおよび書き込み権限。

    O&Mエンジニア

    すべての名前空間のコンソールに表示されているKubernetesリソースに対する読み取りおよび書き込み権限、およびノード、永続ボリューム (PV) 、名前空間、クォータに対する読み取り専用権限。

    開発者

    コンソールのすべての名前空間または特定の名前空間の表示されているリソースに対する読み取りおよび書き込み権限。

    制限付きユーザー

    すべての名前空間または特定の名前空間のコンソールに表示されるリソースに対する読み取り専用の権限。

    1. ACKコンソールにログインします。 左側のナビゲーションウィンドウで、[権限付与] をクリックします。

    2. [権限付与] ページで、権限付与されたオブジェクトに基づいて、[RAMユーザー] または [RAMロール] タブをクリックします。 許可されたオブジェクトを見つけ、[操作] 列の [権限の変更] をクリックします。

    3. 表示されるパネルで、[+ 権限の追加] をクリックし、目的のクラスターと名前空間の [O&M Engineer] を選択し、[送信] をクリックします。

      RBAC

    定義済みのロールを割り当てると、RAMユーザーまたはRAMロールのClusterRoleBindingオブジェクトが自動的に作成されます。 次のサンプルコードは、O&Mエンジニアロールによって提供される権限を示しています。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: cs:ops
    rules:
    - apiGroups: [""]
      resources:  ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: [""]
      resources:  ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: [""]
      resources:  ["bindings", "events", "limitranges", "namespaces/status", "replicationcontrollers/status", "pods/log", "pods/status", "resourcequotas", "resourcequotas/status", "componentstatuses"]
      verbs: ["get", "list", "watch"]
    - apiGroups: [""]
      resources:  ["namespaces", "nodes", "persistentvolumes"]
      verbs: ["get", "list", "watch", "patch"]
    - apiGroups: ["coordination.k8s.io"]
      resources:  ["leases"]
      verbs: ["get"]
    - apiGroups: ["apps"]
      resources:  ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["autoscaling"]
      resources:  ["horizontalpodautoscalers"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["batch"]
      resources:  ["cronjobs", "jobs"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["extensions"]
      resources:  ["daemonsets", "deployments", "deployments/rollback", "deployments/scale","ingresses","replicasets", "replicasets/scale", "replicationcontrollers/scale"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["networking.k8s.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["servicecatalog.k8s.io"]
      resources:  ["clusterserviceclasses", "clusterserviceplans", "clusterservicebrokers", "serviceinstances", "servicebindings"]
      verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["servicecatalog.k8s.io"]
      resources:  ["clusterservicebrokers/status", "clusterserviceclasses/status", "clusterserviceplans/status", "serviceinstances/status", "serviceinstances/reference", "servicebindings/status",]
      verbs: ["update"]
    - apiGroups: ["storage.k8s.io"]
      resources:  ["storageclasses"]
      verbs: ["get", "list", "watch"]
    - apiGroups: ["alicloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["policy"]
      resources:  ["poddisruptionbudgets"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["metrics.k8s.io"]
      resources: ["pods", "nodes"]
      verbs: ["get", "watch", "list"]
    - apiGroups: ["networking.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["config.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["rbac.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["istio.alibabacloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["authentication.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["log.alibabacloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["monitoring.kiali.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["kiali.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["apiextensions.k8s.io"]
      resources: ["customresourcedefinitions"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["serving.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["eventing.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["messaging.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["sources.eventing.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["tekton.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["alert.alibabacloud.com"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]

    きめ細かいアクセス制御が必要な場合は、カスタムClusterRoleを作成できます。 詳細は、「RBAC」をご参照ください。 カスタムClusterRoleを作成したら、ACKコンソールの [権限] ページに移動し、[カスタム] を選択し、ドロップダウンリストから作成したClusterRoleを選択します。 詳細については、「カスタムRBACロールを使用してクラスター内のリソース操作を制限する」をご参照ください。

シナリオ2: クラスターとアプリケーションを管理する権限を開発者に付与する

開発者は、ACKクラスターでKubernetesリソースを管理するための権限のみを必要とします。 したがって、RBAC認証のみを実行する必要があります。

重要

権限付与を実行する前に、RAMユーザーまたはRAMロールにRAMポリシーをアタッチして、RAMユーザーまたはRAMロールにACKへの読み取り専用アクセスを許可する必要があります。

  1. 完全なRAM権限付与

    RAMコンソールに移動し、カスタムポリシーを作成します。 次に、使用するRAMユーザーまたはRAMロールにポリシーをアタッチします。 詳細については、「RAMを使用したクラスターとクラウドリソースへのアクセス許可」をご参照ください。 例:

    {
      "Statement": [
        {
          "Action": [
            "cs:GetClusters",
            "cs:DescribeClusterDetail",
            "cs:GetClusterAuditProject",
            "cs:DescribeResourcesDeleteProtection"
          ],
          "Resource": "acs:cs:*:*:cluster/xxxxx",   #Replace this parameter with the ID of your cluster.
          "Effect": "Allow"
        }
      ],
      "Version": "1"
    }
    
    説明

    すべてのACKクラスターに対してRAMユーザーまたはRAMロールに読み取り専用権限を付与するには、RAMユーザーまたはRAMロールにAliyunCSReadOnlyAccessポリシーをアタッチします。

  2. RBAC権限付与

    1. ACKコンソールにログインします。 左側のナビゲーションウィンドウで、[権限付与] をクリックします。

    2. [権限付与] ページで、権限付与されたオブジェクトに基づいて、[RAMユーザー] または [RAMロール] タブをクリックします。 許可されたオブジェクトを見つけ、[操作] 列の [権限の変更] をクリックします。

    3. 表示されるパネルで、[権限の追加] をクリックし、目的のクラスターと名前空間の開発者を選択し、[送信] をクリックします。

      developer

    定義済みのロールを割り当てると、RAMユーザーまたはRAMロールのClusterRoleBindingオブジェクトが自動的に作成されます。 次のサンプルコードは、開発者ロールによって提供される権限を示しています。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: cs:ns:dev
    rules:
    - apiGroups: [""]
      resources:  ["pods", "pods/attach", "pods/exec", "pods/portforward", "pods/proxy"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: [""]
      resources:  ["configmaps", "endpoints", "persistentvolumeclaims", "replicationcontrollers", "replicationcontrollers/scale", "secrets", "serviceaccounts", "services", "services/proxy"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: [""]
      resources:  ["events", "replicationcontrollers/status", "pods/log", "pods/status"]
      verbs: ["get", "list", "watch"]
    - apiGroups: ["apps"]
      resources:  ["daemonsets", "deployments", "deployments/rollback", "deployments/scale", "replicasets", "replicasets/scale", "statefulsets"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["autoscaling"]
      resources:  ["horizontalpodautoscalers"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["batch"]
      resources:  ["cronjobs", "jobs"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["extensions"]
      resources:  ["daemonsets", "deployments", "deployments/rollback", "deployments/scale","ingresses","replicasets", "replicasets/scale", "replicationcontrollers/scale"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["networking.k8s.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["servicecatalog.k8s.io"]
      resources:  ["clusterserviceclasses", "clusterserviceplans", "clusterservicebrokers", "serviceinstances", "servicebindings"]
      verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["servicecatalog.k8s.io"]
      resources:  ["clusterservicebrokers/status", "clusterserviceclasses/status", "clusterserviceplans/status", "serviceinstances/status", "serviceinstances/reference", "servicebindings/status",]
      verbs: ["update"]
    - apiGroups: ["alicloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["policy"]
      resources:  ["poddisruptionbudgets"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["networking.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["config.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["rbac.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["istio.alibabacloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["authentication.istio.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["log.alibabacloud.com"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["monitoring.kiali.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["kiali.io"]
      resources:  ["*"]
      verbs: ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]
    - apiGroups: ["apiextensions.k8s.io"]
      resources: ["customresourcedefinitions"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["serving.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["eventing.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["messaging.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["sources.eventing.knative.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["tekton.dev"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]
    - apiGroups: ["alert.alibabacloud.com"]
      resources: ["*"]
      verbs: ["get", "list", "create", "watch", "patch", "update", "delete", "deletecollection"]

    きめ細かいアクセス制御が必要な場合は、カスタムClusterRoleを作成できます。 詳細は、「RBAC」をご参照ください。 カスタムClusterRoleを作成したら、ACKコンソールの [権限] ページに移動し、[カスタム] を選択し、ドロップダウンリストから作成したClusterRoleを選択します。 詳細については、「カスタムRBACロールを使用してクラスター内のリソース操作を制限する」をご参照ください。

シナリオ3: 権限付与管理者にRAMユーザーとRAMロールの権限を管理する権限を付与する

権限管理者には、他のRAMユーザーとRAMロールのRBAC権限を管理する権限が必要です。 デフォルトでは、RAMユーザーまたはRAMロールを使用して、他のRAMユーザーまたはRAMロールにRBAC権限を付与することはできません。 ACKコンソールコンソールの [承認] ページで、次のメッセージが表示されます。 Alibaba Cloudアカウントの所有者または許可されたRAMユーザーに連絡して、権限を要求してください。 これは、使用するRAMユーザーに必要なRAM権限とRBAC権限がないことを示します。

  1. 完全なRAM権限付与

    使用するRAMユーザーまたはRAMロールにアタッチされているポリシーに、次の権限を追加する必要があります。

    • 同じAlibaba Cloudアカウントに属する他のRAMユーザーまたはRAMロールを照会します。

    • RAMユーザーまたはRAMロールのRBAC権限を照会します。

    • 他のRAMユーザーまたはRAMロールにRBAC権限を付与します。

    RAMコンソールにログインし、RAMユーザーまたはRAMロールに権限を付与します。 詳細については、「カスタムRBACロールを使用してクラスター内のリソース操作を制限する」をご参照ください。 例:

    {
      "Statement": [
        {
          "Action": [
            "ram:ListRoles",
            "ram:ListUserBasicInfos",
            "cs:GetClusters",
            "cs:DescribeUserPermission",
            "cs:DescribeClusterDetail",
            "cs:GrantPermissions",
            "cs:UpdateUserPermissions",
            "cs:GetClusterAuditProject",
            "cs:DescribeResourcesDeleteProtection",
            "cs:UpdateResourcesDeleteProtection",
            "cs:DescribeClusterAddonUpgradeStatus"
          ],
          "Resource": "*",
          "Effect": "Allow"
        }
      ],
      "Version": "1"
    }
    
  2. 完全なRBAC認証

    1. ACKコンソールにログインします。 左側のナビゲーションウィンドウで、[権限付与] をクリックします。

    2. [権限付与] ページで、権限付与されたオブジェクトに基づいて、[RAMユーザー] または [RAMロール] タブをクリックします。 許可されたオブジェクトを見つけ、[操作] 列の [権限の変更] をクリックします。

    3. 表示されるパネルで、[+ 権限の追加] をクリックし、[管理者] または [cluster-admin] を選択してから、目的のクラスターと名前空間のカスタムを選択し、[送信] をクリックします。

    説明

    デフォルトでは、Alibaba Cloudアカウントとクラスター所有者にcluster-adminロールが割り当てられ、クラスター内のすべてのKubernetesリソースにフルアクセスできます。

    cluster-admin

RAMユーザーまたはRAMロールに対してRAM権限付与およびRBAC権限付与を実行した後、RAMユーザーまたはRAMロールを使用して、指定したスコープ内で有効になる他のRAMユーザーまたはRAMロールにRBAC権限を付与できます。 詳細については、「RBACを使用したクラスター内のリソースに対する操作権限の管理」をご参照ください。