DATASOURCE::CS::ClusterUserKubeconfig类型用于根据集群ID查询访问该集群的Kubeconfig配置。
语法
{
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"PrivateIpAddress": Boolean,
"ClusterId": String,
"TemporaryDurationMinutes": Integer,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
PrivateIpAddress | Boolean | 否 | 是 | 是否获取内网连接配置。 | 取值:
|
ClusterId | String | 是 | 是 | 集群ID。 | 无 |
TemporaryDurationMinutes | Integer | 否 | 是 | 临时kubeconfig有效期。 | 单位:分钟。取值范围:15~4320。 说明 当不设置该参数时,将由系统自动确定一个更长的有效期,具体过期时间通过返回的 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 取值:
|
返回值
Fn::GetAtt
ClusterId:ACK集群的ID。
Config:集群访问配置。
Expiration:Kubeconfig的过期时间。以
RFC3339
格式显示的UTC时间。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClusterId:
Description: The ID of the ACK cluster.
Type: String
Resources:
ClusterUserKubeconfig:
Properties:
ClusterId:
Ref: ClusterId
Type: DATASOURCE::CS::ClusterUserKubeconfig
Outputs:
ClusterId:
Description: The ID of the ACK cluster.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- ClusterId
Config:
Description: The content of the kubeconfig file.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- Config
Expiration:
Description: The expiration time of the kubeconfig file. The value is the UTC
time displayed in RFC3339 format.
Value:
Fn::GetAtt:
- ClusterUserKubeconfig
- Expiration
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ClusterId": {
"Type": "String",
"Description": "The ID of the ACK cluster."
}
},
"Resources": {
"ClusterUserKubeconfig": {
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"ClusterId": {
"Ref": "ClusterId"
}
}
}
},
"Outputs": {
"ClusterId": {
"Description": "The ID of the ACK cluster.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"ClusterId"
]
}
},
"Config": {
"Description": "The content of the kubeconfig file.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"Config"
]
}
},
"Expiration": {
"Description": "The expiration time of the kubeconfig file. The value is the UTC time displayed in RFC3339 format.",
"Value": {
"Fn::GetAtt": [
"ClusterUserKubeconfig",
"Expiration"
]
}
}
}
}
文档内容是否对您有帮助?