跳到主要内容

ack kubeconfig

管理 ACK KubeConfig 凭证

运行 ecctl ack kubeconfig <action> -h 查看用法,或 ecctl schema ack.kubeconfig.<action> --full 获取该命令完整的结构化规格——每个参数与行为,便于 Agent 读取和填参。

create

ecctl ack kubeconfig create [flags]

签发 KubeConfig

  • 类型:read · 风险:low
API调用时机用途
DescribeClusterUserKubeconfig未指定 --user-id读取资源视图。
DescribeSubaccountK8sClusterUserConfig指定 --user-id读取资源视图。
参数类型必填说明
--clusterstringACK 集群 ID
--regionstringAlibaba Cloud region
--expire-timeintegerKubeConfig 有效期;create 按分钟发送,update 按 ACK 要求按小时发送
--private-ipboolean返回内网访问 KubeConfig
--user-idstring用于代签发 KubeConfig 或用户维度状态查询的 RAM 用户或角色 ID

update

ecctl ack kubeconfig update [flags]

更新 KubeConfig 过期时间

  • 类型:mutation · 风险:medium
API调用时机用途
UpdateK8sClusterUserConfigExpire每次执行命令时执行资源操作。
参数类型必填说明
--clusterstringACK 集群 ID
--expire-timeintegerKubeConfig 有效期;create 按分钟发送,update 按 ACK 要求按小时发送
--regionstringAlibaba Cloud region
--user-idstring用于代签发 KubeConfig 或用户维度状态查询的 RAM 用户或角色 ID

get

ecctl ack kubeconfig get [flags]

获取 KubeConfig

  • 类型:read · 风险:low
API调用时机用途
DescribeClusterUserKubeconfig每次执行命令时读取资源视图。
参数类型必填说明
--clusterstringACK 集群 ID
--regionstringAlibaba Cloud region
--fieldsstring要包含的资源字段,使用逗号分隔
--private-ipboolean返回内网访问 KubeConfig

list

ecctl ack kubeconfig list [flags]

列出 KubeConfig 状态

  • 类型:read · 风险:low
API调用时机用途
ListClusterKubeconfigStates--scope 不等于 user读取资源视图。
ListUserKubeConfigStates--scope 等于 user读取资源视图。
参数类型必填说明
--regionstringAlibaba Cloud region
--clusterstringACK 集群 ID
--fieldsstring要包含的资源字段,使用逗号分隔
--limitinteger最多返回 KubeConfig 状态数量(默认:50
--pageinteger返回结果页码(默认:1
--scopestring状态查询维度(默认:cluster
--user-idstring用于代签发 KubeConfig 或用户维度状态查询的 RAM 用户或角色 ID

revoke

ecctl ack kubeconfig revoke [flags]

吊销 KubeConfig

  • 类型:mutation · 风险:medium
API调用时机用途
RevokeK8sClusterKubeConfig每次执行命令时执行资源操作。
参数类型必填说明
--clusterstringACK 集群 ID
--regionstringAlibaba Cloud region