全部產品
Search
文件中心

Container Service for Kubernetes:添加授權

更新時間:Mar 07, 2026

使用診斷、巡檢服務或計算AI助手時,您需要為服務帳號授予特定的服務角色,容器智能營運和計算AI助手才能正常地調用相關服務(ECS、CS、VPC、SLB等),為您提供叢集檢查、智能診斷等服務。本文介紹容器智能營運與計算AI助手授權的授權方式和許可權說明。

適用範圍

阿里雲帳號(主帳號)和擁有系統管理權限的RAM使用者(子帳號)可以授權服務角色。

授權使用叢集檢查、叢集巡檢、叢集診斷功能

進入存取控制快速授權頁面,單擊確認授權建立角色AliyunCISDefaultRole並為該角色授予AliyunCISDefaultRolePolicy系統許可權,以訪問ECS、VPC、SLB等雲資源,為叢集提供診斷和巡檢等服務。

完成以上授權後,重新整理控制台即可使用容器智能營運服務。

角色許可權說明

ECS相關許可權

許可權名稱(Action)

說明

ecs:DescribeInstances

查詢一台或多台ECS執行個體的詳細資料。

ecs:DescribeInstanceStatus

擷取一台或多台ECS執行個體的狀態資訊。

ecs:DescribeInstanceTypes

查詢Elastic Compute Service提供的執行個體規格資源。

ecs:DescribeInstanceTypeFamilies

查詢Elastic Compute Service提供的執行個體規格類型系列資源。

ecs:DescribeInstanceAttribute

查詢單個ECS執行個體詳情。

ecs:CreateDiagnosticReport

建立資源診斷報告。

ecs:DescribeDiagnosticReports

查詢資源診斷報告列表。

ecs:DescribeDiagnosticReportAttributes

查詢資源診斷詳情。

ecs:DescribeDiagnosticMetricSets

查詢資源診斷集合列表。

ecs:DescribeDiagnosticMetrics

查詢診斷指標列表。

ecs:DescribeSecurityGroupAttribute

查詢一個安全性群組的安全性群組規則。

ecs:DescribeSecurityGroups

查詢安全性群組的基本資料。

ecs:DescribeSecurityGroupReferences

查詢一個安全性群組和其他哪些安全性群組有安全性群組層級的授權行為。

ecs:DescribeBandwidthLimitation

查詢頻寬資源清單。

ecs:DescribeCloudAssistantStatus

查詢一台或者多台執行個體是否安裝了雲助手Agent。

ecs:DescribeCommands

查詢已經建立的雲助手命令。

ecs:DescribeInvocationResults

查看雲助手命令的執行結果,在指定ECS執行個體中的實際執行結果。

ecs:DescribeNetworkInterfaces

查看彈性網卡(ENI)列表。

ecs:CreateCommand

建立一條雲助手命令。

ecs:InvokeCommand

為一台或多台ECS執行個體觸發一條雲助手命令。

ecs:StopInvocation

停止一台或多台ECS執行個體中進行中(Running)的雲助手命令進程。

ecs:RunCommand

建立一份Shell、PowerShell或者Bat類型的雲助手指令碼,然後在一台或多台ECS執行個體中執行該指令碼。

VPC相關許可權

許可權名稱(Action)

說明

vpc:DescribeVpcs

查詢已建立的VPC。

vpc:DescribeVpcAttribute

查詢指定VPC的配置資訊。

vpc:DescribeVSwitches

查詢已建立的交換器。

vpc:DescribeVSwitchAttributes

查詢交換器的配置資訊。

vpc:DescribeRouteTableList

查詢路由表列表。

vpc:DescribeRouteEntryList

查詢路由條目列表。

vpc:DescribeNatGateways

查詢指定地區指定條件的NAT Gateway的詳細資料。

vpc:DescribeEipAddresses

查詢指定地區已建立的EIP。

vpc:DescribeRouteTables

查詢路由表資訊。

vpc:DescribeSnatTableEntries

查詢已建立的SNAT條目。

vpc:DescribeNetworkAcls

查看網路ACL列表。

vpc:DescribeNetworkAclAttributes

查詢網路ACL的詳細資料。

SLB相關許可權

許可權名稱(Action)

說明

slb:DescribeLoadBalancers

查詢已建立的Server Load Balancer執行個體。

slb:DescribeLoadBalancerAttribute

查詢指定Server Load Balancer執行個體的詳細資料。

slb:DescribeVServerGroups

查詢服務器組列表。

slb:DescribeVServerGroupAttribute

查詢服務器組的詳細資料。

slb:DescribeLoadBalancerTCPListenerAttribute

查詢TCP監聽配置。

slb:DescribeLoadBalancerUDPListenerAttribute

查詢UDP監聽的配置。

slb:DescribeAccessControlLists

查詢已建立的存取控制策略組。

slb:DescribeAccessControlListAttribute

查詢存取控制策略組的配置。

slb:DescribeLoadBalancerListeners

查詢負載平衡監聽列表詳情。

slb:DescribeHealthStatus

查詢後端伺服器的健康狀態。

SLS相關許可權

許可權名稱(Action)

說明

sls:GetLogStore

查看Logstore的詳細資料。

CS相關許可權

許可權名稱(Action)

說明

cs:DescribeClusterDetail

查看叢集的詳細資料。

cs:DescribeClusterResources

查詢指定叢集的所有資源。

cs:DescribeTasks

查詢指定叢集Task。

cs:DescribeTaskInfo

