sizes of all volumes in k8s - gluster
The snippet can be accessed without any authentication.
Authored by
Iain Walmsley
Edited
k8s-vol-usage.sh 294 B
# For non gluster-backed/replicated s*3 -> s
## One namespace
kc get pvc -n prod | awk '{print $4}' | egrep --only-matching '[0-9]*' | awk '{s+=$1} END {print s*3}'
## All namespaces
kc get pvc --all-namespaces | awk '{print $5}' | egrep --only-matching '[0-9]*' | awk '{s+=$1} END {print s*3}'
Please register or sign in to comment