Created
June 14, 2018 14:49
-
-
Save foo0x29a/f78d7d68042edba6bfb661fa707eca2a to your computer and use it in GitHub Desktop.
Print pods memory usage of a given namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( NAMESPACE="staging"; for i in $(kubectl top pods -n $NAMESPACE | awk 'NR>1{split($3,a,"Mi"); print a[1];}'); do total=$(( $total + $i )); done; echo $total; ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment