DATASOURCE::CS::ClusterNodePools is used to query the details of all node pools in a cluster.

Syntax

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

Properties

Property Type Required Editable Description Constraint
ClusterId String Yes Yes The ID of the cluster. None.

Return values (Fn::GetAtt)

  • NodePoolIds: the IDs of the node pools.
  • NodePools: details of the node pools.
Property Type Description Constraint
NodePoolIds List The IDs of the node pools. None.
NodePools List Details of the node pools. None.
NodepoolInfo Map Details of the node pool. Example: { "IsDefault": true, "Type": "ess", "Updated": "2022-05-09T10:52:44+08:00", "ResourceGroupId": "", "RegionId": "cn-beijing", "Name": "default-nodepool", "Created": "2022-05-09T10:52:43.533679948+08:00", "NodepoolId": "npf63e2a53b0594ec4bceacc56741b****"}.
Status Map The status of nodes in the node pool. Example: { "FailedNodes": 0, "State": "active", "SpotNodes": 0, "ServingNodes": 0, "HealthyNodes": 2, "TotalNodes": 2, "OfflineNodes": 0, "RemovingNodes": 0, "InitialNodes": 0}.
Management Map The configurations of the managed node pool. This property takes effect only for ACK Pro clusters. Example: { "UpgradeConfig": { "AutoUpgrade": false, "Surge": 0, "KeepSurgeOnFailed": false, "MaxUnavailable": 0, "MaxParallelism": 0 }, "AutoRepair": false, "Enable": false}.
InterconnectConfig Map The network configurations of the edge node pool.

This property takes effect only for edge node pools. Example: { "CenId": "cen-ey9k9nfhz0f*******", "CcnId": "ccn-qm5i0i0q9yi*******", "CcnRegionId": "cn-shanghai", "Bandwidth": 10, "ImprovedPeriod": "1"}.

InterconnectMode String The network mode of the edge node pool. This property takes effect only for edge node pools. Valid values:
  • basic: basic
  • improved: enhanced
MaxNodes Number The maximum number of nodes that can be contained in the edge node pool. The value of this property is greater than or equal to 0. The value varies based on the type of the node pool:
  • Node pool of the edge type: The value of this property is greater than or equal to 0.
  • Node pool of the ess type: The value of this property is equal to 0.
Note A value of 0 indicates that the number of nodes in the node pool is limited only by the quota of nodes in the cluster.
KubernetesConfig Map The configurations of the cluster. Example: { "CpuPolicy": "none", "Runtime": "docker", "CmsEnabled": true, "UserData": "", "NodeNameMode": "nodeip", "RuntimeVersion": "19.03.5", "Unschedulable": false, "OverwriteHostname": false}.
ScalingGroup Map The configurations of the scaling group. Example: { "WorkerHpcClusterId": "", "SystemDiskKmsKeyId": "", "Platform": "CentOS", "DataDisks": [], "SystemDiskSize": 40, "InstanceChargeType": "PostPaid", "RamPolicy": "KubernetesWorkerRole-d784cc05-69b2-4ad2-bc7f-174e93e4 ****", "AutoRenew": false, "SystemDiskEncrypted": false, "ImageType": "CentOS", "SystemDiskEncryptAlgorithm": "", "DeploymentsetId": "", "SystemDiskPerformanceLevel": "", "OsType": "", "ImageId": "centos_7_9_x64_20G_alibase_20220208.vhd", "SchedulerOptions": { "ManagedPrivateSpaceId": "" }, "SpotPriceLimit": [], "InstanceTypes": [ "ecs.g6.large" ], "Tags": [ { "Value": "k8s_nodes_config_stack_d784cc05-69b2-4ad2-bc7f-174e93e4****", "Key": "ros-aliyun-created" } ], "SpotStrategy": "NoSpot", "LoginPassword": "", "MultiAzPolicy": "BALANCE", "AutoRenewPeriod": 0, "ScalingPolicy": "release", "KeyPair": "k8s", "VSwitchIds": [ "vsw-2zenr28ayjt4mgofc****" ], "ScalingGroupId": "asg-2ze7np35ywjw****", "SecurityGroupId": "sg-2zee8czcwdm6xlqd****", "Period": 0, "SecurityGroupIds": [ "sg-2zee8czcwdm6xlqd****" ], "InternetChargeType": "", "SystemDiskCategory": "cloud_efficiency", "InternetMaxBandwidthOut": 0, "RdsInstances": [], "WorkerSystemDiskSnapshotPolicyId": "", "SupportIpv6": false, "PeriodUnit": ""}.
AutoScaling Map The configurations of the auto scaling feature. Example: { "EipBandwidth": 0, "Type": "", "MinInstances": 0, "Enable": false, "MaxInstances": 0, "EipInternetChargeType": "", "HealthCheckType": ""}.
TeeConfig Map The configurations of confidential computing. Example: { "TeeType": "", "TeeEnable": false}.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ClusterId": {
          "Type": "String",
          "Description": "Cluster ID."
        }
      },
      "Resources": {
        "ClusterNodePools": {
          "Type": "DATASOURCE::CS::ClusterNodePools",
          "Properties": {
            "ClusterId": {
              "Ref": "ClusterId"
            }
          }
        }
      },
      "Outputs": {
        "NodePools": {
          "Description": "The list of node_pools.",
          "Value": {
            "Fn::GetAtt": [
              "ClusterNodePools",
              "NodePools"
            ]
          }
        },
        "NodePoolIds": {
          "Description": "The list of node_pool IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ClusterNodePools",
              "NodePoolIds"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ClusterId:
        Type: String
        Description: Cluster ID.
    Resources:
      ClusterNodePools:
        Type: DATASOURCE::CS::ClusterNodePools
        Properties:
          ClusterId:
            Ref: ClusterId
    Outputs:
      NodePools:
        Description: The list of node_pools.
        Value:
          Fn::GetAtt:
            - ClusterNodePools
            - NodePools
      NodePoolIds:
        Description: The list of node_pool IDs.
        Value:
          Fn::GetAtt:
            - ClusterNodePools
            - NodePoolIds