Skip to content

Instantly share code, notes, and snippets.

View BLshlomo's full-sized avatar
🎯
Senior SRE

shlomo.benlevi BLshlomo

🎯
Senior SRE
View GitHub Profile
@redmcg
redmcg / kubedf
Last active May 2, 2024 10:19
Bash script to show k8s PVC usage
#!/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")) | '\