Skip to main content

@bixu/k8s/exec

v2026.04.23.2

Execute commands in Kubernetes pods via the Kubernetes API — single pod exec and fleet-wide parallel exec with label selectors

Repository

https://github.com/bixu/swamp-extensions

Labels

kubernetesexeck8s

Contents

Quality score

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @bixu/k8s/exec

@bixu/k8s/execv2026.04.23.1k8s_exec.ts

Global Arguments

ArgumentTypeDescription
kubeContextstringKubernetes context name from your kubeconfig
namespacestringDefault namespace for pod lookups
concurrencynumberMax pods to exec into in parallel (default: 10)
execExecute a command in a single pod, selected by name or label selector
ArgumentTypeDescription
podstringPod name (exact match)
containerstringContainer name (empty = default container)
namespace?stringOverride namespace for this exec
commandstringCommand to run (passed to sh -c)
execAllExecute a command across multiple pods matching a label selector, in parallel
ArgumentTypeDescription
labelSelectorstringKubernetes label selector (e.g. app=ovs)
containerstringContainer name (empty = default container)
namespace?stringOverride namespace for this exec
commandstringCommand to run (passed to sh -c)
podFilter?stringRegex filter on pod name (e.g. 'ovs-ovn-(p2979|ttvxz|7tkxv|46nf6)')

Resources

execResult(infinite)— Result of executing a command in a Kubernetes pod
summary(infinite)— Summary of a batch exec operation