eks.nodegroups.update

Scale a node group or change its labels and taints

PATCH /eks/api/clusters/{cluster}/nodegroups/{name}IAM eks:UpdateNodegroupConfigChanges stateDestructive

Scaling down drains the nodes it removes (respecting PodDisruptionBudgets) first.

Request syntax

PATCH /eks/api/clusters/{cluster}/nodegroups/{name}
{
  "minSize": "number",
  "desiredSize": "number",
  "maxSize": "number",
  "labels": "map of string",
  "taints": "array of json",
  "instanceType": "string",
  "drainTimeoutMinutes": "number",
  "forceAfterTimeout": "boolean",
  "autoscaling": "boolean",
  "zones": "array of string",
  "instanceTypes": "array of string",
  "capacityFallback": "object"
}

Path parameters

  • clusterRequired

    string

    Constraints: /^(ewk-[0-9a-f]{12}|[a-z]([a-z0-9-]{0,38}[a-z0-9])?)$/

  • nameRequired

    string

    Constraints: /^[a-z]([a-z0-9-]{0,30}[a-z0-9])?$/

Request body

  • minSizeOptional

    number

    Fewest nodes, 0–100; the cluster autoscaler never goes below it. minSize ≤ desiredSize ≤ maxSize, else 400, checked against the sizes not sent. Unchanged when absent

    Constraints: integer, 0-100

  • desiredSizeOptional

    number

    Nodes to run now, 0–100; with autoscaling on, the cluster autoscaler changes it between minSize and maxSize. Scaling down drains the nodes it removes. Unchanged when absent

    Constraints: integer, 0-100

  • maxSizeOptional

    number

    Most nodes, 1–100; what the quotas count (nodes per node group, and nodes per cluster summed over its node groups; 20 and 50 by default): 409 QuotaExceeded above them; only growth is checked, shrinking is always allowed. Unchanged when absent

    Constraints: integer, 1-100

  • labelsOptional

    map of string

    Replaces the node labels as a whole; at most 20, kubernetes.io/, k8s.io/ and eks.ews.cloud/ keys refused (400). {} removes them all. Unchanged when absent

    Constraints: key=value

  • taintsOptional

    array of json

    Replaces the node taints as a whole: { key, value?, effect: NoSchedule | PreferNoSchedule | NoExecute }; at most 10. [] removes them all. Unchanged when absent

  • instanceTypeOptional

    string

    Instance type for nodes created from now on, e.g. performance-4 (provider names still accepted, deprecated); nodes already running keep theirs until they are replaced. A group stopped after failed nodes starts again

    Constraints: 1-32 chars

  • drainTimeoutMinutesOptional

    number

    Upgrades: minutes a node’s drain may wait on PodDisruptionBudgets; default 60

    Constraints: integer, 5-1440

  • forceAfterTimeoutOptional

    boolean

    Upgrades: after the timeout, remove the node anyway (true) or pause the upgrade (false, default)

  • autoscalingOptional

    boolean

    Let the cluster autoscaler change desiredSize between minSize and maxSize (pending pods grow the group, underused nodes shrink it)

  • zonesOptional

    array of string

    Availability zones the nodes spread over, balanced (e.g. ["de1a","de1b"]); default the region’s default zone. Applies to nodes created from then on

    Constraints: /^[a-z]+[0-9]+[a-z]$/

  • instanceTypesOptional

    array of string

    Instance types to buy, in order, when instanceType is sold out in a zone (same CPU architecture), e.g. performance-8

    Constraints: /^[a-z0-9-]{2,24}$/

  • capacityFallbackOptional

    object

    Stock fallback; default off. otherZones: zones outside `zones` may be used; equivalentTypes: an equivalent server type may be bought

    Constraints: JSON

Response

200 with the node group after the change: id, name, instanceType, minSize, desiredSize, maxSize, labels, taints, version, nodeRoleId, autoscaling, zones, drainTimeoutMinutes, forceAfterTimeout, status, reconcileError, readyNodes, nodes (name, instanceId, status, version, zone, drainMessage, privateIpv4, publicIpv4, createdAt), createdAt. A group stopped after failed nodes goes `updating` and tries again. 400 when nothing is sent, the sizes (with the ones not sent) are out of order, or for a type or zone that cannot be used; 409 while the group is being deleted, or when a larger maxSize passes a quota; 404 for an unknown cluster or node group, 403 without the permission.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow eks:UpdateNodegroupConfig on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud eks nodegroups update cluster name

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_eks_nodegroups_update.