← 返回命令列表

Linux command

kubie 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Switch context

kubie ctx [context]

Switch namespace

kubie ns [namespace]

List contexts

kubie ctx

List namespaces

kubie ns

Spawn shell in context

kubie ctx [context] -n [namespace]

Execute a command

kubie exec [context] [namespace] -- [kubectl get pods]

Show current context info

kubie info ctx

Exit kubie shell

exit

说明

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.

参数

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.

FAQ

What is the kubie command used for?

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.

How do I run a basic kubie example?

Run `kubie ctx [context]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does ctx _CONTEXT_ do in kubie?

Switch or list contexts.