---
title: "Scale Nodepool"
method: PATCH
path: "/ske/v2alpha1/thr1-standard/workspaces/{workspaceUUID}/sotoonnodepools/{resourceId}"
tags: ["Sotoon Kubernetes Engine"]
---

# Scale Nodepool

`PATCH /ske/v2alpha1/thr1-standard/workspaces/{workspaceUUID}/sotoonnodepools/{resourceId}`

Dynamically scales the number of worker nodes in the nodepool

## Path parameters

- `workspaceUUID` string, required
- `resourceId` string, required

## Request body

- ContainerNodepoolPatchRequest
  - `spec` ContainerNodepoolPatchSpec, required — Specification for nodepool updates
    - `replicas` integer, nullable — Number of worker nodes desired (0 or greater)

## Response `200`

The nodepool scaling operation was initiated successfully. Scaling uses intelligent 
deletion policies with exponential decay algorithm prioritizing oldest and unhealthy 
machines for removal. Rolling update strategy with MaxSurge=1 and MaxUnavailable=0 
ensures zero downtime. Monitor status fields to track progress.

- ContainerSotoonNodepool
  - `apiVersion` 'ske.sotoon.ir/v1alpha1', required — Version identifier of the API schema
  - `kind` 'SotoonNodepool', required — The string value 'SotoonNodepool' that identifies the schema
  - `metadata` ContainerObjectMeta, required — Standard resource metadata fields
    - `annotations` object, required — Annotations store additional metadata about the resource
    - `creationTimestamp` string, date-time, required
    - `deletionTimestamp` string, date-time, required
    - `labels` object, required — Labels are key-value pairs attached to resources for organization and categorization
    - `name` string, required — User-provided name that uniquely identifies the resource within its workspace
    - `resourceVersion` string — Internal version for optimistic concurrency control
    - `uid` string, required — System-generated unique identifier for the resource
    - `workspace` string, required — Unique identifier of the workspace where the resource belongs
  - `spec` ContainerSotoonNodepoolSpec, required — Desired configuration for the nodepool
    - `allowedUnsafeSysctls` string[] — List of allowed unsafe sysctls
    - `clusterName` string, required — Name of the cluster this nodepool belongs to
    - `cri` ContainerNodeCRIConfig, nullable — Container runtime configuration
      - `runtime` 'containerd' | 'docker', required — Container runtime to use
    - `labels` object — Labels to apply to worker nodes
    - `replicas` integer, required — Number of worker nodes desired in the nodepool
    - `template` ContainerSotoonMachineTemplate, required — Template configuration for worker nodes
      - `iamEnabled` boolean, required — Enable IAM integration for nodes
      - `instanceType` string, required — Instance type for worker nodes in Engine
    - `version` ContainerSKEVersion, required — Control-plane version configuration
      - `kubernetesVersion` string, required — Kubernetes version
      - `patchVersion` string, required — SKE patch version
  - `status` ContainerSotoonNodepoolStatus, required — Current observed state of the nodepool
    - `availableReplicas` integer, required — Number of replicas available for scheduling
    - `conditions` V1Condition[] — Current conditions of the nodepool
      - `lastTransitionTime` string, date-time, required
      - `message` string, required
      - `observedGeneration` integer
      - `reason` string, required
      - `status` string, required
      - `type` string, required
    - `phase` 'ScalingUp' | 'ScalingDown' | 'Running' | 'Failed' | 'Provisioning' | 'Unknown', required — Current phase of scaling operation
    - `ready` boolean, required — Indicates if the nodepool is ready
    - `readyReplicas` integer, required — Number of replicas that are ready to serve traffic
    - `replicas` integer, required — Current total number of replicas
    - `unavailableReplicas` integer, required — Number of replicas currently unavailable
    - `updatedReplicas` integer, required — Number of replicas updated to the latest spec

## Other responses

- `400` — Bad request - invalid configuration
- `401` — Unauthorized - invalid or expired authentication token
- `403` — Forbidden - insufficient permissions for workspace operations
- `404` — Not found - workspace or resource does not exist
- `422` — Unprocessable entity - resource constraints or quota exceeded

---

[API](https://skmtc.dev/sotoon/apis/sotoon-api.md) · [All operations](https://skmtc.dev/sotoon/apis/sotoon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sotoon/sotoon-api/revisions/c937cd9861c5/schema)
