最近更新时间:2024.04.24 17:26:49
首次发布时间:2022.06.27 21:21:39
更新指定集群下的节点池配置。
调用该 API 时的请求参数如下,除此之外还需传入公共请求参数。公共请求参数说明,请参见 公共参数。
参数名称 | 类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
Action | String | 是 | UpdateNodePoolConfig | 公共参数,本接口值:UpdateNodePoolConfig。 |
Version | String | 是 | 2022-05-12 | 公共参数,本接口值:2022-05-12。 |
ClientToken | String | 否 | BC028527-33B9-4990-A633-84E9F9****** | 用于保证请求幂等性的字符串。该字符串由调用方传入,需保证不同请求之间唯一。ClientToken 对大小写敏感,且最大值不超过 64 个 ASCII 字符。 |
ClusterId | String | 是 | cc5silumrsfeq**** | 节点池所在集群的 ID。 注意 集群必须处于 |
Id | String | 是 | pc51i0m6rsfen**** | 节点池 ID。 注意 节点池必须处于 |
Name | String | 否 | test-nodepool | 节点池名称。
注意 不能使用默认节点池保留名: |
KubernetesConfig | Object KubernetesConfigRequest | 否 | 节点池 Kubernetes 的配置。 | |
NodeConfig | Object NodeConfigForUpdate | 否 | 节点池中云服务器实例配置。 | |
AutoScaling | Object NodePoolAutoScaling | 否 | 节点池伸缩策略。 说明 默认节点池 |
参数名 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
InstanceTypeIds | Array of String | 否 | ["ecs.g2i.large"] | 节点对应的 ECS 实例规格 ID 列表。传入参数值,表示更新节点池的原有规格。更新规格后,支持按照新的规格扩容,存量老规格的节点不受影响。 注意
|
SubnetIds | Array of String | 否 | ["subnet-3rf6vwbgkg****"] | 节点网络所属的子网 ID 列表。 可以调用 私有网络 API 获取子网 ID。 注意
|
SystemVolume | Object SystemVolume | 否 | 节点的系统盘配置。 | |
DataVolumes | Array of DataVolume | 否 | 节点的数据盘配置。 | |
AdditionalContainerStorageEnabled | Boolean | 否 | false | 配置节点的第一块数据盘并格式化挂载作为容器镜像和日志的存储目录,取值范围:
|
InitializeScript | String | 否 | ZWNobyAidG****** | 创建并初始化节点后执行的自定义脚本。 说明 Base64 编码后长度不超过 1 KB。 |
Security | Object NodeSecurityForUpdate | 否 | 节点安全配置。 | |
Period | Integer | 否 | 12 | 云服务器实例购买时长。取值如下,单位为月: |
AutoRenew | Boolean | 否 | true | 云服务器实例到期后是否自动续费,取值如下:
|
AutoRenewPeriod | Integer | 否 | 1 | 云服务器实例每次自动续费时长。取值如下,单位为月: |
NamePrefix | String | 否 | name-prefix | 节点名称前缀。取值为空字符串时表示不启用节点命名前缀。前缀校验规则如下:
|
Tags | Array of Tag | 否 | 节点对应 ECS 实例绑定的标签信息,用于搜索、管理 ECS 实例。
| |
HpcClusterIds | Array of String | 否 | ["hpcCluster-yc2jlqcg7kb5oy******"] | 高性能计算集群 ID。 |
ImageId | String | 否 | image-kdvapv**** | 节点对应的 ECS 实例使用的镜像 ID。 |
参数名 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
SecurityGroupIds | Array of String | 否 | ["sg-2byy13cnsczy****"] | 节点网络所在的安全组 ID 列表。 调用私有网络的 DescribeSecurityGroups 接口,获取安全组 ID。单次最多填写 100 个安全组 ID。 注意
|
SecurityStrategies | Array of String | 否 | ["Hids"] | 节点的安全策略,取值:
|
Login | Object NodeLogin | 否 | 节点的访问方式配置。 支持密码方式或密钥对方式。同时传入时,优先使用密钥对。 |
POST /?Action=UpdateNodePoolConfig&Version=2022-05-12 HTTP/1.1 Content-Type:application/json { "ClusterId": "cc5silumrsfeq****", "Id": "pc51i0m6rsfen****", "AutoScaling": { "DesiredReplicas": 1, "SubnetPolicy": "Priority" }, "ClientToken": "BC028527-33B9-4990-A633-84E9F9******" }
本接口无专有返回参数,公共返回参数请参见 返回结果。
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "021635330810134****", "Action": "UpdateNodePoolConfig", "Version": "2022-05-12", "Service": "vke", "Region": "cn-beijing" }, "Result": {} }
本接口错误码如下表所示,公共错误码请参见 公共错误码。
HTTP状态码 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | OperationDenied.ClusterStatus | The action has been denied due to wrong cluster status {{statusPhase}} and [{{statusConditions}}]. | 指定集群的当前状态不支持该操作。请确认该接口依赖的集群状态后重试。 |
400 | OperationDenied.NodePoolStatus | The action has been forbidden due to wrong node pool status {{statusPhase}} and [{{statusConditions}}]. | 指定节点池的当前状态不支持该操作。请确认该接口依赖的节点池状态后重试。 |
400 | ClusterVpcMismatch.{{parameter}} | The specified {{resourceType}} {{resourceId}} is not in the VPC of cluster. | 指定的子网、安全组或高性能计算集群与集群属于不同私有网络,请确保其与集群处于同一个私有网络内。 |
400 | Mismatch.Replicas | The specified DesiredReplicas, MinReplicas and MaxReplicas are mismatched. | 指定节点的最小节点数、最大节点数、期望节点数逻辑不匹配。请确认参数后重试。 |
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 | UpdateNotAllowed.{{parameter}} | The update to the specified parameter {{parameter}} is not allowed due to {{resourceType}}. | 节点池不支持更新:
|
400 | QuotaExceeded.{{ResourceType}} | The quota of {{ResourceType}} has reached the limit. | 指定资源的配额达到上限,如 EIP、ECS、ECS Tag、EBS 等。请提升相关资源配额,或删除无用资源,预留出配额后重试。 |
400 | NotSupported.{{parameter}} | The specified {{resourceType}} {{resourceContent}} is not supported. | 指定参数不支持,如 InstanceType、ImageId 等。请确认参数后重试。 |
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. | 系统盘容量超过上限。云服务器使用限制,请参见 约束限制。 |
400 | InstanceTypeMismatch.VolumeType | The specified VolumeType {{volumeType}} and InstanceType {{instanceType}} are mismatched. | 指定的实例规格和云盘规格不匹配。请调用云服务的 DescribeInstanceTypes 接口获取云服务器实例规格与云盘规格的匹配关系,然后更新参数并重试。 |
400 | ZoneMismatch.InstanceType | The specified InstanceType {{instanceType}} and subnet zones are mismatched. | 子网所在的可用区不支持该实例规格。请调用云服务的 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 | ZoneMismatch.HpcCluster | The specified HpcCluster {{hpcClusterID}} and subnet zones are mismatched. | 指定的高性能计算集群可用区与节点子网可用区不匹配。请确保两者可用区一致后重试。 |
400 | Insufficient.Balance | Your account has run out of balance. | 当前火山引擎账户余额不足。请充值账户后重试。 |
400 | InstanceTypeMismatch.ImageId | The specified ImageId {{imageId}} and InstanceType {{instanceType}} are mismatched. | 指定的镜像 ID(ImageId)与 ECS 实例规格(InstanceTypeIds)不匹配。请根据参数说明,配置准确的参数值后重试。 |
400 | ClusterVersionMismatch.ImageId | The specified ImageId {{imageId}} and KubernetesVersion {{kubernetesVersion}} are mismatched. | 指定的镜像 ID(ImageId)与 集群 Kubernetes 版本不匹配。请根据参数说明,配置准确的参数值后重试。 |
409 | Conflict.Name | The specified name conflicts with existing {{resourceType}}. | 指定地域存在同名节点池,请更新节点池名称后重试。 |