Skip to content
Snippets Groups Projects

sizes of all volumes in k8s - gluster

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    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}'
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment