Skip to content

Instantly share code, notes, and snippets.

View santisbon's full-sized avatar

Armando C. Santisbon santisbon

View GitHub Profile
@santisbon
santisbon / kubedf
Last active March 16, 2023 15:45 — forked from redmcg/kubedf
Bash script to show k8s PVC usage #k8s #kubernetes
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\