全部產品
Search
文件中心

:DATASOURCE::CS::ClusterNodePools

更新時間:Sep 30, 2024

DATASOURCE::CS::ClusterNodePools類型用於查詢叢集內所有節點池詳情。

文法

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

屬性

屬性名稱

類型

必須

允許更新

描述

約束

ClusterId

String

叢集ID。

RefreshOptions

String

當資源棧更新時,資料來源資源的重新整理策略。

取值:

  • Never(預設值):更新堆棧時,從不重新整理資料來源資源。

  • Always:更新堆棧時,始終重新整理資料來源資源。

返回資料(Fn::GetAtt)

  • NodePoolIds:節點池執行個體ID列表。

  • NodePools:節點池執行個體詳情列表。

屬性名稱

類型

描述

約束

NodePoolIds

List

節點池執行個體ID列表。

NodePools

List

節點池執行個體列表。

NodepoolInfo

Map

節點池資訊。

樣本:{ "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

節點池狀態資訊。

樣本:{ "FailedNodes": 0, "State": "active", "SpotNodes": 0, "ServingNodes": 0, "HealthyNodes": 2, "TotalNodes": 2, "OfflineNodes": 0, "RemovingNodes": 0, "InitialNodes": 0}

Management

Map

託管節點池配置。

該參數只在專業託管叢集中生效。樣本:{ "UpgradeConfig": { "AutoUpgrade": false, "Surge": 0, "KeepSurgeOnFailed": false, "MaxUnavailable": 0, "MaxParallelism": 0 }, "AutoRepair": false, "Enable": false}

InterconnectConfig

Map

邊緣節點池網路相關配置。

該參數只在edge類型的節點池中生效。樣本:{ "CenId": "cen-ey9k9nfhz0f*******", "CcnId": "ccn-qm5i0i0q9yi*******", "CcnRegionId": "cn-shanghai", "Bandwidth": 10, "ImprovedPeriod": "1"}

InterconnectMode

String

邊緣節點池網路類型。

該參數只在edge類型的節點池中生效。取值:

  • basic:基礎型。

  • improved:增強型。

MaxNodes

Number

邊緣節點池允許容納的最大節點數量。

該參數取值大於等於0。具體如下:

  • edge類型節點池:該參數值大於等於0。

  • ess類型節點池:該參數值等於0。

說明

0表示無額外限制,即僅受限於叢集整體可以容納的節點數,節點池本身無額外限制。

KubernetesConfig

Map

叢集相關配置。

樣本:{ "CpuPolicy": "none", "Runtime": "docker", "CmsEnabled": true, "UserData": "", "NodeNameMode": "nodeip", "RuntimeVersion": "19.03.5", "Unschedulable": false, "OverwriteHostname": false}

ScalingGroup

Map

擴容組配置。

樣本:{ "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

自動調整配置。

樣本:{ "EipBandwidth": 0, "Type": "", "MinInstances": 0, "Enable": false, "MaxInstances": 0, "EipInternetChargeType": "", "HealthCheckType": ""}

TeeConfig

Map

加密計算配置。

樣本:{ "TeeType": "", "TeeEnable": false}

樣本

JSON格式

{
  "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格式

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