DATASOURCE::CS::ClusterUserKubeconfig digunakan untuk menanyakan file kubeconfig dari kluster Container Service for Kubernetes (ACK) berdasarkan ID kluster.
Sintaksis
{
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"PrivateIpAddress": Boolean,
"ClusterId": String,
"TemporaryDurationMinutes": Integer,
"RefreshOptions": String
}
}Properti
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Batasan |
PrivateIpAddress | Boolean | Tidak | Ya | Menentukan apakah hanya akan menanyakan file kubeconfig yang digunakan untuk terhubung ke kluster melalui jaringan internal. | Nilai valid:
|
ClusterId | String | Ya | Ya | ID kluster. | Tidak ada. |
TemporaryDurationMinutes | Integer | Tidak | Ya | Masa berlaku file kubeconfig sementara. | Unit: menit. Nilai valid: 15 hingga 4320. Catatan Jika Anda membiarkan properti ini kosong, sistem secara otomatis menentukan masa berlaku. Masa berlaku ditunjukkan oleh |
RefreshOptions | String | Tidak | Ya | Kebijakan pembaruan untuk sumber daya sumber data ketika tumpukan diperbarui. | Nilai valid:
|
Nilai Pengembalian
Fn::GetAtt
ClusterId: ID kluster.
Config: Konfigurasi akses kluster.
Expiration: Waktu kedaluwarsa file kubeconfig. Format waktu mengikuti
RFC 3339dan ditampilkan dalam UTC.
Contoh
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
- ExpirationJSON 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"
]
}
}
}
}