Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::CS::KubernetesCluster

Última atualização: Jun 27, 2026

O tipo DATASOURCE::CS::KubernetesCluster consulta informações de um cluster do Container Service for Kubernetes (ACK).

Sintaxe

{
  "Type": "DATASOURCE::CS::KubernetesCluster",
  "Properties": {
    "ClusterId": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

ClusterId

String

Não

Sim

ID do cluster.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos da fonte de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos da fonte de dados durante a atualização da pilha.

  • Always: atualiza os recursos da fonte de dados durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • SubnetCidr: bloco CIDR do pod.

  • ExternalLoadbalancerId: ID da instância do Server Load Balancer (SLB) usada pelo Ingress do cluster.

  • ResourceGroupId: ID do grupo de recursos do cluster.

  • InitVersion: versão inicial do cluster.

  • Size: número de nós no cluster.

  • CurrentVersion: versão atual do cluster.

  • MasterUrl: endpoint do cluster.

  • Profile: perfil do cluster.

  • Name: nome do cluster.

  • Created: hora de criação do cluster.

  • DockerVersion: versão do Docker do cluster.

  • MetaData: metadados do cluster.

  • Tags: tags do cluster.

  • PrivateZone: configurações de zona privada do cluster.

  • Parameters: parâmetros especificados para o cluster.

  • Updated: hora da última atualização do cluster.

  • ZoneId: ID da zona do cluster.

  • ClusterId: ID do cluster.

  • VSwitchId: ID do vSwitch do cluster.

  • SecurityGroupId: ID do grupo de segurança do cluster.

  • ClusterSpec: especificações do cluster.

  • NetworkMode: modo de rede do cluster.

  • ClusterType: tipo do cluster.

  • DeletionProtection: recurso de proteção contra exclusão do cluster.

  • VpcId: ID da Virtual Private Cloud (VPC) do cluster.

  • State: estado de execução do cluster.

  • NextVersion: versão disponível para upgrade do cluster.

  • WorkerRamRoleName: nome da função do Resource Access Management (RAM) para nós worker.

  • RegionId: ID da região do cluster.

  • MaintenanceWindow: configurações da janela de manutenção do cluster.

Exemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Description:
      en: Cluster instance ID.
    Required: false
    Type: String
Resources:
  KubernetesCluster:
    Properties:
      ClusterId:
        Ref: ClusterId
    Type: DATASOURCE::CS::KubernetesCluster
Outputs:
  ClusterId:
    Description: Cluster instance ID.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ClusterId
  ClusterSpec:
    Description: 'The type of the managed Kubernetes cluster. This parameter is returned
      for a managed Kubernetes cluster. Valid values:

      - ack.pro.small: professional managed Kubernetes cluster.

      - ack.standard: standard managed Kubernetes cluster.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ClusterSpec
  ClusterType:
    Description: 'The type of the cluster. Valid values:

      - Kubernetes: dedicated Kubernetes cluster

      - ManagedKubernetes: managed Kubernetes cluster

      - Ask: ASK cluster

      - ExternalKubernetes: registered external Kubernetes cluster'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ClusterType
  Created:
    Description: The time when the cluster was created.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Created
  CurrentVersion:
    Description: The current Kubernetes version of the cluster. For more information
      about the Kubernetes versions supported by ACK, see Release notes for Kubernetes
      versions.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - CurrentVersion
  DeletionProtection:
    Description: 'Indicates whether deletion protection is enabled. If deletion protection
      is enabled, the cluster cannot be deleted in the ACK console or by calling the
      API. Valid values:

      - true: Deletion protection is enabled. You cannot delete the cluster in the
      ACK console or by calling the API.

      - false: Deletion protection is not enabled. You can delete the cluster in the
      ACK console or by calling the API.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - DeletionProtection
  DockerVersion:
    Description: The Docker version that is used by the cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - DockerVersion
  ExternalLoadbalancerId:
    Description: The ID of the Server Load Balancer (SLB) instance that is used for
      the Ingress of the cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ExternalLoadbalancerId
  InitVersion:
    Description: The Kubernetes version that is initially used by the cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - InitVersion
  MaintenanceWindow:
    Description: The maintenance window of the cluster. This feature is available
      in only professional managed Kubernetes clusters.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - MaintenanceWindow
  MasterUrl:
    Description: The address of the cluster. It includes an internal endpoint and
      a public endpoint.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - MasterUrl
  MetaData:
    Description: The metadata of the cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - MetaData
  Name:
    Description: The name of the cluster. The name must be 1 to 63 characters in length,
      and can contain digits, letters, and hyphens (-). It cannot start with a hyphen
      (-).
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Name
  NetworkMode:
    Description: "The network mode of the cluster. Valid values: \n- classic: the\
      \ classic network \n- vpc: virtual private cloud (VPC) \n- overlay: overlay\
      \ network\n- calico: network powered by Calico\nDefault value: vpc."
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - NetworkMode
  NextVersion:
    Description: The Kubernetes version to which the cluster can be upgraded.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - NextVersion
  Parameters:
    Description: A collection of cluster ROS parameters.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Parameters
  PrivateZone:
    Description: 'Indicates whether Alibaba Cloud DNS PrivateZone is enabled.

      - true: indicates that Alibaba Cloud DNS PrivateZone is enabled.- false: indicates
      that Alibaba Cloud DNS PrivateZone is not enabled.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - PrivateZone
  Profile:
    Description: 'Indicates the scenario in which the cluster is used. Valid values:

      - Default: indicates that the cluster is used in non-edge computing scenarios.

      - Edge: indicates that the ACK cluster is used in edge computing scenarios.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Profile
  RegionId:
    Description: The ID of the region where the cluster is deployed.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - RegionId
  ResourceGroupId:
    Description: The ID of the resource group to which the cluster belongs.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ResourceGroupId
  SecurityGroupId:
    Description: The ID of the security group to which the instances of the cluster
      belong.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - SecurityGroupId
  Size:
    Description: The number of nodes in the cluster. Master nodes and worker nodes
      are included.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Size
  State:
    Description: 'The state of the cluster. Valid values:

      - initial: The cluster is being created.

      - failed: The cluster failed to be created.

      - running: The cluster is running.

      - updating: The cluster is being upgraded.

      - updating_failed: The cluster failed to be upgraded.

      - scaling: The cluster is being scaled.

      - waiting: The registered cluster is waiting for connecting.

      - disconnected: The registeredcluster is disconnected.

      - stopped: The cluster is stopped.

      - deleting: The cluster is being deleted.

      - deleted: The cluster is deleted.

      - delete_failed: The cluster failed to be deleted.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - State
  SubnetCidr:
    Description: 'The pod CIDR block. It must be a valid and private CIDR block, and
      must be one of the following CIDR blocks or their subnets:

      - 10.0.0.0/8

      - 172.16-31.0.0/12-16

      - 192.168.0.0/16

      The pod CIDR block cannot overlap with that of the VPC or those of the ACK clusters
      that are deployed in the VPC. For more information about the network segmentation
      of ACK clusters, see Plan CIDR blocks for ACK clusters in a VPC.'
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - SubnetCidr
  Tags:
    Description: The labels of the cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Tags
  Updated:
    Description: The time when the cluster was updated.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - Updated
  VSwitchId:
    Description: The IDs of the vSwitches. You can select one to three vSwitches when
      you create an ACK cluster. vSwitches in different zones are recommended to ensure
      high availability.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - VSwitchId
  VpcId:
    Description: The ID of the VPC where the cluster is deployed. This parameter is
      required when you create an ACK cluster.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - VpcId
  WorkerRamRoleName:
    Description: "The name of the worker RAM role. \nThe RAM role is assigned to the\
      \ worker nodes of the cluster and allows the worker nodes to manage Elastic\
      \ Compute Service (ECS) instances."
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - WorkerRamRoleName
  ZoneId:
    Description: The ID of the zone where the cluster is deployed.
    Value:
      Fn::GetAtt:
      - KubernetesCluster
      - ZoneId
                        

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": {
        "en": "Cluster instance ID."
      },
      "Required": false
    }
  },
  "Resources": {
    "KubernetesCluster": {
      "Type": "DATASOURCE::CS::KubernetesCluster",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        }
      }
    }
  },
  "Outputs": {
    "SubnetCidr": {
      "Description": "The pod CIDR block. It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets:\n- 10.0.0.0/8\n- 172.16-31.0.0/12-16\n- 192.168.0.0/16\nThe pod CIDR block cannot overlap with that of the VPC or those of the ACK clusters that are deployed in the VPC. For more information about the network segmentation of ACK clusters, see Plan CIDR blocks for ACK clusters in a VPC.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "SubnetCidr"
        ]
      }
    },
    "ExternalLoadbalancerId": {
      "Description": "The ID of the Server Load Balancer (SLB) instance that is used for the Ingress of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ExternalLoadbalancerId"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group to which the cluster belongs.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ResourceGroupId"
        ]
      }
    },
    "InitVersion": {
      "Description": "The Kubernetes version that is initially used by the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "InitVersion"
        ]
      }
    },
    "Size": {
      "Description": "The number of nodes in the cluster. Master nodes and worker nodes are included.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Size"
        ]
      }
    },
    "CurrentVersion": {
      "Description": "The current Kubernetes version of the cluster. For more information about the Kubernetes versions supported by ACK, see Release notes for Kubernetes versions.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "CurrentVersion"
        ]
      }
    },
    "MasterUrl": {
      "Description": "The address of the cluster. It includes an internal endpoint and a public endpoint.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "MasterUrl"
        ]
      }
    },
    "Profile": {
      "Description": "Indicates the scenario in which the cluster is used. Valid values:\n- Default: indicates that the cluster is used in non-edge computing scenarios.\n- Edge: indicates that the ACK cluster is used in edge computing scenarios.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Profile"
        ]
      }
    },
    "Name": {
      "Description": "The name of the cluster. The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Name"
        ]
      }
    },
    "Created": {
      "Description": "The time when the cluster was created.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Created"
        ]
      }
    },
    "DockerVersion": {
      "Description": "The Docker version that is used by the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "DockerVersion"
        ]
      }
    },
    "MetaData": {
      "Description": "The metadata of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "MetaData"
        ]
      }
    },
    "Tags": {
      "Description": "The labels of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Tags"
        ]
      }
    },
    "PrivateZone": {
      "Description": "Indicates whether Alibaba Cloud DNS PrivateZone is enabled.\n- true: indicates that Alibaba Cloud DNS PrivateZone is enabled.- false: indicates that Alibaba Cloud DNS PrivateZone is not enabled.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "PrivateZone"
        ]
      }
    },
    "Parameters": {
      "Description": "A collection of cluster ROS parameters.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Parameters"
        ]
      }
    },
    "Updated": {
      "Description": "The time when the cluster was updated.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "Updated"
        ]
      }
    },
    "ZoneId": {
      "Description": "The ID of the zone where the cluster is deployed.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ZoneId"
        ]
      }
    },
    "ClusterId": {
      "Description": "Cluster instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ClusterId"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The IDs of the vSwitches. You can select one to three vSwitches when you create an ACK cluster. vSwitches in different zones are recommended to ensure high availability.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "VSwitchId"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "The ID of the security group to which the instances of the cluster belong.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "SecurityGroupId"
        ]
      }
    },
    "ClusterSpec": {
      "Description": "The type of the managed Kubernetes cluster. This parameter is returned for a managed Kubernetes cluster. Valid values:\n- ack.pro.small: professional managed Kubernetes cluster.\n- ack.standard: standard managed Kubernetes cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ClusterSpec"
        ]
      }
    },
    "NetworkMode": {
      "Description": "The network mode of the cluster. Valid values: \n- classic: the classic network \n- vpc: virtual private cloud (VPC) \n- overlay: overlay network\n- calico: network powered by Calico\nDefault value: vpc.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "NetworkMode"
        ]
      }
    },
    "ClusterType": {
      "Description": "The type of the cluster. Valid values:\n- Kubernetes: dedicated Kubernetes cluster\n- ManagedKubernetes: managed Kubernetes cluster\n- Ask: ASK cluster\n- ExternalKubernetes: registered external Kubernetes cluster",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "ClusterType"
        ]
      }
    },
    "DeletionProtection": {
      "Description": "Indicates whether deletion protection is enabled. If deletion protection is enabled, the cluster cannot be deleted in the ACK console or by calling the API. Valid values:\n- true: Deletion protection is enabled. You cannot delete the cluster in the ACK console or by calling the API.\n- false: Deletion protection is not enabled. You can delete the cluster in the ACK console or by calling the API.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "DeletionProtection"
        ]
      }
    },
    "VpcId": {
      "Description": "The ID of the VPC where the cluster is deployed. This parameter is required when you create an ACK cluster.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "VpcId"
        ]
      }
    },
    "State": {
      "Description": "The state of the cluster. Valid values:\n- initial: The cluster is being created.\n- failed: The cluster failed to be created.\n- running: The cluster is running.\n- updating: The cluster is being upgraded.\n- updating_failed: The cluster failed to be upgraded.\n- scaling: The cluster is being scaled.\n- waiting: The registered cluster is waiting for connecting.\n- disconnected: The registeredcluster is disconnected.\n- stopped: The cluster is stopped.\n- deleting: The cluster is being deleted.\n- deleted: The cluster is deleted.\n- delete_failed: The cluster failed to be deleted.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "State"
        ]
      }
    },
    "NextVersion": {
      "Description": "The Kubernetes version to which the cluster can be upgraded.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "NextVersion"
        ]
      }
    },
    "WorkerRamRoleName": {
      "Description": "The name of the worker RAM role. \nThe RAM role is assigned to the worker nodes of the cluster and allows the worker nodes to manage Elastic Compute Service (ECS) instances.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "WorkerRamRoleName"
        ]
      }
    },
    "RegionId": {
      "Description": "The ID of the region where the cluster is deployed.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "RegionId"
        ]
      }
    },
    "MaintenanceWindow": {
      "Description": "The maintenance window of the cluster. This feature is available in only professional managed Kubernetes clusters.",
      "Value": {
        "Fn::GetAtt": [
          "KubernetesCluster",
          "MaintenanceWindow"
        ]
      }
    }
  }
}