DATASOURCE::CS::ClusterUserKubeconfig is used to query the kubeconfig file of a Container Service for Kubernetes (ACK) cluster by cluster ID.
Syntax
{
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"PrivateIpAddress": Boolean,
"ClusterId": String,
"TemporaryDurationMinutes": Integer,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
PrivateIpAddress | Boolean | No | Yes | Specifies whether to query only the kubeconfig file that is used to connect to the cluster over an internal network. | Valid values:
|
ClusterId | String | Yes | Yes | The cluster ID. | None. |
TemporaryDurationMinutes | Integer | No | Yes | The validity period of the temporary kubeconfig file. | Unit: minutes. Valid values: 15 to 4320. Note If you leave this property empty, the system automatically specifies a validity period. The validity period is indicated by |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
ClusterId: the cluster ID.
Config: the access configurations of the cluster.
Expiration: the expiration time of the kubeconfig file. The time follows the
RFC 3339
format. The time is displayed in UTC.
Examples
YAML
format
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
format
{
"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"
]
}
}
}
}