Skip to content

Instantly share code, notes, and snippets.

@L-U-C-K-Y
Last active June 4, 2023 19:22
Show Gist options
  • Save L-U-C-K-Y/c27aca5053d1d69de847f7e85812e157 to your computer and use it in GitHub Desktop.
Save L-U-C-K-Y/c27aca5053d1d69de847f7e85812e157 to your computer and use it in GitHub Desktop.
kubectl get nodes with cpu, memory and storage without any plugins
kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.capacity.cpu}{"\t"}{.status.capacity.memory}{"\t"}{.status.capacity.ephemeral-storage}{"\n"}{end}' | awk '{print $1, "\t", $2, "\t", $3/1024/1024, "GB", "\t", $4/1024/1024, "GB"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment