Skip to content

Instantly share code, notes, and snippets.

View hussamhadi's full-sized avatar

Hussam Hadi hussamhadi

  • Team Rockstars
  • 's-Hertogenbosch
View GitHub Profile
@redmcg
redmcg / kubedf
Last active June 14, 2024 19:51
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")) | '\