Created
March 9, 2021 20:41
-
-
Save dkeightley/e2cd054afef748e83983ea051d424162 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export ETCDCTL_API=3 | |
for key in `etcdctl get --prefix --keys-only /registry/configmaps` | |
do | |
size=`etcdctl get $key --print-value-only | wc -c` | |
versions=`etcdctl get $key --write-out=fields | grep \"Version\" | cut -f2 -d':'` | |
total=$(( $size * $versions)) | |
echo $total $size $versions $key >> /tmp/etcdkeys-configmaps.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment