Skip to content

Instantly share code, notes, and snippets.

@zenkovac
zenkovac / kubedf
Created July 30, 2019 13:52 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
KUBEAPI=127.0.0.1:8001/api/v1/nodes
function getNodes() {
curl -s $KUBEAPI | jq '.items[].metadata.name' | sed 's/^"\|"$//g'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\