Linux command
b4n 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Launch b4n
b4n
Start with a specific resource
b4n [pods]
Use a specific kubeconfig
b4n --context [my-cluster]
Focus on a specific namespace
b4n --namespace [kube-system]
Start with a cluster-wide view
b4n --all-namespaces
Use a custom kubeconfig
b4n --kube-config [path/to/kubeconfig]
Skip TLS certificate verification
b4n --insecure
说明
b4n is an interactive terminal user interface for managing Kubernetes clusters, written in Rust using the kube-rs and ratatui libraries. It provides a keyboard-driven interface for performing common Kubernetes operations without leaving the terminal. The TUI supports full CRUD operations on Kubernetes resources. Users can list, create, edit, and delete resources through the interactive interface. Additional capabilities include viewing resource events with e, streaming pod and container logs with l, launching interactive shell sessions in containers with s, inspecting resource YAML with y, decoding secrets with x, and configuring port forwarding with f. Navigation uses a command palette accessible via : or >, along with dedicated keys for namespace selection (left arrow) and resource kind selection (right arrow). Resources can be filtered with /, and columns can be sorted with Alt+0-9. Resources are selected with Space and deleted with Ctrl+D after confirmation. Mouse support can be toggled with Ctrl+N. The command palette supports configurable aliases for quick resource access. Default aliases include pp for pods, svc for services, cm for configmaps, ds for daemonsets, ns for namespaces, pvc for persistentvolumeclaims, and sts for statefulsets, among others.
参数
- --kube-config _path_
- Path to the kubeconfig file. Defaults to $HOME/.kube/config. Can also be set via the KUBECONFIG environment variable.
- --context _name_
- Kubernetes context to use from the kubeconfig file.
- -n, --namespace _name_
- Namespace to focus on at startup.
- -A, --all-namespaces
- Start with a cluster-wide view showing resources across all namespaces.
- --insecure
- Skip TLS certificate verification when connecting to the cluster.
- -V, --version
- Print version information.
- -h, --help
- Print help information.
FAQ
What is the b4n command used for?
b4n is an interactive terminal user interface for managing Kubernetes clusters, written in Rust using the kube-rs and ratatui libraries. It provides a keyboard-driven interface for performing common Kubernetes operations without leaving the terminal. The TUI supports full CRUD operations on Kubernetes resources. Users can list, create, edit, and delete resources through the interactive interface. Additional capabilities include viewing resource events with e, streaming pod and container logs with l, launching interactive shell sessions in containers with s, inspecting resource YAML with y, decoding secrets with x, and configuring port forwarding with f. Navigation uses a command palette accessible via : or >, along with dedicated keys for namespace selection (left arrow) and resource kind selection (right arrow). Resources can be filtered with /, and columns can be sorted with Alt+0-9. Resources are selected with Space and deleted with Ctrl+D after confirmation. Mouse support can be toggled with Ctrl+N. The command palette supports configurable aliases for quick resource access. Default aliases include pp for pods, svc for services, cm for configmaps, ds for daemonsets, ns for namespaces, pvc for persistentvolumeclaims, and sts for statefulsets, among others.
How do I run a basic b4n example?
Run `b4n` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --kube-config _path_ do in b4n?
Path to the kubeconfig file. Defaults to $HOME/.kube/config. Can also be set via the KUBECONFIG environment variable.