tabby-k8s-exec
v1.0.4
Published
Kubernetes pod exec plugin for Tabby — no kubectl binary required at runtime
Maintainers
Readme
tabby-k8s-exec
📖 Documentation (English / 한국어)
A Tabby terminal plugin that opens an interactive shell into a Kubernetes pod/container — like kubectl exec -it <pod> -- sh — implemented natively via the official @kubernetes/client-node SDK. No kubectl binary is required at runtime.
Features
- Native Kubernetes exec protocol — connects directly to the cluster's exec WebSocket endpoint using
@kubernetes/client-node, nokubectlprocess spawned. - Cascading connection picker — pick a kubeconfig context, then a namespace, then a pod, then a container, each populated live from the cluster (namespace/pod lists have a manual Refresh button; the context list is read from the local kubeconfig file).
- Clear pre-connect diagnostics — if the selected pod isn't actually running, the plugin checks its phase before attempting to connect and shows exactly why, instead of a raw transport error.
- Shell fallback — optionally try
/bin/bashfirst and fall back to/bin/shautomatically if the container doesn't have bash. - Multi-container pod support — the container picker is derived from the selected pod's actual
containers/initContainers.
Prerequisites
- Tabby desktop app.
- A working kubeconfig file (
~/.kube/configby default) with a context pointing at a reachable cluster. - If your kubeconfig uses an
exec-based auth plugin (e.g.aws eks get-token,gke-gcloud-auth-plugin,kubelogin), that binary must be installed and onPATH— this is inherent to how that kubeconfig auth style works (the same requirementkubectlitself has), not something this plugin can avoid. Static token, client-certificate, and standard OIDC auth need nothing extra.
Installation
This plugin isn't published to npm yet — install it from source:
git clone https://github.com/search5/tabby-k8s-exec.git
cd tabby-k8s-exec
npm install
npm run build
npm run install-pluginnpm run install-plugin copies the built plugin into Tabby's plugin directory (~/.config/tabby/plugins on Linux, ~/Library/Application Support/tabby/plugins on macOS, %APPDATA%\tabby\plugins on Windows). Restart Tabby afterwards to load it.
Usage
Create a new connection, choose type Kubernetes Exec, and fill in:
| Field | Description |
|---|---|
| Kubeconfig Path | Path to the kubeconfig file, default ~/.kube/config |
| Context | Kubeconfig context to use (leave unset to use the file's current-context) |
| Namespace | Namespace containing the target pod |
| Pod | Pod to exec into (Refresh to list pods in the selected namespace) |
| Container | Container within the pod (auto-selected if the pod has only one) |
| Command | Shell/command to run, default /bin/sh |
Selecting a context does not automatically load its namespaces — click the Namespace field's Refresh button explicitly to avoid firing off a cluster API call every time you're just browsing contexts.
Known limitations
- Exec sessions may be disconnected after roughly 5 minutes of idle time behind some proxies/load balancers (an upstream
@kubernetes/client-nodelimitation, not implemented around in v1) — reconnect via Tabby's reconnect hotkey if this happens. - The
Commandfield is split on whitespace only; shell-style quoting (sh -c "a ; b") isn't fully preserved. - Only a single kubeconfig file is supported per profile (no
KUBECONFIG-style multi-file merging).
Development
npm run watch # rebuild on change
npm run install-plugin # copy dist/ into Tabby's plugin directoryLicense
MIT — see LICENSE.
