Skip to content

Instantly share code, notes, and snippets.

View rjangheldotcom's full-sized avatar
🎯
Focusing

Rahul Janghel rjangheldotcom

🎯
Focusing
  • rjanghel.com
  • Pune
View GitHub Profile
@rjangheldotcom
rjangheldotcom / kubedf
Created April 29, 2023 12:14 — forked from redmcg/kubedf
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")) | '\