KUBERNETES EXTENSIONS
Every Swamp extension that covers Kubernetes, as published in the registry.
Install any of them with swamp extension pull.
Extensions
| Extension | Version | License | Contents |
|---|---|---|---|
| @swamp/kubernetes | 2026.10.13.1 | - | 16 behavior types, 14 workflows |
| @john/k8s | 2026.04.29.5 | - | 15 behavior types, 13 workflows |
| @bixu/k8s/exec | 2026.04.23.2 | - | 1 behavior types |
| @twonines/k8s-fleet | 2026.07.19.2 | - | 1 behavior types |
@swamp/kubernetes
swamp extension pull @swamp/kubernetesBehavior type @swamp/kubernetes/configmap
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all configmaps in the configured namespace | namespace (optional) |
get |
Get a single configmap's data and metadata | configMapName, namespace (optional) |
create |
Create a configmap from key-value data pairs with optional labels | configMapName, data, labels (optional), namespace (optional) |
update |
Merge new keys into an existing configmap via read-then-replace | configMapName, data, namespace (optional) |
delete |
Delete a configmap | configMapName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
configmap |
ConfigMap with key-value data, data keys list, labels, and annotations |
Behavior type @swamp/kubernetes/deployment
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all deployments in the configured namespace with replicas, strategy, containers, and conditions | namespace (optional) |
get |
Get a deployment's full spec including containers, volumes, security contexts, and rollout conditions | deploymentName, namespace (optional) |
create |
Create a deployment from a container image or full spec object | deploymentName, image (optional), replicas (optional), spec (optional), namespace (optional) |
update |
Update a deployment's container image and/or replica count via read-then-replace | deploymentName, image (optional), replicas (optional), namespace (optional) |
delete |
Delete a deployment | deploymentName, namespace (optional) |
scale |
Scale a deployment to the specified replica count | deploymentName, replicas, namespace (optional) |
restart |
Trigger a rolling restart by setting the restartedAt annotation on the pod template | deploymentName, namespace (optional) |
pause |
Pause a deployment's rollout by setting spec.paused = true | deploymentName, namespace (optional) |
resume |
Resume a paused deployment's rollout by setting spec.paused = false | deploymentName, namespace (optional) |
getRolloutStatus |
Get a deployment's rollout status with Available, Progressing, and ReplicaFailure conditions | deploymentName, namespace (optional) |
getReplicaSets |
List ReplicaSets owned by a deployment, showing rollout history and revisions | deploymentName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
deployment |
Deployment spec with replicas, strategy, containers, volumes, security contexts, and rollout conditions |
replicaSet |
ReplicaSet showing replica counts, owner deployment, and revision number |
Behavior type @swamp/kubernetes/event
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all events in the namespace, sorted by lastTimestamp descending | namespace (optional) |
getForPod |
Get events for a specific pod, sorted by lastTimestamp descending | podName, namespace (optional) |
getForDeployment |
Get events for a specific deployment, sorted by lastTimestamp descending | deploymentName, namespace (optional) |
getForService |
Get events for a specific service, sorted by lastTimestamp descending | serviceName, namespace (optional) |
getWarnings |
Get only Warning-type events in the namespace, sorted by lastTimestamp descending | namespace (optional) |
Data written:
| Resource | Description |
|---|---|
event |
Kubernetes event with type, reason, message, involved object, count, and timestamps |
Behavior type @swamp/kubernetes/hpa
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all HorizontalPodAutoscalers in the namespace with current vs target metrics and replica counts | namespace (optional) |
get |
Get an HPA's current vs target metrics, replica range, scale conditions, and last scale time | hpaName, namespace (optional) |
create |
Create an HPA targeting a deployment with CPU utilization threshold and replica range | hpaName, targetDeployment, minReplicas (optional), maxReplicas, cpuTargetPercent (optional), namespace (optional) |
delete |
Delete a HorizontalPodAutoscaler | hpaName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
hpa |
HorizontalPodAutoscaler with current/target metrics, replica range, scale conditions, and last scale time |
Behavior type @swamp/kubernetes/ingress
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all ingresses in the configured namespace | namespace (optional) |
get |
Get an ingress's spec with rules, TLS config, and load balancer status | ingressName, namespace (optional) |
create |
Create an ingress from rules with optional TLS config and ingress class | ingressName, rules, ingressClassName (optional), tls (optional), annotations (optional), namespace (optional) |
update |
Update an ingress's rules, TLS config, or annotations via read-then-replace | ingressName, rules (optional), tls (optional), annotations (optional), namespace (optional) |
delete |
Delete an ingress | ingressName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
ingress |
Ingress with rules, TLS config, default backend, and load balancer IPs |
Behavior type @swamp/kubernetes/job
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listJobs |
List all Jobs in the namespace with completion status, duration, and failure counts | namespace (optional) |
getJob |
Get a Job's full status including completions, failures, duration, conditions, and containers | jobName, namespace (optional) |
deleteJob |
Delete a Job and its pods | jobName, namespace (optional) |
listCronJobs |
List all CronJobs with schedule, suspend status, last run times, and active job count | namespace (optional) |
getCronJob |
Get a CronJob's schedule, suspend status, concurrency policy, and history limits | cronJobName, namespace (optional) |
deleteCronJob |
Delete a CronJob and all its child Jobs | cronJobName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
job |
Job with completions, failures, duration, conditions, and owner CronJob reference |
cronJob |
CronJob with schedule, suspend status, concurrency policy, and last schedule/success times |
Behavior type @swamp/kubernetes/namespace
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all namespaces in the cluster, optionally filtered by label selector | - |
get |
Get a single namespace's phase, finalizers, conditions, labels, and annotations | namespaceName |
create |
Create a new namespace with optional labels | namespaceName, labels (optional) |
delete |
Delete a namespace and all resources within it | namespaceName |
update |
Merge new labels and/or annotations onto a namespace via read-then-replace | namespaceName, labels (optional), annotations (optional) |
getResourceQuotas |
List all resource quotas in a namespace showing hard limits and current usage | namespaceName |
setResourceQuota |
Create or replace a resource quota with the given hard limits (pods, cpu, memory, etc.) | namespaceName, quotaName, hard |
deleteResourceQuota |
Delete a resource quota from a namespace | namespaceName, quotaName |
getLimitRanges |
List all limit ranges in a namespace showing default, min, and max resource constraints | namespaceName |
setLimitRange |
Create or replace a limit range defining default, min, and max resource constraints per container type | namespaceName, limitRangeName, limits |
deleteLimitRange |
Delete a limit range from a namespace | namespaceName, limitRangeName |
getResourceCounts |
Count pods, services, deployments, configmaps, secrets, service accounts, and PVCs in a namespace via parallel API calls | namespaceName |
health |
Single-call health aggregator. Returns {healthy: bool} plus per-resource breakdown for deployments, pods, services, and Warning events. Use this instead of fanning out across deployment/pod/service/event models when you just need to know whether a namespace is healthy. | namespaceName |
Data written:
| Resource | Description |
|---|---|
namespace |
Namespace state including phase, finalizers, conditions, labels, and annotations |
resourceQuota |
Resource quota showing hard limits and current usage for pods, CPU, memory, etc. |
limitRange |
Limit range defining default, min, and max resource constraints for containers in a namespace |
resourceCounts |
Count of pods, services, deployments, configmaps, secrets, service accounts, and PVCs in a namespace |
namespaceHealth |
Aggregated namespace health: per-deployment readiness, per-pod phase, per-service selector/port match, and Warning event count, plus a single top-level healthy boolean |
Behavior type @swamp/kubernetes/netpol
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all NetworkPolicies in the namespace with pod selectors, policy types, and rule counts | namespace (optional) |
get |
Get a NetworkPolicy's full spec with pod selector, ingress/egress rules, peer selectors, and CIDR blocks | policyName, namespace (optional) |
create |
Create a NetworkPolicy with pod selector and ingress/egress rules | policyName, podSelector (optional), policyTypes (optional), ingress (optional), egress (optional), namespace (optional) |
delete |
Delete a NetworkPolicy | policyName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
netpol |
NetworkPolicy with pod selector, ingress/egress rules, peer selectors, and CIDR blocks |
Behavior type @swamp/kubernetes/node
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
Sync all nodes: upsert live nodes and prune records for departed ones | - |
get |
Get a node's full status including conditions, capacity, taints, and node info | nodeName |
getMetrics |
Get CPU and memory usage for all nodes from metrics-server | - |
cordon |
Cordon a node by setting spec.unschedulable = true | nodeName |
uncordon |
Uncordon a node by setting spec.unschedulable = false | nodeName |
taint |
Add a taint to a node | nodeName, key, value (optional), effect |
untaint |
Remove a taint from a node by key | nodeName, key |
getPodsOnNode |
List all pods running on a specific node across all namespaces | nodeName |
Data written:
| Resource | Description |
|---|---|
node |
Node with conditions, capacity, allocatable resources, taints, and node info |
nodeMetrics |
Node CPU and memory usage from metrics-server |
nodePod |
Pod running on a specific node |
Behavior type @swamp/kubernetes/pod
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listContexts |
List available kubeconfig contexts | - |
list |
List all pods in the configured namespace, optionally filtered by label selector | namespace (optional) |
get |
Get a single pod's full status including phase, container states, conditions, and IPs | podName, namespace (optional) |
create |
Create a pod from a container image name or a full pod spec object | podName, image (optional), spec (optional), namespace (optional) |
delete |
Delete a pod | podName, namespace (optional) |
restart |
Delete a pod so its controller recreates it. For Deployment/ReplicaSet-managed pods the replacement will have a new name — use the pod list method to find it. | podName, namespace (optional) |
getLogs |
Fetch the last N lines of container logs via the K8s API and store as a streaming file | podName, container (optional), tailLines (optional), previous (optional), namespace (optional) |
getMetrics |
Query the metrics-server API for per-pod and per-container CPU/memory usage in the namespace | namespace (optional) |
exec |
Run a command in a pod container via kubectl exec and capture stdout/stderr and exit code | podName, command, container (optional) |
Data written:
| Resource | Description |
|---|---|
pod |
Pod state including phase, container statuses, conditions, IPs, and restart counts |
metrics |
Per-pod and per-container CPU/memory usage from the metrics-server |
execResult |
Stdout, exit code, and metadata from a non-interactive kubectl exec |
contextInfo |
Available kubeconfig contexts |
logs |
Raw container stdout/stderr logs fetched from the K8s API |
Behavior type @swamp/kubernetes/pod-summary
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
sourceName |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
summarize |
Read pod resources from a pod instance and compute counts by phase, node, restart totals, and healthy/unhealthy breakdown | - |
Data written:
| Resource | Description |
|---|---|
summary |
Aggregated pod counts by phase, node, restart totals, high-restart pods, and healthy/unhealthy breakdown |
Behavior type @swamp/kubernetes/pvc
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all PersistentVolumeClaims in the namespace with binding status, storage class, and capacity | namespace (optional) |
get |
Get a PVC's binding status, storage class, requested vs actual capacity, and access modes | pvcName, namespace (optional) |
create |
Create a PVC with storage class, access mode, and requested capacity | pvcName, storageClassName, storage, accessModes (optional), namespace (optional) |
delete |
Delete a PersistentVolumeClaim | pvcName, namespace (optional) |
listVolumes |
List all PersistentVolumes in the cluster with phase, capacity, reclaim policy, and source | - |
Data written:
| Resource | Description |
|---|---|
pvc |
PersistentVolumeClaim with phase, storage class, capacity, access modes, and bound volume |
pv |
PersistentVolume with phase, capacity, reclaim policy, and volume source |
Behavior type @swamp/kubernetes/rbac
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listRoles |
List all Roles in the namespace with their permission rules (apiGroups, resources, verbs) | namespace (optional) |
getRole |
Get a Role's full permission rules showing which API groups, resources, and verbs are allowed | roleName, namespace (optional) |
listClusterRoles |
List all ClusterRoles in the cluster with their permission rules and aggregation selectors | - |
getClusterRole |
Get a ClusterRole's full permission rules and aggregation configuration | clusterRoleName |
listRoleBindings |
List all RoleBindings in the namespace showing which subjects are bound to which roles | namespace (optional) |
getRoleBinding |
Get a RoleBinding's subjects (users, groups, service accounts) and the role it references | roleBindingName, namespace (optional) |
listClusterRoleBindings |
List all ClusterRoleBindings showing which subjects have cluster-wide role assignments | - |
getClusterRoleBinding |
Get a ClusterRoleBinding's subjects and the cluster role it references | clusterRoleBindingName |
listServiceAccounts |
List all ServiceAccounts in the namespace with auto-mount token status and secret counts | namespace (optional) |
getServiceAccount |
Get a ServiceAccount's auto-mount token setting and associated secrets | serviceAccountName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
role |
Namespaced Role with API group/resource/verb permission rules |
clusterRole |
Cluster-scoped ClusterRole with permission rules and optional aggregation selectors |
roleBinding |
Namespaced RoleBinding linking subjects (users, groups, service accounts) to a Role or ClusterRole |
clusterRoleBinding |
Cluster-scoped ClusterRoleBinding linking subjects to a ClusterRole |
serviceAccount |
ServiceAccount with auto-mount token status and associated secret count |
Behavior type @swamp/kubernetes/secret
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all secrets in the namespace showing type and data keys (not content) | namespace (optional) |
get |
Get a secret with decoded data values (sensitive, stored in vault) | secretName, namespace (optional) |
create |
Create a secret from key-value data pairs (values will be base64-encoded) | secretName, data, type (optional), labels (optional), namespace (optional) |
update |
Merge new keys into an existing secret via read-then-replace (values will be base64-encoded) | secretName, data, namespace (optional) |
delete |
Delete a secret | secretName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
secretMeta |
Secret metadata with type and data key names (no content) |
secret |
Secret with decoded data values (sensitive, stored in vault) |
Behavior type @swamp/kubernetes/service
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all services in the configured namespace with their type, ports, and selectors | namespace (optional) |
get |
Get a single service's spec including type, clusterIP, ports, and pod selector | serviceName, namespace (optional) |
getEndpoints |
Get the endpoint addresses backing a service, showing which pods are ready and not ready | serviceName, namespace (optional) |
create |
Create a service with selector, ports, and optional type and labels | serviceName, selector, ports, type (optional), labels (optional), namespace (optional) |
update |
Update a service's selector and/or ports via read-then-replace | serviceName, selector (optional), ports (optional), namespace (optional) |
delete |
Delete a service | serviceName, namespace (optional) |
diagnoseService |
Diagnose a service by comparing its selector against pod labels, reporting mismatches and port analysis | serviceName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
service |
Service spec including type, clusterIP, ports, and pod selector labels |
endpoints |
Endpoint addresses backing a service, split into ready and not-ready |
diagnosis |
Service diagnosis comparing selector vs pod labels, port analysis, and health status |
Behavior type @swamp/kubernetes/statefulset
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all StatefulSets in the configured namespace with replicas, update strategy, volume claim templates, and conditions | namespace (optional) |
get |
Get a StatefulSet's full spec including containers, volumes, volume claim templates, pod management policy, and update strategy | statefulSetName, namespace (optional) |
scale |
Scale a StatefulSet to the specified replica count | statefulSetName, replicas, namespace (optional) |
delete |
Delete a StatefulSet | statefulSetName, namespace (optional) |
restart |
Trigger a rolling restart by setting the restartedAt annotation on the pod template | statefulSetName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
statefulSet |
StatefulSet spec with replicas, update strategy, pod management policy, volume claim templates, containers, and volumes |
Workflows in @swamp/kubernetes
| Workflow | Description |
|---|---|
@swamp/kubernetes/debug-namespace-deep |
Comprehensive namespace debugging workflow. Discovers and diagnoses every deployment, pod, service, configmap, PVC, secret, network policy, and event in a namespace, then iterates over all discovered services, deployments, and network policies for deep diagnostics — per-service selector and endpoint diagnosis, per-deployment rollout status and ReplicaSet history, and per-netpol rule inspection. PREREQ — create the 9 per-namespace model instances first. Run this once per namespace before invoking |
@swamp/kubernetes/namespace-debug |
List all pods, services, deployments, and events in a namespace to diagnose connectivity, crash, and rollout issues |
@swamp/kubernetes/deployment-status |
Rollout health check for all deployments — replica counts, rollout conditions, ReplicaSet history, and warning events |
@swamp/kubernetes/service-connectivity |
Service connectivity overview — all services, all pods with labels, endpoints, and warning events for diagnosing routing and selector mismatches |
@swamp/kubernetes/cluster-health |
Cluster-wide health overview — node conditions, resource capacity, CPU/memory utilization, pod distribution, and storage status |
@swamp/kubernetes/security-audit |
Audit namespace security posture — deployment security contexts, volumes, secrets, configmaps, ingress TLS, NetworkPolicy coverage, RBAC roles/bindings, and ServiceAccount permissions |
@swamp/kubernetes/rbac-audit |
RBAC security audit — Roles, ClusterRoles, RoleBindings, ClusterRoleBindings, ServiceAccounts, and permission analysis for identifying overly permissive access, wildcard rules, and cluster-admin bindings |
@swamp/kubernetes/storage-health |
Storage health check — PVC binding status, capacity usage, PersistentVolume inventory, and storage-related events |
@swamp/kubernetes/autoscaling-status |
Autoscaling status report — HPA current vs target metrics, replica counts, scale conditions, and related deployment state |
@swamp/kubernetes/batch-jobs-status |
Batch workload status — Job completion rates, CronJob schedules, failure counts, and batch-related warnings |
@swamp/kubernetes/network-audit |
Network policy audit — NetworkPolicy inventory, pod selector coverage, service endpoints, and traffic rule analysis |
@swamp/kubernetes/pod-inventory |
List all pods via the cluster-pods model and collect per-pod CPU/memory metrics from the metrics-server in a single job |
@swamp/kubernetes/pod-health-check |
Discover all pods via cluster-pods, then iterate over each to fetch detailed status and the last 50 lines of container logs |
@swamp/kubernetes/cluster-summary |
Collect pod inventory and metrics from cluster-pods, then aggregate into a summary with counts by phase, node, restart totals, and health status |
@john/k8s
swamp extension pull @john/k8sBehavior type @john/configmap
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all configmaps in the configured namespace | namespace (optional) |
get |
Get a single configmap's data and metadata | configMapName, namespace (optional) |
create |
Create a configmap from key-value data pairs with optional labels | configMapName, data, labels (optional), namespace (optional) |
update |
Merge new keys into an existing configmap via read-then-replace | configMapName, data, namespace (optional) |
delete |
Delete a configmap | configMapName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
configmap |
ConfigMap with key-value data, data keys list, labels, and annotations |
Behavior type @john/deployment
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all deployments in the configured namespace with replicas, strategy, containers, and conditions | namespace (optional) |
get |
Get a deployment's full spec including containers, volumes, security contexts, and rollout conditions | deploymentName, namespace (optional) |
create |
Create a deployment from a container image or full spec object | deploymentName, image (optional), replicas (optional), spec (optional), namespace (optional) |
update |
Update a deployment's container image and/or replica count via read-then-replace | deploymentName, image (optional), replicas (optional), namespace (optional) |
delete |
Delete a deployment | deploymentName, namespace (optional) |
scale |
Scale a deployment to the specified replica count | deploymentName, replicas, namespace (optional) |
restart |
Trigger a rolling restart by setting the restartedAt annotation on the pod template | deploymentName, namespace (optional) |
pause |
Pause a deployment's rollout by setting spec.paused = true | deploymentName, namespace (optional) |
resume |
Resume a paused deployment's rollout by setting spec.paused = false | deploymentName, namespace (optional) |
getRolloutStatus |
Get a deployment's rollout status with Available, Progressing, and ReplicaFailure conditions | deploymentName, namespace (optional) |
getReplicaSets |
List ReplicaSets owned by a deployment, showing rollout history and revisions | deploymentName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
deployment |
Deployment spec with replicas, strategy, containers, volumes, security contexts, and rollout conditions |
replicaSet |
ReplicaSet showing replica counts, owner deployment, and revision number |
Behavior type @john/event
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all events in the namespace, sorted by lastTimestamp descending | namespace (optional) |
getForPod |
Get events for a specific pod, sorted by lastTimestamp descending | podName, namespace (optional) |
getForDeployment |
Get events for a specific deployment, sorted by lastTimestamp descending | deploymentName, namespace (optional) |
getForService |
Get events for a specific service, sorted by lastTimestamp descending | serviceName, namespace (optional) |
getWarnings |
Get only Warning-type events in the namespace, sorted by lastTimestamp descending | namespace (optional) |
Data written:
| Resource | Description |
|---|---|
event |
Kubernetes event with type, reason, message, involved object, count, and timestamps |
Behavior type @john/hpa
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all HorizontalPodAutoscalers in the namespace with current vs target metrics and replica counts | namespace (optional) |
get |
Get an HPA's current vs target metrics, replica range, scale conditions, and last scale time | hpaName, namespace (optional) |
create |
Create an HPA targeting a deployment with CPU utilization threshold and replica range | hpaName, targetDeployment, minReplicas (optional), maxReplicas, cpuTargetPercent (optional), namespace (optional) |
delete |
Delete a HorizontalPodAutoscaler | hpaName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
hpa |
HorizontalPodAutoscaler with current/target metrics, replica range, scale conditions, and last scale time |
Behavior type @john/ingress
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all ingresses in the configured namespace | namespace (optional) |
get |
Get an ingress's spec with rules, TLS config, and load balancer status | ingressName, namespace (optional) |
create |
Create an ingress from rules with optional TLS config and ingress class | ingressName, rules, ingressClassName (optional), tls (optional), annotations (optional) |
update |
Update an ingress's rules, TLS config, or annotations via read-then-replace | ingressName, rules (optional), tls (optional), annotations (optional) |
delete |
Delete an ingress | ingressName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
ingress |
Ingress with rules, TLS config, default backend, and load balancer IPs |
Behavior type @john/job
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listJobs |
List all Jobs in the namespace with completion status, duration, and failure counts | namespace (optional) |
getJob |
Get a Job's full status including completions, failures, duration, conditions, and containers | jobName, namespace (optional) |
deleteJob |
Delete a Job and its pods | jobName, namespace (optional) |
listCronJobs |
List all CronJobs with schedule, suspend status, last run times, and active job count | namespace (optional) |
getCronJob |
Get a CronJob's schedule, suspend status, concurrency policy, and history limits | cronJobName, namespace (optional) |
deleteCronJob |
Delete a CronJob and all its child Jobs | cronJobName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
job |
Job with completions, failures, duration, conditions, and owner CronJob reference |
cronJob |
CronJob with schedule, suspend status, concurrency policy, and last schedule/success times |
Behavior type @john/namespace
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all namespaces in the cluster, optionally filtered by label selector | - |
get |
Get a single namespace's phase, finalizers, conditions, labels, and annotations | namespaceName |
create |
Create a new namespace with optional labels | namespaceName, labels (optional) |
delete |
Delete a namespace and all resources within it | namespaceName |
update |
Merge new labels and/or annotations onto a namespace via read-then-replace | namespaceName, labels (optional), annotations (optional) |
getResourceQuotas |
List all resource quotas in a namespace showing hard limits and current usage | namespaceName |
setResourceQuota |
Create or replace a resource quota with the given hard limits (pods, cpu, memory, etc.) | namespaceName, quotaName, hard |
deleteResourceQuota |
Delete a resource quota from a namespace | namespaceName, quotaName |
getLimitRanges |
List all limit ranges in a namespace showing default, min, and max resource constraints | namespaceName |
setLimitRange |
Create or replace a limit range defining default, min, and max resource constraints per container type | namespaceName, limitRangeName, limits |
deleteLimitRange |
Delete a limit range from a namespace | namespaceName, limitRangeName |
getResourceCounts |
Count pods, services, deployments, configmaps, secrets, service accounts, and PVCs in a namespace via parallel API calls | namespaceName |
health |
Single-call health aggregator. Returns {healthy: bool} plus per-resource breakdown for deployments, pods, services, and Warning events. Use this instead of fanning out across deployment/pod/service/event models when you just need to know whether a namespace is healthy. | namespaceName |
Data written:
| Resource | Description |
|---|---|
namespace |
Namespace state including phase, finalizers, conditions, labels, and annotations |
resourceQuota |
Resource quota showing hard limits and current usage for pods, CPU, memory, etc. |
limitRange |
Limit range defining default, min, and max resource constraints for containers in a namespace |
resourceCounts |
Count of pods, services, deployments, configmaps, secrets, service accounts, and PVCs in a namespace |
namespaceHealth |
Aggregated namespace health: per-deployment readiness, per-pod phase, per-service selector/port match, and Warning event count, plus a single top-level healthy boolean |
Behavior type @john/netpol
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all NetworkPolicies in the namespace with pod selectors, policy types, and rule counts | namespace (optional) |
get |
Get a NetworkPolicy's full spec with pod selector, ingress/egress rules, peer selectors, and CIDR blocks | policyName, namespace (optional) |
create |
Create a NetworkPolicy with pod selector and ingress/egress rules | policyName, podSelector (optional), policyTypes (optional), ingress (optional), egress (optional) |
delete |
Delete a NetworkPolicy | policyName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
netpol |
NetworkPolicy with pod selector, ingress/egress rules, peer selectors, and CIDR blocks |
Behavior type @john/node
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all nodes with status, capacity, conditions, and taints | - |
get |
Get a node's full status including conditions, capacity, taints, and node info | nodeName |
getMetrics |
Get CPU and memory usage for all nodes from metrics-server | - |
cordon |
Cordon a node by setting spec.unschedulable = true | nodeName |
uncordon |
Uncordon a node by setting spec.unschedulable = false | nodeName |
taint |
Add a taint to a node | nodeName, key, value (optional), effect |
untaint |
Remove a taint from a node by key | nodeName, key |
getPodsOnNode |
List all pods running on a specific node across all namespaces | nodeName |
Data written:
| Resource | Description |
|---|---|
node |
Node with conditions, capacity, allocatable resources, taints, and node info |
nodeMetrics |
Node CPU and memory usage from metrics-server |
nodePod |
Pod running on a specific node |
Behavior type @john/pod
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listContexts |
List available kubeconfig contexts | - |
list |
List all pods in the configured namespace, optionally filtered by label selector | namespace (optional) |
get |
Get a single pod's full status including phase, container states, conditions, and IPs | podName, namespace (optional) |
create |
Create a pod from a container image name or a full pod spec object | podName, image (optional), spec (optional), namespace (optional) |
delete |
Delete a pod | podName, namespace (optional) |
restart |
Delete a pod and wait up to waitSeconds for its controller to recreate it in Running state | podName, waitSeconds (optional), namespace (optional) |
getLogs |
Fetch the last N lines of container logs via the K8s API and store as a streaming file | podName, container (optional), tailLines (optional), previous (optional), namespace (optional) |
getMetrics |
Query the metrics-server API for per-pod and per-container CPU/memory usage in the namespace | namespace (optional) |
exec |
Run a command in a pod container via kubectl exec and capture stdout/stderr and exit code | podName, command, container (optional) |
Data written:
| Resource | Description |
|---|---|
pod |
Pod state including phase, container statuses, conditions, IPs, and restart counts |
metrics |
Per-pod and per-container CPU/memory usage from the metrics-server |
execResult |
Stdout, exit code, and metadata from a non-interactive kubectl exec |
contextInfo |
Available kubeconfig contexts |
logs |
Raw container stdout/stderr logs fetched from the K8s API |
Behavior type @john/pod-summary
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
sourceName |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
summarize |
Read pod resources from a @john/pod instance and compute counts by phase, node, restart totals, and healthy/unhealthy breakdown | - |
Data written:
| Resource | Description |
|---|---|
summary |
Aggregated pod counts by phase, node, restart totals, high-restart pods, and healthy/unhealthy breakdown |
Behavior type @john/pvc
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all PersistentVolumeClaims in the namespace with binding status, storage class, and capacity | namespace (optional) |
get |
Get a PVC's binding status, storage class, requested vs actual capacity, and access modes | pvcName, namespace (optional) |
create |
Create a PVC with storage class, access mode, and requested capacity | pvcName, storageClassName, storage, accessModes (optional), namespace (optional) |
delete |
Delete a PersistentVolumeClaim | pvcName, namespace (optional) |
listVolumes |
List all PersistentVolumes in the cluster with phase, capacity, reclaim policy, and source | - |
Data written:
| Resource | Description |
|---|---|
pvc |
PersistentVolumeClaim with phase, storage class, capacity, access modes, and bound volume |
pv |
PersistentVolume with phase, capacity, reclaim policy, and volume source |
Behavior type @john/rbac
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
listRoles |
List all Roles in the namespace with their permission rules (apiGroups, resources, verbs) | namespace (optional) |
getRole |
Get a Role's full permission rules showing which API groups, resources, and verbs are allowed | roleName, namespace (optional) |
listClusterRoles |
List all ClusterRoles in the cluster with their permission rules and aggregation selectors | - |
getClusterRole |
Get a ClusterRole's full permission rules and aggregation configuration | clusterRoleName |
listRoleBindings |
List all RoleBindings in the namespace showing which subjects are bound to which roles | namespace (optional) |
getRoleBinding |
Get a RoleBinding's subjects (users, groups, service accounts) and the role it references | roleBindingName, namespace (optional) |
listClusterRoleBindings |
List all ClusterRoleBindings showing which subjects have cluster-wide role assignments | - |
getClusterRoleBinding |
Get a ClusterRoleBinding's subjects and the cluster role it references | clusterRoleBindingName |
listServiceAccounts |
List all ServiceAccounts in the namespace with auto-mount token status and secret counts | namespace (optional) |
getServiceAccount |
Get a ServiceAccount's auto-mount token setting and associated secrets | serviceAccountName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
role |
Namespaced Role with API group/resource/verb permission rules |
clusterRole |
Cluster-scoped ClusterRole with permission rules and optional aggregation selectors |
roleBinding |
Namespaced RoleBinding linking subjects (users, groups, service accounts) to a Role or ClusterRole |
clusterRoleBinding |
Cluster-scoped ClusterRoleBinding linking subjects to a ClusterRole |
serviceAccount |
ServiceAccount with auto-mount token status and associated secret count |
Behavior type @john/secret
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all secrets in the namespace showing type and data keys (not content) | namespace (optional) |
get |
Get a secret with decoded data values (sensitive, stored in vault) | secretName, namespace (optional) |
create |
Create a secret from key-value data pairs (values will be base64-encoded) | secretName, data, type (optional), labels (optional), namespace (optional) |
update |
Merge new keys into an existing secret via read-then-replace (values will be base64-encoded) | secretName, data, namespace (optional) |
delete |
Delete a secret | secretName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
secretMeta |
Secret metadata with type and data key names (no content) |
secret |
Secret with decoded data values (sensitive, stored in vault) |
Behavior type @john/service
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
namespace |
string | no | - |
context |
string | no | - |
kubeconfig |
string | no | - |
labels |
string | no | - |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
list |
List all services in the configured namespace with their type, ports, and selectors | namespace (optional) |
get |
Get a single service's spec including type, clusterIP, ports, and pod selector | serviceName, namespace (optional) |
getEndpoints |
Get the endpoint addresses backing a service, showing which pods are ready and not ready | serviceName, namespace (optional) |
create |
Create a service with selector, ports, and optional type and labels | serviceName, selector, ports, type (optional), labels (optional) |
update |
Update a service's selector and/or ports via read-then-replace | serviceName, selector (optional), ports (optional) |
delete |
Delete a service | serviceName, namespace (optional) |
diagnoseService |
Diagnose a service by comparing its selector against pod labels, reporting mismatches and port analysis | serviceName, namespace (optional) |
Data written:
| Resource | Description |
|---|---|
service |
Service spec including type, clusterIP, ports, and pod selector labels |
endpoints |
Endpoint addresses backing a service, split into ready and not-ready |
diagnosis |
Service diagnosis comparing selector vs pod labels, port analysis, and health status |
Workflows in @john/k8s
| Workflow | Description |
|---|---|
@john/debug-namespace-deep |
Comprehensive namespace debugging workflow. Discovers and diagnoses every deployment, pod, service, configmap, PVC, secret, network policy, and event in a namespace, then iterates over all discovered services, deployments, and network policies for deep diagnostics — per-service selector and endpoint diagnosis, per-deployment rollout status and ReplicaSet history, and per-netpol rule inspection. PREREQ — create the 9 per-namespace model instances first. Run this once per namespace before invoking |
@john/deployment-status |
Rollout health check for all deployments — replica counts, rollout conditions, ReplicaSet history, and warning events |
@john/service-connectivity |
Service connectivity overview — all services, all pods with labels, endpoints, and warning events for diagnosing routing and selector mismatches |
@john/cluster-health |
Cluster-wide health overview — node conditions, resource capacity, CPU/memory utilization, pod distribution, and storage status |
@john/security-audit |
Audit namespace security posture — deployment security contexts, volumes, secrets, configmaps, ingress TLS, NetworkPolicy coverage, RBAC roles/bindings, and ServiceAccount permissions |
@john/rbac-audit |
RBAC security audit — Roles, ClusterRoles, RoleBindings, ClusterRoleBindings, ServiceAccounts, and permission analysis for identifying overly permissive access, wildcard rules, and cluster-admin bindings |
@john/storage-health |
Storage health check — PVC binding status, capacity usage, PersistentVolume inventory, and storage-related events |
@john/autoscaling-status |
Autoscaling status report — HPA current vs target metrics, replica counts, scale conditions, and related deployment state |
@john/batch-jobs-status |
Batch workload status — Job completion rates, CronJob schedules, failure counts, and batch-related warnings |
@john/network-audit |
Network policy audit — NetworkPolicy inventory, pod selector coverage, service endpoints, and traffic rule analysis |
@john/pod-inventory |
List all pods via the cluster-pods model and collect per-pod CPU/memory metrics from the metrics-server in a single job |
@john/pod-health-check |
Discover all pods via cluster-pods, then iterate over each to fetch detailed status and the last 50 lines of container logs |
@john/cluster-summary |
Collect pod inventory and metrics from cluster-pods, then aggregate into a summary with counts by phase, node, restart totals, and health status |
@bixu/k8s/exec
swamp extension pull @bixu/k8s/execBehavior type @bixu/k8s/exec
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
kubeContext |
string | yes | Kubernetes context name from your kubeconfig |
namespace |
string | no | Default namespace for pod lookups |
concurrency |
number | no | Max pods to exec into in parallel (default: 10) |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
exec |
Execute a command in a single pod, selected by name or label selector | pod, container (optional), namespace (optional), command |
execAll |
Execute a command across multiple pods matching a label selector, in parallel | labelSelector, container (optional), namespace (optional), command, podFilter (optional) |
Data written:
| Resource | Description |
|---|---|
execResult |
Result of executing a command in a Kubernetes pod |
summary |
Summary of a batch exec operation |
@twonines/k8s-fleet
swamp extension pull @twonines/k8s-fleetBehavior type @twonines/k8s-fleet
Global arguments, set with --global-arg on swamp behavior create:
| Name | Type | Required | Description |
|---|---|---|---|
kubeconfig |
string | no | Path to kubeconfig file. Defaults to ~/.kube/config. |
contexts |
array of string | no | Limit to these context names. If omitted, all contexts are used. |
timeout |
number | no | Per-context API timeout in seconds (default: 10). |
Methods, run with swamp behavior run:
| Method | Description | Arguments |
|---|---|---|
contexts |
List all kubeconfig contexts with cluster/user/namespace info and a quick reachability check. | - |
health |
Probe each context for node conditions, pod phase counts, and resource pressure. Unreachable clusters are marked with their error. | - |
summary |
Run health checks then aggregate into a single fleet summary: total clusters, nodes, pods, and lists of unhealthy/unreachable clusters. | - |
Data written:
| Resource | Description |
|---|---|
context |
Kubeconfig context metadata with reachability status |
clusterHealth |
Per-cluster health snapshot: node conditions, pod phase summary |
fleetSummary |
Aggregated fleet health across all probed clusters |