Kubernetes
Manages Kubernetes clusters via the kubectl CLI. An agent can list, describe, scale, and delete resources, apply manifests, tail pod logs, exec into containers, and manage deployment rollouts — all scoped to a single namespace and (optionally) a specific kubeconfig context.
Add to an agent node's tools array with _node_type: "tool-kubernetes". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
kubeconfig | No | Full kubeconfig YAML content. Written to a temporary file and passed via kubectl --kubeconfig; if omitted, kubectl uses its default configuration on the worker host. |
namespace | No | Kubernetes namespace to scope all commands to (kubectl -n <namespace>). Defaults to default. |
context | No | kubeconfig context name to use (kubectl --context). |
{
"name": "kubernetes",
"_node_type": "tool-kubernetes",
"kubeconfig": "{{ secret.K8S_KUBECONFIG }}",
"namespace": "production",
"context": "prod-cluster"
}
Tools
k8s_get
List Kubernetes resources. Returns names, status, restarts and age.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Resource type: pods deployments services nodes configmaps secrets |
label | string | No | Label selector e.g. app=nginx |
Returns: The output of kubectl get <kind> -o wide (optionally with -l <label>).
k8s_apply
Apply a Kubernetes manifest YAML. Creates or updates any resource.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
manifest | string | Yes | Kubernetes YAML manifest to apply |
Returns: The output of kubectl apply -f <manifest-file>.
k8s_scale
Scale a Kubernetes deployment to a specific number of replicas.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment | string | Yes | Deployment name |
replicas | number | Yes | Desired replica count |
Returns: The output of kubectl scale deployment <deployment> --replicas=<replicas>.
k8s_logs
Get recent logs from a Kubernetes pod.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pod | string | Yes | Pod name or -l label=value |
lines | number | No | Last N lines (default 100) |
Returns: The output of kubectl logs --tail=<lines> <pod>. If pod starts with -l or contains =, it is treated as a label selector and passed via kubectl logs -l <selector> instead of a pod name.
k8s_delete
Delete a Kubernetes resource by kind and name.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Resource type |
name | string | Yes | Resource name |
Returns: The output of kubectl delete <kind> <name>.
k8s_exec
Execute a command inside a running Kubernetes pod container.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pod | string | Yes | Pod name |
command | string | Yes | Command to run inside the pod |
Returns: The output of kubectl exec <pod> -- sh -c "<command>".
k8s_describe
Describe a Kubernetes resource — shows spec, status and recent events.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Resource type |
name | string | Yes | Resource name |
Returns: The output of kubectl describe <kind> <name>.
k8s_rollout
Manage deployment rollouts: status, restart, history, undo.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | status restart history undo |
deployment | string | Yes | Deployment name |
Returns: The output of kubectl rollout <action> deployment/<deployment>.