查詢指定叢集Task資訊。

cs:DescribeClusterNodePools

查詢叢集內所有節點池詳情。

cs:DescribeNodePoolVuls

查詢指定叢集節點池的漏洞列表。

cs:DescribeClusterAddonsUpgradeStatus

查詢多個組件的升級狀態。

ECI相關許可權

許可權名稱(Action)

說明

eci:DescribeContainerGroups

批量擷取容器組資訊。

eci:RunCommand

在ECI執行個體中執行Shell類型的指令碼。

eci:DescribeCommandResult

查看命令的執行結果。

eci:ListUsage

查詢指定地區的權益配額。

CMS相關許可權

許可權名稱(Action)

說明

cms:DescribeMetricData

查詢指定時間段內雲端服務的監控資料。

cms:DescribeMetricLast

查詢指定監控項的最新監控資料。

cms:DescribeMetricMetaList

查詢CloudMonitor開放的監控項描述。

cms:DescribeMetricTop

查詢排序後的指定雲端服務的監控資料。

cms:QueryMetricMeta

查詢CloudMonitor的監控項。

cms:QueryMetricTop

查詢指定雲端服務的監控資料。

cms:ListMetricMeta

列出指標中繼資料。

cms:ListMetricMetaProject

列出指標元專案。

cms:QueryMetricData

查詢雲端服務的監控資料。

cms:QueryMetricLast

查詢監控項的最新監控資料。

cms:DescribeMetricList

查詢指定雲產品的指定監控項的監控資料。

cms:QueryMetricList

查詢CloudMonitor的監控項描述。

cms:MetricMeta

查詢CloudMonitor的監控項。

cms:DescribeAlertLogList

查詢最近的警示歷史。

cms:DescribeSystemEventAttribute

查詢系統事件詳情。

cms:GetMetricStreamMeta

查詢CloudMonitor的監控項描述資訊。

QUOTAS相關許可權

許可權名稱(Action)

說明

quotas:ListProducts

查詢配額中心已支援的雲端服務列表。

quotas:ListProductQuotas

查詢目標雲端服務的配額列表。

quotas:ListProductQuotaDimensions

查詢目標雲端服務支援的配額維度。

quotas:GetProductQuota

查詢目標配額詳情。

quotas:GetProductQuotaDimension

查詢目標雲端服務支援的配額維度詳情。

RAM相關許可權

許可權名稱(Action)

說明

ram:ListPoliciesForRole

列舉RAM Role Policy相關資源許可權。

GRACE相關許可權

許可權名稱(Action)

說明

grace:GetFile

擷取ATP分析檔案資訊。

grace:AnalyzeFile

在ATP平台分析檔案。

grace:UploadFileByOSS

通過OSS上傳檔案到ATP平台。

grace:UploadFileByURL

通過URL上傳檔案到ATP平台。

授權使用Container Service計算AI助手Agent功能

進入存取控制快速授權頁面,單擊確認授權建立角色AliyunCSAIAssistantRole並為該角色授予AliyunCSAIAssistantRolePolicy系統許可權,以允許Container Service計算AI助手扮演當前登入的阿里雲使用者,並使用該使用者的許可權調用工具。

角色許可權說明

RAM相關許可權

關於RAM扮演角色的機制,請參見AssumeRole - 擷取扮演角色的臨時身份憑證

{
  "Version": "1",
  "Statement": [
    {
      "Action": [
        "cs:DescribeClusterVuls",
        "cs:DescribeKubernetesVersionMetadata",
        "cs:DescribeClusterEndpoints",
        "cs:DescribePolicyInstancesStatus",
        "cs:GetClusterCheckResult",
        "cs:GetCostCheckItem",
        "cs:CheckControlPlaneLogEnable",
        "cs:GetClusterAuditProject",
        "cs:DescribeClusterDetail",
        "cs:DescribeClusters",
        "cs:CreateClusterDiagnosis",
        "cs:CreateClusterInspectConfig",
        "cs:GetClusterDiagnosisResult",
        "cs:RunClusterInspect",
        "cs:RunClusterCheck",
        "cs:ListClusterInspectReports",
        "cs:GetClusterInspectReportDetail",
        "cs:ListClusterChecks",
        "cs:GetClusters"
      ],
      "Resource": "*",
      "Effect": "Allow"
    },
    {
      "Action": [
        "yundun-sas:DescribeSuspEvents",
        "yundun-sas:DescribeVulDetails"
      ],
      "Resource": "*",
      "Effect": "Allow"
    },
    {
      "Action": [
        "cr:CreateClusterImageAnalysisTask",
        "cr:GetClusterImageAnalysisTask"
      ],
      "Resource": "*",
      "Effect": "Allow"
    },
    {
      "Action": [
        "arms:GetPrometheusInstance",
        "arms:GetCloudClusterAllUrl"
      ],
      "Resource": "*",
      "Effect": "Allow"
    },
    {
      "Effect": "Allow",
      "Action": [
        "log:ListProject",
        "log:ListTagResources",
        "log:ListLogStores",
        "log:ListConsumerGroup",
        "log:GetProject",
        "log:GetAlert",
        "log:GetIndex",
        "log:GetLogStore",
        "log:GetLogStoreLogs"
      ],
      "Resource": "*"
    }
  ]
}

Kubernetes叢集RBAC許可權

Container Service計算AI助手扮演當前登入的阿里雲使用者,並繼承該使用者的Kubernetes叢集資源RBAC許可權。