Consulta o arquivo kubeconfig de um cluster ACK pelo ID do cluster.
Sintaxe
{
"Type": "DATASOURCE::CS::ClusterUserKubeconfig",
"Properties": {
"PrivateIpAddress": Boolean,
"ClusterId": String,
"TemporaryDurationMinutes": Integer,
"RefreshOptions": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
PrivateIpAddress |
Boolean |
Não |
Sim |
Indica se a consulta retorna apenas o arquivo kubeconfig para conexões de rede interna. |
Valores válidos:
|
|
ClusterId |
String |
Sim |
Sim |
ID do cluster. |
Nenhuma. |
|
TemporaryDurationMinutes |
Integer |
Não |
Sim |
Período de validade do arquivo kubeconfig temporário. |
Unidade: minutos. Valores válidos: 15 a 4320. Nota
Se não especificado, o sistema define um período de validade e o retorna no atributo |
|
RefreshOptions |
String |
Não |
Sim |
Política de atualização dos recursos da source de dados durante atualizações da pilha. |
Valores válidos:
|
Valores de retorno
Fn::GetAtt
ClusterId: ID do cluster.
Config: configurações de acesso do cluster.
Expiration: hora de expiração do arquivo kubeconfig no formato
RFC 3339(UTC).
Exemplos
Formato 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
Formato 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"
]
}
}
}
}