All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::CS::KubernetesCluster

Last Updated:Feb 08, 2024

DATASOURCE::CS::KubernetesCluster is used to query the information about a Container Service for Kubernetes (ACK) cluster.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

ClusterId

String

No

Yes

The cluster ID.

None.

Return values

Fn::GetAtt

  • SubnetCidr: the CIDR block of the pod.

  • ExternalLoadbalancerId: the ID of the Server Load Balancer (SLB) instance that is used by the Ingress of the cluster.

  • ResourceGroupId: the resource group ID of the cluster.

  • InitVersion: the initial version of the cluster.

  • Size: the number of nodes in the cluster.

  • CurrentVersion: the current version of the cluster.

  • MasterUrl: the endpoint of the cluster.

  • Profile: the profile of the cluster.

  • Name: the cluster name.

  • Created: the time when the cluster was created.

  • DockerVersion: the Docker version of the cluster.

  • MetaData: the metadata of the cluster.

  • Tags: the tags of the cluster.

  • PrivateZone: the private zone configurations of the cluster.

  • Parameters: the parameters that are specified for the cluster.

  • Updated: the time when the cluster was updated.

  • ZoneId: the zone ID of the cluster.

  • ClusterId: the cluster ID.

  • VSwitchId: the vSwitch ID of the cluster.

  • SecurityGroupId: the security group ID of the cluster.

  • ClusterSpec: the specifications of the cluster.

  • NetworkMode: the networking mode of the cluster.

  • ClusterType: the cluster type.

  • DeletionProtection: the deletion protection feature for the cluster.

  • VpcId: the virtual private cloud (VPC) ID of the cluster.

  • State: the running state of the cluster.

  • NextVersion: the upgradable version of the cluster.

  • WorkerRamRoleName: the name of the Resource Access Management (RAM) role for worker nodes.

  • RegionId: the region ID of the cluster.

  • MaintenanceWindow: the maintenance window configurations of the cluster.

Examples

  • YAML format

    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
                            
  • JSON format

    {
      "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"
            ]
          }
        }
      }
    }