You need to enable JavaScript to run this app.
导航

创建边缘弹性节点池

最近更新时间2023.10.08 19:44:29

首次发布时间2023.09.16 22:54:46

本接口用于创建边缘弹性节点池。

请求方法

POST

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

名称

类型

是否必选

示例值

描述

Action

String

CreateEdgeNodePool

公共参数。该参数表示接口名称。本接口取值为
CreateEdgeNodePool

Version

String

2021-03-03

公共参数。该参数表示接口版本。 本接口取值为2021-03-03

ClusterId

String

ccgr2an7*************

目标集群 ID。

Name

String

弹性节点池

节点池名称

NodePoolType

String

edge-machine-pool:弹性节点池

节点池类型。本接口需指定为 edge-machine-pool

KubernetesConfig

EdgeNodePoolKubernetesConfig

{
    "Labels": [
      {
        "Key": "IDC",
        "Value": "BeiJing"
      },
      {
        "Key": "GPU",
        "Value": "true"
      }
    ],
    "Taints": [
      {
        "Value": "Error",
        "Key": "Status",
        "Effect": "NoSchedule"
      }
    ]
  }

节点池的Kubernetes相关配置。

ElasticConfig

ElasticConfig

{
  "CloudServerIdentity": "cloudserver-wbvht2h********",
  "AutoScaleConfig": {
    "Enabled": true,
    "MinReplicas": 1,
    "MaxReplicas": 10,
    "Priority": 10,
    "DesiredReplicas": 1
  },
  "InstanceArea": {
    "ClusterName": "bdcdn-hsct02",
    "DesiredReplicas": 1
  }
}

弹性扩缩容配置。

CreateClientToken

String

"doigjalfajglaarf4tejyhsed234"

幂等创建 Token

请求示例

POST https://veecp.volcengineapi.com/?Action=CreateEdgeNodePool&Version=2021-03-03
&<其他公共参数>
{
  "Name": "demo-test",
  "ClusterId": "cci4ndjfqtofp********",
  "KubernetesConfig": {
    "Labels": [
      {
        "Key": "test",
        "Value": "true"
      }
    ],
    "Taints": []
  },
  "NodePoolType": "edge-machine-pool",
  "ElasticConfig": {
    "CloudServerIdentity": "cloudserver-wbvht2h********",
    "AutoScaleConfig": {
      "Enabled": true,
      "MinReplicas": 1,
      "MaxReplicas": 10,
      "Priority": 10,
      "DesiredReplicas": 1
    },
    "InstanceArea": {
      "ClusterName": "bdcdn-hsct02",
      "DesiredReplicas": 1
    }
  }
}

返回参数

名称

类型

示例值

描述

Id

string

pci3e27fqto******

节点池 ID。

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306121710527E8620A819**********",
        "Action": "CreateEdgeNodePool",
        "Version": "2021-03-03",
        "Service": "veecp_openapi",
        "Region": "cn-beijing"
    },
    "Result": {
        "Id": "pci3e27fqto**********"
    }
}

错误码

本接口错误码如下表所示,其他错误码请参见错误码

HTTP 状态码

错误码

错误信息

描述

400

NotSupported.{{parameter}}

The specified {{resourceType}} {{resourceContent}} is not supported.

指定参数不支持,如 InstanceType、ImageId 等。

400

QuotaExceeded.NodePool

The number of node pools in the cluster has reached the limit.

您当前集群所要创建的节点池数量超出系统限额,您可以选择其他地域,也可以提交工单申请提高限额。

400

LimitExceeded.MaximumVolumes

You have reached the limit of the number of volumes that you can create.

云盘数量超过了单台云服务器实例所能挂载的云盘数量。

400

LimitExceeded.DataVolumeSize

You have reached the limit of the size of data volume that you can create.

数据盘容量超过上限。

400

LimitExceeded.SystemVolumeSize

You have reached the limit of the size of system volume that you can create.

系统盘容量超过上限。

409

Conflict.Name

The specified name conflicts with existing {{resourceType}}.

指定地域存在同名实例,请更换实例名称再尝试。

400

ClusterVpcMismatch.{{parameter}}

The specified {{resourceType}} {{resourceId}} is not in the VPC of cluster.

指定的子网/安全组/实例/高性能计算集群与集群属于不同 VPC,请确保其与集群处于同一个 VPC 内。

400

Mismatch.Replicas

The specified DesiredReplicas, MinReplicas and MaxReplicas are mismatched.

指定节点的最小节点数、最大节点数、期望节点数逻辑不匹配,请确认参数后重试。

400

OperationDenied.ClusterStatus

The action has been denied due to wrong cluster status {{statusPhase}} and [{{statusConditions}}].

指定集群的当前状态不支持该操作,请确认该接口依赖的集群状态后重试。

400

QuotaExceeded.Node

The number of nodes in the cluster has reached the limit.

您当前集群所要创建的节点数量超出系统限额,您可以选择其他地域,也可以提交工单申请提高限额。

400

LimitExceeded.NodeInCluster

The number of nodes exceeds the cluster defined pods config limit.

Flannel 容器网络类型下,节点池设置的期望节点数超出了集群支持的最大节点数。
支持的最大节点数取决于 PodsConfig.FlannelConfig.PodCidrs和 MaxPodsPerNode。集群创建完成后不支持修改,请合理规划集群设置。

400

InstanceTypeMismatch.VolumeType

The specified VolumeType {{volumeType}} and InstanceType {{instanceType}} are mismatched.

指定的实例规格和云盘规格不匹配,建议您前置通过 ECS 的DescribeInstanceTypes接口获取 ECS 实例规格与云盘规格的匹配关系。

400

ZoneMismatch.InstanceType

The specified InstanceType {{instanceType}} and subnet zones are mismatched.

子网所在的可用区不支持该实例规格。
建议您前置通过 ECS 的DescribeAvailableResource接口获取各可用区支持的实例规格情况。

400

OutOfRange.DataVolumes

There is no data volume for additional container storage enabling.

启用了配置节点的第一块数据盘作为容器镜像和日志的存储目录(AdditionalContainerStorageEnabled=true),但是 DataVolume 参数中并没有指定任何数据盘

400

ZoneMismatch.Subnet

The specified Subnet {{subnetId}} is not in the cluster defined zones.

指定的子网所属的可用区不在集群支持的可用区内。请使用匹配集群可用区的子网。

400

QuotaExceeded.{{ResourceType}}

The quota of {{ResourceType}} has reached the limit.

指定资源的配额达到上限,如安全组、ENI、EIP、CLB、ECS、Tag、ECS Tag等。

400

ZoneMismatch.HpcCluster

The specified HpcCluster {{hpcClusterID}} and subnet zones are mismatched.

指定的高性能计算集群可用区与 Worker 节点子网可用区不匹配。请确保两者可用区一致后重试。

400

Insufficient.Balance

Your account has run out of balance.

账户余额不足。
(创建节点池且期望节点数大于0时,若账户余额不足报该错误码)