LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kubectl-top

displays resource usage for nodes or pods

TLDR

Show node resource usage
$ kubectl top nodes
copy
Show pod resource usage
$ kubectl top pods
copy
Show pod usage in namespace
$ kubectl top pods -n [namespace]
copy
Show container-level usage
$ kubectl top pods --containers
copy
Sort by CPU
$ kubectl top pods --sort-by=cpu
copy

SYNOPSIS

kubectl top type [options]

DESCRIPTION

kubectl top displays resource usage (CPU and memory) for nodes or pods. Requires metrics-server to be running in the cluster. Useful for monitoring resource consumption and identifying resource-hungry workloads.

PARAMETERS

nodes

Display node resource usage.
pods
Display pod resource usage.
--containers
Show container-level metrics.
--sort-by field
Sort by cpu or memory.
-n, --namespace name
Kubernetes namespace.
-A, --all-namespaces
Show all namespaces.

INSTALL

sudo apt install kubectl
copy
sudo pacman -S kubectl
copy
sudo apk add kubectl
copy
brew install kubectl
copy
nix profile install nixpkgs#kubectl
copy

CAVEATS

Requires metrics-server installed in the cluster. Metrics may have a delay of up to one minute.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid