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
ValueErrorifcontaineris 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
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | string | Yes | — | — |
namespace | string | Yes | — | — |
name | string | Yes | — | — |
container | string | Yes | — | — |
image | string | Yes | — | — |
workflow_run_id | string | No | — | Engine workflow run id for DAG step execution |
organization_uuid | uuid | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | string | No | — | — |
organization_uuid | uuid | No | — | — |
namespace | string | No | — | — |
name | string | No | — | — |
container | string | No | — | — |
image | string | No | — | — |
previous_image | string | No | — | — |
generation | integer | No | — | — |
workflow_run_id | string | No | — | Engine workflow run id for DAG step execution |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
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"
}
}