Skip to content
Proud to collaborate with Microsoft for Startups

kubernetes.deployment.scale ​

Set the replica count on a Deployment (scale subresource)

Scales a Deployment in the given namespace by patching its scale subresource. Captures the previous replica count before patching so callers can restore it if needed.

Inputs:

  • connection_uuid: Cloud connection UUID (required)
  • namespace: Target namespace (required)
  • name: Deployment name (required)
  • replicas: Desired replica count; must be >= 0 (required)

Outputs:

  • previous_replicas: Replica count observed before the patch
  • replicas: Replica count requested (echoed from input)

Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose apps_v1 with read_namespaced_deployment_scale and patch_namespaced_deployment_scale.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringYes——
namespacestringYes——
namestringYes——
replicasintegerYes——
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringNo——
organization_uuiduuidNo——
namespacestringNo——
namestringNo——
replicasintegerNo——
previous_replicasintegerNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "kubernetes.deployment.scale",
  "initial_data": {
    "connection_uuid": "value",
    "namespace": "value",
    "name": "value",
    "replicas": 123
  }
}