Skip to content

Instantly share code, notes, and snippets.

@rmetzler
Last active April 18, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmetzler/aaa9b0d42c033064cf44029d9636f537 to your computer and use it in GitHub Desktop.
Save rmetzler/aaa9b0d42c033064cf44029d9636f537 to your computer and use it in GitHub Desktop.
kubectl top node,pod
#!/bin/bash
join -a 1 -1 1 -2 2 \
<(kubectl top node | sed -e 's/NAME/NODE/') \
<( \
join -1 1 -2 1 \
-o 1.1,2.7,1.2,1.3 \
<(kubectl top pod) \
<(kubectl get pod -o wide) \
| sed -e 's/NAME/POD/' \
) | column -t -s' '
@rmetzler
Copy link
Author

it doesn't have namespaces yet (kubectl top pod --all-namespaces)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment