生成自建k8s接入命令。
接口说明
传入 ClusterId 时复用当前租户已发现的多云集群身份;未传时按原自建集群接入方式生成安装信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-sas:GenerateK8sAccessInfo |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ClusterName |
string |
否 |
k8s 集群的名称。 |
test |
| ClusterId |
string |
否 |
服务端同步生成的多云集群标识;可选,传入时必须属于当前可信租户且仍有效。 |
cf3824769c85441b4bf3**** |
| GroupId |
integer |
否 |
查询到的分组 ID。 |
11341690 |
| Vendor |
string |
否 |
云资产厂商。取值:
|
Tencent |
| ExpireDate |
integer |
是 |
容器接入过期时间。采用 Unix 时间戳,单位为毫秒。 |
1711951508388 |
| AuditRegionId |
string |
否 |
审计日志 region。 |
cn-hangzhou |
| AuditProject |
string |
否 |
审计日志 sls project。 |
k8s-log-custom-huxintest1018-2 |
| AuditLogStore |
string |
否 |
审计日志 sls logstore。 |
audit-cf6baf6afa106eca665296fdf68b65bf |
AliyunYundunGatewayProjectName
deprecated
|
string |
否 |
该参数已废弃,无需关注 。 |
None |
AliyunYundunGatewayApiName
deprecated
|
string |
否 |
该参数已废弃,无需关注 。 |
None |
AliyunYundunGatewayPopName
deprecated
|
string |
否 |
该参数已废弃,无需关注 。 |
None |
| CpuArch |
string |
否 |
cpu 架构,分为 arm 架构的和 x86 架构。 |
arm |
| InstallPolicyVersion |
string |
否 |
新多云策略 cloud-k8s-install-v2;省略沿用历史行为。 |
cloud-k8s-install-v2 |
| DeploymentProfileCodes |
array |
否 |
期望部署形态,服务端重新核验授权、目录及实际能力。 |
|
|
string |
否 |
期望部署的节点形态代码。传入值必须与服务端当前核验通过的节点形态集合一致,例如 EKS_STANDARD;不传时由服务端使用当前核验通过的集合。 |
EKS_STANDARD |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Success |
boolean |
请求是否成功。 |
|
| RequestId |
string |
阿里云为该请求生成的唯一标识符。 |
061955B2-BC40-589F-AF63-C40A901EE279 |
| Data |
object |
返回数据。 |
|
| ClusterName |
string |
集群名称。 |
test |
| AliUid |
integer |
用户 aliuid。 |
1766185894104*** |
| InstallKey |
string |
服务器安装的 key。 |
BC66185*** |
| ClusterId |
string |
集群 ID。 |
c8ca91e0907d94efaba7fb0827eb9**** |
| GroupId |
string |
服务器分组 ID。 |
11618788 |
| ExpireDate |
integer |
过期时间,单位毫秒。 |
1804230578566 |
| AuditRegionId |
string |
服务器所在的地域 ID。 |
cn-hangzhou |
| AuditProject |
string |
审计日志 slsproject。 |
k8s-log-custom-your-project-sd89ehaaa |
| AuditLogStore |
string |
审计日志 sls logstore。 |
audit-cf6baf6afa106eca665296fdf68b65bf |
| CpuArch |
string |
cpu 架构,分为 arm 架构的和 x86 架构。示例:
|
x86 |
| InstallationId |
integer |
独立多云安装记录 ID,不替代 ClusterId。 |
1 |
| InstallPolicyVersion |
string |
安装策略版本,缺省历史记录维持 v1 语义。 |
cloud-k8s-install-v2 |
| GroupPolicy |
string |
主机分组策略。取值:
|
KEEP_EXISTING_DEFAULT_FOR_NEW |
| DeploymentConfig |
string |
规范化部署 JSON 快照,含模板版本、形态及声明式节点选择表达式。 |
{"templateVersion":"cloud-k8s-compat-v2","profileCodes":["EKS_STANDARD"],"nodeMatchExpressions":[{"key":"kubernetes.io/os","operator":"In","values":["linux"]}]} |
示例
正常返回示例
JSON格式
{
"Success": true,
"RequestId": "061955B2-BC40-589F-AF63-C40A901EE279",
"Data": {
"ClusterName": "test",
"AliUid": 0,
"InstallKey": "BC66185***",
"ClusterId": "c8ca91e0907d94efaba7fb0827eb9****",
"GroupId": "11618788",
"ExpireDate": 1804230578566,
"AuditRegionId": "cn-hangzhou",
"AuditProject": "k8s-log-custom-your-project-sd89ehaaa",
"AuditLogStore": "audit-cf6baf6afa106eca665296fdf68b65bf",
"CpuArch": "x86\n",
"InstallationId": 1,
"InstallPolicyVersion": "cloud-k8s-install-v2",
"GroupPolicy": "KEEP_EXISTING_DEFAULT_FOR_NEW",
"DeploymentConfig": "{\"templateVersion\":\"cloud-k8s-compat-v2\",\"profileCodes\":[\"EKS_STANDARD\"],\"nodeMatchExpressions\":[{\"key\":\"kubernetes.io/os\",\"operator\":\"In\",\"values\":[\"linux\"]}]}"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | -101 | Invalid parameter value. | 无效参数。 |
| 400 | RdCheckNoPermission | Resource directory account verification has no permission. | 资源目录账号校验无权限。 |
| 400 | CloudK8s.InstallationGroupInvalid | The selected host group is not available for the trusted tenant. | |
| 500 | ServerError | ServerError | 服务故障,请稍后重试! |
| 500 | RdCheckInnerError | Resource directory account verification failed. | |
| 500 | CloudK8s.InstallDependencyFailed | The cluster installation dependency failed. | |
| 403 | NoPermission | caller has no permission | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作。 |
| 403 | CloudK8s.TrustedTenantRequired | A trusted tenant identity is required. | |
| 404 | CloudK8s.ClusterNotFound | The cluster is unavailable for the trusted tenant. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。