|docs
Start Trial

AI & Automation

Kubernetes Workflow Actions

Reference for the six Kubernetes Workflow Actions available through the PD Automation Runner — inputs, outputs, and supported object types.

View as Markdown

This page documents each Kubernetes Workflow Action available through the PD Automation Runner: its inputs, supported object types, outputs, and example use cases. For an overview and how to register and connect a runner, see PD Automation Runner. For deployment, see PD Automation Runner: Installation.

Each Kubernetes action requires a Connection Input that identifies which runner (and therefore which cluster) to target. If no runner appears in the list, verify the runner pod is running and shows Healthy in Incident Workflows Automation Connectors Self-hosted Runners.

Actions at a Glance

ActionWhat It Doeskubectl Equivalent
List ObjectsLists resources of a selected kind with optional namespace, label, and field filterskubectl get <type> [-n <namespace>] [-l <selector>]
Describe ObjectReturns full details for a named resource in JSON or YAMLkubectl get <type> <name> -o json or yaml
Object LogsRetrieves log output from a pod, with optional tail and time-window filterskubectl logs <name> [-c <container>] [--tail=<n>]
Create PodCreates a pod from a YAML definitionkubectl create -f pod.yaml
Delete PodDeletes a named podkubectl delete pod <name>
Run Pod CommandExecutes a shell command inside a running pod and returns its outputkubectl exec <pod> -- <shell> -c '<cmd>'

List Objects

Lists resources of a selected kind in your cluster, with optional namespace, label, and field filters.

kubectl equivalent: kubectl get <type> [-n <namespace> | --all-namespaces] [-l <label-selector>] [--field-selector <field-selector>] [-o json|yaml]

InputRequiredDefaultDescription
Connection InputYesRunner connection
Object TypeNoPodsResource kind to list (see supported types in the following list)
NamespaceNodefaultNamespace to list from. Ignored when All Namespaces is true
All NamespacesNofalseList across all namespaces
Label SelectorNoFilter by label (e.g. app=my-service,env=prod)
Field SelectorNoFilter by field (e.g. metadata.name=my-pod)
Output FormatNoSimple ListSimple List, JSON, or YAML

Supported object types: ConfigMaps, Cron Jobs, Custom Resource Definitions, DaemonSets, Deployments, Ingresses, Jobs, Namespaces, Nodes, PersistentVolumes, Persistent Volume Claims, Pods, Pod Disruption Budgets, ReplicaSets, Secrets, Services, StatefulSets, and Storage Classes.

Output: Output (list of matching resources), Result, Result Summary, and Error.

Example use case: During an incident, list all pods in the payments namespace to identify which are in a crash-loop state before deciding whether to restart them.

Describe Object

Retrieves full details for a named Kubernetes resource in JSON or YAML format. Returns structured output equivalent to kubectl get -o json|yaml (not the human-readable kubectl describe format).

kubectl equivalent: kubectl get <type> <name> [-n <namespace>] -o json|yaml

InputRequiredDefaultDescription
Connection InputYesRunner connection
Object TypeNoPodsResource kind
NameYesName of the resource
NamespaceNodefaultNamespace (not required for cluster-scoped resources: Namespaces, Nodes, PersistentVolumes, Storage Classes)
Output FormatNoJSONJSON or YAML

Supported object types: ConfigMaps, Cron Jobs, DaemonSets, Deployments, Ingresses, Jobs, Namespaces, Nodes, PersistentVolumes, Persistent Volume Claims, Pods, ReplicaSets, Secrets, Services, StatefulSets, and Storage Classes.

Output: Description, Result, Result Summary, and Error.

Example use case: Fetch the full spec and status of a deployment to check its replicas, readyReplicas, and conditions fields as part of an automated health check workflow.

Object Logs

Retrieves log output from a named pod or container. Supports tailing and time-window filtering.

kubectl equivalent: kubectl logs <name> [-c <container>] [--tail=<n>] [--since=<N>s] [-n <namespace>]

InputRequiredDefaultDescription
Connection InputYesRunner connection
NamespaceYesNamespace the pod is in
Object NameYesName of the pod
ContainerNoContainer name (required for multi-container pods)
LinesNo50Number of log lines to tail
SinceNoReturn logs from the last N seconds (e.g. 300 for the last 5 minutes)

Output: Log Content, Result, Result Summary, and Error.

Example use case: Automatically capture the last 100 lines of logs from a failing pod and attach them to an incident as a note.

Create Pod

Creates a Kubernetes pod from a YAML definition.

kubectl equivalent: kubectl create -f pod.yaml [-n <namespace>]

InputRequiredDefaultDescription
Connection InputYesRunner connection
Object YAMLYesFull YAML definition of the pod to create
NamespaceNodefaultNamespace to create the pod in
Output FormatNoJSONJSON or YAML

Output: Created Object, Result, Result Summary, and Error.

Example use case: Spin up a short-lived debug pod in a target namespace to run diagnostics, then delete it with the Delete Pod action once complete.

Delete Pod

Deletes a named pod from a namespace.

kubectl equivalent: kubectl delete pod <name> [-n <namespace>]

InputRequiredDefaultDescription
Connection InputYesRunner connection
Object NameYesName of the pod to delete
NamespaceNodefaultNamespace the pod resides in
Output FormatNoJSONJSON or YAML

Output: Deleted Object, Result, Result Summary, and Error.

Example use case: Force-restart a stuck pod by deleting it (Kubernetes will reschedule it automatically if it is managed by a Deployment or ReplicaSet).

Run Pod Command

Executes a shell command inside a running pod and returns its output.

kubectl equivalent: kubectl exec <pod-name> [-c <container>] [-n <namespace>] -- <shell> -c '<command>'

InputRequiredDefaultDescription
Connection InputYesRunner connection
Pod NameYesName of the pod
NamespaceNodefaultNamespace the pod resides in
CommandYesCommand to execute. Supports chaining with &&, ;, and similar
ContainerNoTarget container (omit to use the pod's default container)
ShellNo/bin/shShell used to run the command

Output: Command Output, Result, Result Summary, and Error.

Example use case: Run df -h or free -m inside a pod to capture disk and memory usage at the time of an incident without needing direct cluster access.

Async Execution Model

All Kubernetes actions are asynchronous. When triggered, an action dispatches the job to the runner and waits for the runner to return a result. This means:

  • The Workflow step is paused while the runner executes — results are returned when execution completes.
  • The default timeout is 10 minutes. If the runner is unreachable, the action times out and returns a Failed result.
  • Runner logs (kubectl logs -n pd-automation-runner deploy/pd-automation-runner) show the job receipt and execution result.

Learn More