backup-scripts/autoclean.sh
2025-04-16 08:16:09 +00:00

3 lines
103 B
Bash
Executable File

#!/bin/bash
kubectl get pv --no-headers | awk '$5 == "Released" {print $1}'|xargs -r kubectl delete pv