Skip to content
Proud to collaborate with Microsoft for Startups

kubernetes.deployment.set_image ​

Update a Deployment container's image (kubectl set image equivalent) — triggers a rolling update

Updates a single container's image inside a Deployment by issuing a strategic-merge patch. This is equivalent to kubectl set image and triggers a rolling update that respects the Deployment's existing RollingUpdate (or Recreate) strategy.

The workflow first reads the current Deployment to capture the previous image reference (useful for rollback DAGs), then patches only the named container — leaving all other containers untouched.

Inputs:

  • connection_uuid: Cloud connection UUID (required)
  • namespace: Target namespace (required)
  • name: Deployment name (required)
  • container: Name of the container within the pod template (required)
  • image: New image reference, e.g. nginx:1.27 (required)

Outputs:

  • connection_uuid, namespace, name, container, image (echoed)
  • previous_image: Image reference that was in place before the patch
  • generation: Deployment generation reported by the API server after patch

Errors:

  • Raises ValueError if container is not found in the Deployment's pod template; the engine routes this to the FAILED terminal state.

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

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringYes——
namespacestringYes——
namestringYes——
containerstringYes——
imagestringYes——
workflow_run_idstringNo—Engine workflow run id for DAG step execution
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringNo——
organization_uuiduuidNo——
namespacestringNo——
namestringNo——
containerstringNo——
imagestringNo——
previous_imagestringNo——
generationintegerNo——
workflow_run_idstringNo—Engine workflow run id for DAG step execution
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.set_image",
  "initial_data": {
    "connection_uuid": "value",
    "namespace": "value",
    "name": "value",
    "container": "value"
  }
}