LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kubie

manages Kubernetes contexts with isolated shells

TLDR

Switch context
$ kubie ctx [context]
copy
Switch namespace
$ kubie ns [namespace]
copy
List contexts
$ kubie ctx
copy
List namespaces
$ kubie ns
copy
Spawn shell in context
$ kubie ctx [context] -n [namespace]
copy
Execute a command in a specific context without spawning a shell
$ kubie exec [context] [namespace] -- [kubectl get pods]
copy
Show current context info
$ kubie info ctx
copy
Exit kubie shell
$ exit
copy

SYNOPSIS

kubie command [options]

DESCRIPTION

kubie is a Kubernetes context and namespace manager that isolates each context switch in its own shell session. Unlike kubectx, which modifies the global kubeconfig state, kubie spawns a new subshell with environment variables pointing to a temporary kubeconfig, so each terminal window can independently operate against a different cluster and namespace without interfering with others.This isolation model prevents a common source of errors in multi-cluster workflows where a context switch in one terminal unexpectedly affects commands running in another. Kubie can also list available contexts and namespaces, execute one-off commands against a specific context, and integrates with fzf for interactive selection. It is written in Rust for fast startup and minimal overhead.

PARAMETERS

ctx [CONTEXT]

Switch or list contexts.
ns [NAMESPACE]
Switch or list namespaces.
-n NAMESPACE
Specify namespace.
exec CONTEXT NAMESPACE -- CMD
Execute command in context without spawning a shell.
info ITEM
Show current context (ctx) or namespace (ns).
--help
Display help information.

CAVEATS

Each context switch spawns a subshell, so deeply nested switches increase shell depth. Requires kubeconfig files to be accessible. Supports fzf for interactive selection if installed.

HISTORY

kubie was created to provide isolated context management avoiding the issues of global context switching.

SEE ALSO

kubectl(1), kubectx(1), kubens(1)

Copied to clipboard
Kai