← 返回命令列表

Linux command

ktop 命令

文本

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

常用示例

Monitor the current Kubernetes cluster

ktop

Monitor a specific namespace

ktop -n [namespace]

Use a specific kubeconfig

ktop --kubeconfig [path/to/config]

Use a specific context

ktop --context [context-name]

Monitor all namespaces

ktop -A

说明

ktop is a terminal UI monitoring tool for Kubernetes clusters, similar to htop for Linux. It provides real-time visualization of cluster resource usage including CPU, memory, disk, and GPU across nodes and pods. The TUI displays a cluster overview with total resources and aggregate utilization, per-node metrics with CPU, memory, and pod counts, and a sortable list of pods with resource consumption and restart counts. Metrics update every 2 seconds by default.

参数

-n, --namespace _NAME_
Namespace to monitor (default: all or current context).
-A, --all-namespaces
Display pods across all namespaces.
--kubeconfig _PATH_
Path to kubeconfig file.
--context _NAME_
Kubernetes context to use.
--help
Display help information.

FAQ

What is the ktop command used for?

ktop is a terminal UI monitoring tool for Kubernetes clusters, similar to htop for Linux. It provides real-time visualization of cluster resource usage including CPU, memory, disk, and GPU across nodes and pods. The TUI displays a cluster overview with total resources and aggregate utilization, per-node metrics with CPU, memory, and pod counts, and a sortable list of pods with resource consumption and restart counts. Metrics update every 2 seconds by default.

How do I run a basic ktop example?

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

What does -n, --namespace _NAME_ do in ktop?

Namespace to monitor (default: all or current context).