Skip to content
Proud to collaborate with Microsoft for Startups

k8s.cluster.snapshot ​

Cluster-wide workload snapshot (one list per kind, slim projection)

Snapshot workload resources from a cluster (one call per kind, no persistence).

Inputs:

  • connection_uuid: Cloud connection UUID (required)
  • namespaces: Optional list of namespaces. Omit/empty → full-cluster scan using list_X_for_all_namespaces. Saves N-1 round-trips.
  • kinds: Optional list overriding the default kind set. Allowed: Deployment, StatefulSet, DaemonSet, Service, Ingress, ConfigMap, Job, CronJob, PersistentVolumeClaim, Pod, Secret, Namespace, Node.
  • label_selector: Optional kubectl-style label selector applied to every list.

Outputs:

  • snapshot_at: ISO-8601 timestamp the snapshot completed.
  • kinds_scanned: [str]
  • counts_by_kind:
  • items_by_kind:
  • duration_ms: wall-clock duration of the snapshot run.

Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose core_v1, apps_v1, batch_v1, networking_v1.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—UUID of the CloudConnection backing the target Kubernetes cluster, picked from the organization's connections (filtered to connection_type=kubernetes).
namespacesjsonNo——
kindsjsonNo——
label_selectorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—CloudConnection UUID echoed from input.
kindsjsonNo——
label_selectorstringNo——
snapshot_atstringNo——
namespacesjsonNo——
kinds_scannedjsonNo——
counts_by_kindjsonNo——
items_by_kindjsonNo——
duration_msintegerNo——
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": "k8s.cluster.snapshot",
  "initial_data": {
    "connection_uuid": "value"
  }
}