← 返回命令列表

Linux command

lfk 命令

文本

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

常用示例

Launch

lfk

Open a specific context and namespace

lfk --context [my-cluster] -n [kube-system]

Use a custom kubeconfig file

lfk --kubeconfig [/path/to/kubeconfig]

Combine multiple kubeconfigs

KUBECONFIG=[/path/to/c1]:[/path/to/c2] lfk

Load every kubeconfig in a directory

lfk --kubeconfig-dir [/path/to/configs/]

说明

lfk is a keyboard-driven terminal user interface for navigating and operating Kubernetes clusters, inspired by the yazi file manager. It presents resources in a three-column Miller columns layout (context → resource type → resource → owned resources → containers) so an operator can drill from cluster to log line without leaving the keyboard. Beyond browsing, lfk supports the day-to-day operations expected from a Kubernetes CLI: tailing logs, exec'ing into containers, running kubectl debug, scaling workloads, deleting resources, and port-forwarding services. Multi-cluster and multi-context workflows are first-class; tabs and a quick switcher allow jumping between clusters in a single session. Optional integrations expose Helm releases, ArgoCD applications, KEDA scalers, and External Secrets. A built-in Prometheus alert view surfaces firing alerts alongside the resources they reference. The binary is written in Go and ships as a single static executable.

参数

--context _name_
Start in the given Kubernetes context.
-n _namespace_, --namespace _namespace_
Open in the given namespace.
--kubeconfig _file_
Override KUBECONFIG with the given file (colon-separated paths are supported).
--kubeconfig-dir _dir_
Treat every file under _dir_ as a kubeconfig and load them all.
--read-only
Start in read-only mode; mutating actions are disabled.
--theme _name_
Pick one of the bundled colour themes (press T at runtime to switch).
--help
Print built-in help and exit.

FAQ

What is the lfk command used for?

lfk is a keyboard-driven terminal user interface for navigating and operating Kubernetes clusters, inspired by the yazi file manager. It presents resources in a three-column Miller columns layout (context → resource type → resource → owned resources → containers) so an operator can drill from cluster to log line without leaving the keyboard. Beyond browsing, lfk supports the day-to-day operations expected from a Kubernetes CLI: tailing logs, exec'ing into containers, running kubectl debug, scaling workloads, deleting resources, and port-forwarding services. Multi-cluster and multi-context workflows are first-class; tabs and a quick switcher allow jumping between clusters in a single session. Optional integrations expose Helm releases, ArgoCD applications, KEDA scalers, and External Secrets. A built-in Prometheus alert view surfaces firing alerts alongside the resources they reference. The binary is written in Go and ships as a single static executable.

How do I run a basic lfk example?

Run `lfk` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --context _name_ do in lfk?

Start in the given Kubernetes context.